]> git.baikalelectronics.ru Git - kernel.git/commitdiff
btrfs: remove unused btrfs_root::defrag_trans_start
authorDavid Sterba <dsterba@suse.com>
Tue, 23 Jun 2020 19:23:54 +0000 (21:23 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 27 Jul 2020 10:55:28 +0000 (12:55 +0200)
Last touched in 2013 by commit c9dc0354a548 ("btrfs: remove cache only
arguments from defrag path") that was the only code that used the value.
Now it's only set but never used for anything, so we can remove it.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/tree-defrag.c

index a9cf11f2e8c76a39a5b14cf0d013d1bf4036b299..033e411dd811c912079f78e7aa68d6ac3c9036ac 100644 (file)
@@ -1075,7 +1075,6 @@ struct btrfs_root {
 
        u64 highest_objectid;
 
-       u64 defrag_trans_start;
        struct btrfs_key defrag_progress;
        struct btrfs_key defrag_max;
 
index b5b7055b795307fc157dd6e4e7ed4055ebde4110..dbf90cd495139ca1af344c992338b69ad92c5555 100644 (file)
@@ -1141,10 +1141,6 @@ static void __setup_root(struct btrfs_root *root, struct btrfs_fs_info *fs_info,
        memset(&root->root_key, 0, sizeof(root->root_key));
        memset(&root->root_item, 0, sizeof(root->root_item));
        memset(&root->defrag_progress, 0, sizeof(root->defrag_progress));
-       if (!dummy)
-               root->defrag_trans_start = fs_info->generation;
-       else
-               root->defrag_trans_start = 0;
        root->root_key.objectid = objectid;
        root->anon_dev = 0;
 
index 16c3a6d2586d39217601bf58f8bf369b3f153634..d3f28b8f4ff9be32bf1ca1088a33de24a648bb6c 100644 (file)
@@ -133,10 +133,9 @@ out:
                ret = 0;
        }
 done:
-       if (ret != -EAGAIN) {
+       if (ret != -EAGAIN)
                memset(&root->defrag_progress, 0,
                       sizeof(root->defrag_progress));
-               root->defrag_trans_start = trans->transid;
-       }
+
        return ret;
 }