Skip to content

Commit

Permalink
btrfs: fix btrfs_mkdir goto for no free objectids
Browse files Browse the repository at this point in the history
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 <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Miao Xie authored and Chris Mason committed Mar 15, 2010
1 parent 0bdb1db commit 0be2e98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0be2e98

Please sign in to comment.