btrfs: cleanup error handling in btrfs_unlink_inode()
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>
Thu, 3 Feb 2011 03:16:25 +0000 (03:16 +0000)
committerChris Mason <chris.mason@oracle.com>
Sun, 6 Feb 2011 12:17:45 +0000 (07:17 -0500)
When btrfs_alloc_path() fails, btrfs_free_path() need not be called.
Therefore, it changes the branch ahead.

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c

index 36bc3f4..c9bc0af 100644 (file)
@@ -2646,7 +2646,7 @@ int btrfs_unlink_inode(struct btrfs_trans_handle *trans,
        path = btrfs_alloc_path();
        if (!path) {
                ret = -ENOMEM;
-               goto err;
+               goto out;
        }
 
        path->leave_spinning = 1;