]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
btrfs: use narrower type for btrfs_transaction::num_dirty_bgs
authorDavid Sterba <dsterba@suse.com>
Wed, 8 Nov 2017 01:12:57 +0000 (02:12 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:14 +0000 (16:08 +0100)
The u64 is an overkill here, we could not possibly create that many
blockgroups in one transaction.

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

index 41770ee1313e117649ef93f8ef6eb3d89263fcb5..c3ccd9d2e946d599560bf49cd5b139469013ccc4 100644 (file)
@@ -2894,7 +2894,7 @@ int btrfs_check_space_for_delayed_refs(struct btrfs_trans_handle *trans,
        struct btrfs_block_rsv *global_rsv;
        u64 num_heads = trans->transaction->delayed_refs.num_heads_ready;
        u64 csum_bytes = trans->transaction->delayed_refs.pending_csums;
-       u64 num_dirty_bgs = trans->transaction->num_dirty_bgs;
+       unsigned int num_dirty_bgs = trans->transaction->num_dirty_bgs;
        u64 num_bytes, num_dirty_bgs_bytes;
        int ret = 0;
 
index edf53112a6f209c0a0fc4669debcd53c82428f2e..1805fd101767f5b23fea54258de9ff2ca2ae0149 100644 (file)
@@ -70,7 +70,7 @@ struct btrfs_transaction {
        struct list_head dirty_bgs;
        struct list_head io_bgs;
        struct list_head dropped_roots;
-       u64 num_dirty_bgs;
+       unsigned int num_dirty_bgs;
 
        /*
         * we need to make sure block group deletion doesn't race with