]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
btrfs: directly pass in fs_info to btrfs_merge_delayed_refs
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Mon, 12 Dec 2022 09:02:49 +0000 (01:02 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Feb 2023 16:50:33 +0000 (17:50 +0100)
Now that none of the functions called by btrfs_merge_delayed_refs() needs
a btrfs_trans_handle, directly pass in a btrfs_fs_info to
btrfs_merge_delayed_refs().

Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/delayed-ref.c
fs/btrfs/delayed-ref.h
fs/btrfs/extent-tree.c

index 678ce95c04ac62d63172b60220ec964662c03f08..886ffb232eac2ada089aa440775d837202d3150c 100644 (file)
@@ -497,11 +497,10 @@ static bool merge_ref(struct btrfs_delayed_ref_root *delayed_refs,
        return done;
 }
 
-void btrfs_merge_delayed_refs(struct btrfs_trans_handle *trans,
+void btrfs_merge_delayed_refs(struct btrfs_fs_info *fs_info,
                              struct btrfs_delayed_ref_root *delayed_refs,
                              struct btrfs_delayed_ref_head *head)
 {
-       struct btrfs_fs_info *fs_info = trans->fs_info;
        struct btrfs_delayed_ref_node *ref;
        struct rb_node *node;
        u64 seq = 0;
index d6304b690ec4a1763fbbb0d022c48a05ec8331ba..2eb34abf700ff4730d576b7b85edaab4e5421f11 100644 (file)
@@ -357,7 +357,7 @@ int btrfs_add_delayed_data_ref(struct btrfs_trans_handle *trans,
 int btrfs_add_delayed_extent_op(struct btrfs_trans_handle *trans,
                                u64 bytenr, u64 num_bytes,
                                struct btrfs_delayed_extent_op *extent_op);
-void btrfs_merge_delayed_refs(struct btrfs_trans_handle *trans,
+void btrfs_merge_delayed_refs(struct btrfs_fs_info *fs_info,
                              struct btrfs_delayed_ref_root *delayed_refs,
                              struct btrfs_delayed_ref_head *head);
 
index 72ba13b027a9e6b971bfd0446043815154f854fa..d1a4e51f8fbc1cc3becf7bda1a0803178c8a3894 100644 (file)
@@ -1966,7 +1966,7 @@ static int btrfs_run_delayed_refs_for_head(struct btrfs_trans_handle *trans,
                cond_resched();
 
                spin_lock(&locked_ref->lock);
-               btrfs_merge_delayed_refs(trans, delayed_refs, locked_ref);
+               btrfs_merge_delayed_refs(fs_info, delayed_refs, locked_ref);
        }
 
        return 0;
@@ -2013,7 +2013,7 @@ static noinline int __btrfs_run_delayed_refs(struct btrfs_trans_handle *trans,
                 * insert_inline_extent_backref()).
                 */
                spin_lock(&locked_ref->lock);
-               btrfs_merge_delayed_refs(trans, delayed_refs, locked_ref);
+               btrfs_merge_delayed_refs(fs_info, delayed_refs, locked_ref);
 
                ret = btrfs_run_delayed_refs_for_head(trans, locked_ref,
                                                      &actual_count);