From: Miao Xie Date: Thu, 11 Feb 2010 08:06:58 +0000 (+0000) Subject: btrfs: fix btrfs_mkdir goto for no free objectids X-Git-Tag: 2.1b_release~8438^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0be2e98173f8badd5ccc7c2e994891746ba1caf4;p=platform%2Fkernel%2Fkernel-mfld-blackbay.git btrfs: fix btrfs_mkdir goto for no free objectids btrfs_mkdir() must jump to the place of ending transaction after btrfs_find_free_objectid() failed. Or this transaction can't end. Signed-off-by: Miao Xie Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3657925..50ce884 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4508,7 +4508,7 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) err = btrfs_find_free_objectid(trans, root, dir->i_ino, &objectid); if (err) { err = -ENOSPC; - goto out_unlock; + goto out_fail; } inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,