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 36bc3f49ebf92113fc00427b20bdf01fe4f60778..c9bc0afdbfc6cdc981ef436737c60ad5c2b72a8c 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;