btrfs: drop unused trans parameter of drop_delayed_ref
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Mon, 12 Dec 2022 09:02:46 +0000 (01:02 -0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 13 Feb 2023 16:50:32 +0000 (17:50 +0100)
drop_delayed_ref() doesn't use the btrfs_trans_handle it gets passed in,
so remove it.

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

index 573ebab886e2318098a307e87a37f81cc24005df..663e7493926feab8da0cbca9880d24fc41933e60 100644 (file)
@@ -437,8 +437,7 @@ int btrfs_delayed_ref_lock(struct btrfs_delayed_ref_root *delayed_refs,
        return 0;
 }
 
-static inline void drop_delayed_ref(struct btrfs_trans_handle *trans,
-                                   struct btrfs_delayed_ref_root *delayed_refs,
+static inline void drop_delayed_ref(struct btrfs_delayed_ref_root *delayed_refs,
                                    struct btrfs_delayed_ref_head *head,
                                    struct btrfs_delayed_ref_node *ref)
 {
@@ -482,10 +481,10 @@ static bool merge_ref(struct btrfs_trans_handle *trans,
                        mod = -next->ref_mod;
                }
 
-               drop_delayed_ref(trans, delayed_refs, head, next);
+               drop_delayed_ref(delayed_refs, head, next);
                ref->ref_mod += mod;
                if (ref->ref_mod == 0) {
-                       drop_delayed_ref(trans, delayed_refs, head, ref);
+                       drop_delayed_ref(delayed_refs, head, ref);
                        done = true;
                } else {
                        /*
@@ -641,7 +640,7 @@ static int insert_delayed_ref(struct btrfs_trans_handle *trans,
 
        /* remove existing tail if its ref_mod is zero */
        if (exist->ref_mod == 0)
-               drop_delayed_ref(trans, root, href, exist);
+               drop_delayed_ref(root, href, exist);
        spin_unlock(&href->lock);
        return ret;
 inserted: