]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
btrfs: remove fs_info parameter from btrfs_destroy_delayed_refs()
authorFilipe Manana <fdmanana@suse.com>
Mon, 21 Oct 2024 16:03:46 +0000 (17:03 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 11 Nov 2024 13:34:19 +0000 (14:34 +0100)
The fs_info parameter is redundant because it can be extracted from the
transaction given as another parameter. So remove it and use the fs_info
accessible from the transaction.

Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Qu Wenruo <wqu@suse.com>
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/delayed-ref.c
fs/btrfs/delayed-ref.h
fs/btrfs/disk-io.c

index 9e661f9a71b0a51a9cd60d5bd82513a028e4913a..4a4278dfe511c1359cec2693485a360057e7882f 100644 (file)
@@ -1239,11 +1239,11 @@ bool btrfs_find_delayed_tree_ref(struct btrfs_delayed_ref_head *head,
        return found;
 }
 
-void btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
-                               struct btrfs_fs_info *fs_info)
+void btrfs_destroy_delayed_refs(struct btrfs_transaction *trans)
 {
        struct rb_node *node;
        struct btrfs_delayed_ref_root *delayed_refs = &trans->delayed_refs;
+       struct btrfs_fs_info *fs_info = trans->fs_info;
 
        spin_lock(&delayed_refs->lock);
        while ((node = rb_first_cached(&delayed_refs->href_root)) != NULL) {
index ccc040f9426484194b9a172bb7df4fdc7a896b22..cc78395f2fcd0c4a440ff3e796c3f2244227518e 100644 (file)
@@ -399,8 +399,7 @@ int btrfs_delayed_refs_rsv_refill(struct btrfs_fs_info *fs_info,
 bool btrfs_check_space_for_delayed_refs(struct btrfs_fs_info *fs_info);
 bool btrfs_find_delayed_tree_ref(struct btrfs_delayed_ref_head *head,
                                 u64 root, u64 parent);
-void btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
-                               struct btrfs_fs_info *fs_info);
+void btrfs_destroy_delayed_refs(struct btrfs_transaction *trans);
 
 static inline u64 btrfs_delayed_ref_owner(struct btrfs_delayed_ref_node *node)
 {
index f5d30c04ba6643fc55101fb482f0c515240c5a0f..2e15afa9e04cdba3963ee3d4a425faa71b8333e7 100644 (file)
@@ -4748,7 +4748,7 @@ void btrfs_cleanup_one_transaction(struct btrfs_transaction *cur_trans,
                list_del_init(&dev->post_commit_list);
        }
 
-       btrfs_destroy_delayed_refs(cur_trans, fs_info);
+       btrfs_destroy_delayed_refs(cur_trans);
 
        cur_trans->state = TRANS_STATE_COMMIT_START;
        wake_up(&fs_info->transaction_blocked_wait);