From: Tsutomu Itoh Date: Thu, 3 Feb 2011 03:16:25 +0000 (+0000) Subject: btrfs: cleanup error handling in btrfs_unlink_inode() X-Git-Tag: v2.6.38-rc4~2^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=554233a6e0e8557e8e81e54cc70628d101291122;p=platform%2Fkernel%2Flinux-exynos.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 36bc3f4..c9bc0af 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;