[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <99053f27-621e-449c-9d88-f8f82300cd97@gmx.com>
Date: Fri, 4 Oct 2024 06:41:35 +0930
From: Qu Wenruo <quwenruo.btrfs@....com>
To: linux@...blig.org, clm@...com, josef@...icpanda.com, dsterba@...e.com,
hch@....de
Cc: rostedt@...dmis.org, mhiramat@...nel.org, mathieu.desnoyers@...icios.com,
linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] btrfs: Remove unused btrfs_try_tree_write_lock
在 2024/10/3 23:57, linux@...blig.org 写道:
> From: "Dr. David Alan Gilbert" <linux@...blig.org>
>
> btrfs_try_tree_write_lock() is unused since commit
> 50b21d7a066f ("btrfs: submit a writeback bio per extent_buffer")
>
> Remove it (and it's associated trace).
>
> Signed-off-by: Dr. David Alan Gilbert <linux@...blig.org>
Reviewed-by: Qu Wenruo <wqu@...e.com>
Thanks,
Qu
> ---
> fs/btrfs/locking.c | 15 ---------------
> fs/btrfs/locking.h | 1 -
> include/trace/events/btrfs.h | 1 -
> 3 files changed, 17 deletions(-)
>
> diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c
> index 6a0b7abb5bd9..9a7a7b723305 100644
> --- a/fs/btrfs/locking.c
> +++ b/fs/btrfs/locking.c
> @@ -161,21 +161,6 @@ int btrfs_try_tree_read_lock(struct extent_buffer *eb)
> return 0;
> }
>
> -/*
> - * Try-lock for write.
> - *
> - * Return 1 if the rwlock has been taken, 0 otherwise
> - */
> -int btrfs_try_tree_write_lock(struct extent_buffer *eb)
> -{
> - if (down_write_trylock(&eb->lock)) {
> - btrfs_set_eb_lock_owner(eb, current->pid);
> - trace_btrfs_try_tree_write_lock(eb);
> - return 1;
> - }
> - return 0;
> -}
> -
> /*
> * Release read lock.
> */
> diff --git a/fs/btrfs/locking.h b/fs/btrfs/locking.h
> index 3c15c75e0582..46c8be2afab1 100644
> --- a/fs/btrfs/locking.h
> +++ b/fs/btrfs/locking.h
> @@ -180,7 +180,6 @@ static inline void btrfs_tree_read_lock(struct extent_buffer *eb)
>
> void btrfs_tree_read_unlock(struct extent_buffer *eb);
> int btrfs_try_tree_read_lock(struct extent_buffer *eb);
> -int btrfs_try_tree_write_lock(struct extent_buffer *eb);
> struct extent_buffer *btrfs_lock_root_node(struct btrfs_root *root);
> struct extent_buffer *btrfs_read_lock_root_node(struct btrfs_root *root);
> struct extent_buffer *btrfs_try_read_lock_root_node(struct btrfs_root *root);
> diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h
> index bf60ad50011e..9b8d41a00234 100644
> --- a/include/trace/events/btrfs.h
> +++ b/include/trace/events/btrfs.h
> @@ -2341,7 +2341,6 @@ DEFINE_BTRFS_LOCK_EVENT(btrfs_tree_read_unlock_blocking);
> DEFINE_BTRFS_LOCK_EVENT(btrfs_set_lock_blocking_read);
> DEFINE_BTRFS_LOCK_EVENT(btrfs_set_lock_blocking_write);
> DEFINE_BTRFS_LOCK_EVENT(btrfs_try_tree_read_lock);
> -DEFINE_BTRFS_LOCK_EVENT(btrfs_try_tree_write_lock);
> DEFINE_BTRFS_LOCK_EVENT(btrfs_tree_read_lock_atomic);
>
> DECLARE_EVENT_CLASS(btrfs__space_info_update,
Powered by blists - more mailing lists