Skip to content

Commit 0be2e98

Browse files
Miao Xiechrismason-xx
authored andcommitted
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 <miaox@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
1 parent 0bdb1db commit 0be2e98

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/btrfs/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4508,7 +4508,7 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
45084508
err = btrfs_find_free_objectid(trans, root, dir->i_ino, &objectid);
45094509
if (err) {
45104510
err = -ENOSPC;
4511-
goto out_unlock;
4511+
goto out_fail;
45124512
}
45134513

45144514
inode = btrfs_new_inode(trans, root, dir, dentry->d_name.name,

0 commit comments

Comments
 (0)