Btrfs: remove no longer used member num_dirty_bgs from transaction
authorFilipe Manana <fdmanana@suse.com>
Mon, 15 Apr 2019 08:29:19 +0000 (09:29 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:43 +0000 (19:02 +0200)
The member num_dirty_bgs of struct btrfs_transaction is not used anymore,
it is set and incremented but nothing reads its value anymore. Its last
read use was removed by commit 64403612b73a94 ("btrfs: rework
btrfs_check_space_for_delayed_refs"). So just remove that member.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c
fs/btrfs/transaction.c
fs/btrfs/transaction.h

index 7b65d53..7e9ba2f 100644 (file)
@@ -6431,7 +6431,6 @@ static int update_block_group(struct btrfs_trans_handle *trans,
                if (list_empty(&cache->dirty_list)) {
                        list_add_tail(&cache->dirty_list,
                                      &trans->transaction->dirty_bgs);
-                       trans->transaction->num_dirty_bgs++;
                        trans->delayed_ref_updates++;
                        btrfs_get_block_group(cache);
                }
index 722ebdc..3f6811c 100644 (file)
@@ -233,7 +233,6 @@ loop:
        INIT_LIST_HEAD(&cur_trans->io_bgs);
        INIT_LIST_HEAD(&cur_trans->dropped_roots);
        mutex_init(&cur_trans->cache_write_mutex);
-       cur_trans->num_dirty_bgs = 0;
        spin_lock_init(&cur_trans->dirty_bgs_lock);
        INIT_LIST_HEAD(&cur_trans->deleted_bgs);
        spin_lock_init(&cur_trans->dropped_roots_lock);
index 4419a4a..78c446c 100644 (file)
@@ -80,7 +80,6 @@ struct btrfs_transaction {
         */
        struct mutex cache_write_mutex;
        spinlock_t dirty_bgs_lock;
-       unsigned int num_dirty_bgs;
        /* Protected by spin lock fs_info->unused_bgs_lock. */
        struct list_head deleted_bgs;
        spinlock_t dropped_roots_lock;