Skip to content

Commit

Permalink
btrfs: cleanup error handling in btrfs_unlink_inode()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tsutomu Itoh authored and Chris Mason committed Feb 6, 2011
1 parent 3c14874 commit 554233a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 554233a

Please sign in to comment.