Btrfs: drop useless LIST_HEAD in merge_reloc_root
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sun, 23 Dec 2018 08:57:06 +0000 (09:57 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 25 Feb 2019 13:13:15 +0000 (14:13 +0100)
Drop LIST_HEAD where the variable it declares is never used.

The uses were removed in 3fd0a5585eb9 ("Btrfs: Metadata ENOSPC
handling for balance"), but not the declaration.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier x;
@@
- LIST_HEAD(x);
  ... when != x
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/relocation.c

index 272b287f8cf0dc438cdb6fd170f4ee467f4a69e1..de802ba35a344f36c6e519f5336d300c8eb6f217 100644 (file)
@@ -2128,7 +2128,6 @@ static noinline_for_stack int merge_reloc_root(struct reloc_control *rc,
                                               struct btrfs_root *root)
 {
        struct btrfs_fs_info *fs_info = rc->extent_root->fs_info;
-       LIST_HEAD(inode_list);
        struct btrfs_key key;
        struct btrfs_key next_key;
        struct btrfs_trans_handle *trans = NULL;