Btrfs: cleanup: remove unnecessary check before btrfs_free_path is called

We need not check path before btrfs_free_path() is called because
path is checked in btrfs_free_path().

Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Reviewed-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
Tsutomu Itoh 2015-08-19 14:55:00 +09:00 committed by Chris Mason
parent c6dd6ea557
commit 527afb4493
3 changed files with 3 additions and 6 deletions

View file

@ -183,8 +183,7 @@ no_valid_dev_replace_entry_found:
} }
out: out:
if (path) btrfs_free_path(path);
btrfs_free_path(path);
return ret; return ret;
} }

View file

@ -6905,8 +6905,7 @@ out:
trace_btrfs_get_extent(root, em); trace_btrfs_get_extent(root, em);
if (path) btrfs_free_path(path);
btrfs_free_path(path);
if (trans) { if (trans) {
ret = btrfs_end_transaction(trans, root); ret = btrfs_end_transaction(trans, root);
if (!err) if (!err)

View file

@ -115,8 +115,7 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
ret = -EAGAIN; ret = -EAGAIN;
} }
out: out:
if (path) btrfs_free_path(path);
btrfs_free_path(path);
if (ret == -EAGAIN) { if (ret == -EAGAIN) {
if (root->defrag_max.objectid > root->defrag_progress.objectid) if (root->defrag_max.objectid > root->defrag_progress.objectid)
goto done; goto done;