From: Tsutomu Itoh Date: Thu, 3 Feb 2011 03:16:25 +0000 (+0000) Subject: btrfs: cleanup error handling in btrfs_unlink_inode() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=554233a6e0e8557e8e81e54cc70628d101291122;p=openwrt%2Fstaging%2Fblogic.git 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. Signed-off-by: Tsutomu Itoh Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 36bc3f49ebf9..c9bc0afdbfc6 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -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;