]> git.hungrycats.org Git - linux/commitdiff
Btrfs: cleanup: remove unnecessary check before btrfs_free_path is called zygo-4.1.7-zb64
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>
Wed, 19 Aug 2015 05:55:00 +0000 (14:55 +0900)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Sat, 19 Sep 2015 13:33:57 +0000 (09:33 -0400)
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>
(cherry picked from commit 527afb4493c2892ce89fb74648e72a30b68ba120)

fs/btrfs/dev-replace.c
fs/btrfs/inode.c
fs/btrfs/tree-defrag.c

index 1250263f3c494f8885bbb9216e1d29a662ace883..ab457217099db618127b6ecf4c1862583d6ba046 100644 (file)
@@ -183,8 +183,7 @@ no_valid_dev_replace_entry_found:
        }
 
 out:
-       if (path)
-               btrfs_free_path(path);
+       btrfs_free_path(path);
        return ret;
 }
 
index cf83c01e4abf76c0f93641da26a42ff2ea04480e..1239c2f695a39024877ba4aff4b3bcd716850b81 100644 (file)
@@ -6875,8 +6875,7 @@ out:
 
        trace_btrfs_get_extent(root, em);
 
-       if (path)
-               btrfs_free_path(path);
+       btrfs_free_path(path);
        if (trans) {
                ret = btrfs_end_transaction(trans, root);
                if (!err)
index a63719cc95787e2c6c2c8e55c4d674de3f58e19b..c74f1069139dd5f58fe2f2b12141e415db772b03 100644 (file)
@@ -118,8 +118,7 @@ int btrfs_defrag_leaves(struct btrfs_trans_handle *trans,
                ret = -EAGAIN;
        }
 out:
-       if (path)
-               btrfs_free_path(path);
+       btrfs_free_path(path);
        if (ret == -EAGAIN) {
                if (root->defrag_max.objectid > root->defrag_progress.objectid)
                        goto done;