Skip to contentSkip to conversation

btrfs: cleanup error handling in btrfs_unlink_inode()

PATCH New Tsutomu Itoh 1 participant 1 message Feb 3, 2011 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: cleanup error handling in btrfs_unlink_inode()

When btrfs_alloc_path() fails, btrfs_free_path() need not be called. Therefore, it changes the branch ahead.

---
 fs/btrfs/inode.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/inode.c +1 -1
diff -urNp linux-2.6.38-rc3/fs/btrfs/inode.c linux-2.6.38-rc3.test/fs/btrfs/inode.c
@@ -2641,7 +2641,7 @@ int btrfs_unlink_inode(struct btrfs_tran
 	path = btrfs_alloc_path();
 	if (!path) {
 		ret = -ENOMEM;
-		goto err;
+		goto out;
 	}
 
 	path->leave_spinning = 1;