Skip to contentSkip to conversation

btrfs: fix problem of wrong jump after the error occured

PATCH In review Miao Xie 2 participants 2 messages Feb 11, 2010 Btrfs file system

lore
Share & tools
lore

Miao Xie

author
#0 lore raw

PATCH 1/1 btrfs: fix problem of wrong jump after the error occured

btrfs_mkdir() must jump to the place of ending transaction after btrfs_find_free_objectid() failed. Or this transaction can't end.

This patch fixes this problem.

---
 fs/btrfs/inode.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/btrfs/inode.c +1 -1
index 4deb280..4f230e4 100644
@@ -4501,7 +4501,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,
Signature · 1 line
1.6.5.2
#1 lore raw
Quoted 4 lines · Miao Xie

btrfs_mkdir() must jump to the place of ending transaction after btrfs_find_free_objectid() failed. Or this transaction can't end.

This patch fixes this problem.

Thanks, this patch is correct.

-chris