diff mbox series

[3/4] btrfs: drop trans parameter of insert_delayed_ref

Message ID d47bb8668e2d3307923d653d781eda65582a6a1a.1670835448.git.johannes.thumshirn@wdc.com (mailing list archive)
State New, archived
Headers show
Series btrfs: delayed_ref parameter cleanup | expand

Commit Message

Johannes Thumshirn Dec. 12, 2022, 9:02 a.m. UTC
Now that drop_delayed_ref() doesn't need a btrfs_trans_handle, drop it
from insert_delayed_ref() as well.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 fs/btrfs/delayed-ref.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Qu Wenruo Dec. 12, 2022, 9:22 a.m. UTC | #1
On 2022/12/12 17:02, Johannes Thumshirn wrote:
> Now that drop_delayed_ref() doesn't need a btrfs_trans_handle, drop it
> from insert_delayed_ref() as well.
> 
> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu
> ---
>   fs/btrfs/delayed-ref.c | 7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
> index 046ba49b8f94..678ce95c04ac 100644
> --- a/fs/btrfs/delayed-ref.c
> +++ b/fs/btrfs/delayed-ref.c
> @@ -599,8 +599,7 @@ void btrfs_delete_ref_head(struct btrfs_delayed_ref_root *delayed_refs,
>    * Return 0 for insert.
>    * Return >0 for merge.
>    */
> -static int insert_delayed_ref(struct btrfs_trans_handle *trans,
> -			      struct btrfs_delayed_ref_root *root,
> +static int insert_delayed_ref(struct btrfs_delayed_ref_root *root,
>   			      struct btrfs_delayed_ref_head *href,
>   			      struct btrfs_delayed_ref_node *ref)
>   {
> @@ -976,7 +975,7 @@ int btrfs_add_delayed_tree_ref(struct btrfs_trans_handle *trans,
>   	head_ref = add_delayed_ref_head(trans, head_ref, record,
>   					action, &qrecord_inserted);
>   
> -	ret = insert_delayed_ref(trans, delayed_refs, head_ref, &ref->node);
> +	ret = insert_delayed_ref(delayed_refs, head_ref, &ref->node);
>   	spin_unlock(&delayed_refs->lock);
>   
>   	/*
> @@ -1068,7 +1067,7 @@ int btrfs_add_delayed_data_ref(struct btrfs_trans_handle *trans,
>   	head_ref = add_delayed_ref_head(trans, head_ref, record,
>   					action, &qrecord_inserted);
>   
> -	ret = insert_delayed_ref(trans, delayed_refs, head_ref, &ref->node);
> +	ret = insert_delayed_ref(delayed_refs, head_ref, &ref->node);
>   	spin_unlock(&delayed_refs->lock);
>   
>   	/*
diff mbox series

Patch

diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c
index 046ba49b8f94..678ce95c04ac 100644
--- a/fs/btrfs/delayed-ref.c
+++ b/fs/btrfs/delayed-ref.c
@@ -599,8 +599,7 @@  void btrfs_delete_ref_head(struct btrfs_delayed_ref_root *delayed_refs,
  * Return 0 for insert.
  * Return >0 for merge.
  */
-static int insert_delayed_ref(struct btrfs_trans_handle *trans,
-			      struct btrfs_delayed_ref_root *root,
+static int insert_delayed_ref(struct btrfs_delayed_ref_root *root,
 			      struct btrfs_delayed_ref_head *href,
 			      struct btrfs_delayed_ref_node *ref)
 {
@@ -976,7 +975,7 @@  int btrfs_add_delayed_tree_ref(struct btrfs_trans_handle *trans,
 	head_ref = add_delayed_ref_head(trans, head_ref, record,
 					action, &qrecord_inserted);
 
-	ret = insert_delayed_ref(trans, delayed_refs, head_ref, &ref->node);
+	ret = insert_delayed_ref(delayed_refs, head_ref, &ref->node);
 	spin_unlock(&delayed_refs->lock);
 
 	/*
@@ -1068,7 +1067,7 @@  int btrfs_add_delayed_data_ref(struct btrfs_trans_handle *trans,
 	head_ref = add_delayed_ref_head(trans, head_ref, record,
 					action, &qrecord_inserted);
 
-	ret = insert_delayed_ref(trans, delayed_refs, head_ref, &ref->node);
+	ret = insert_delayed_ref(delayed_refs, head_ref, &ref->node);
 	spin_unlock(&delayed_refs->lock);
 
 	/*