Re: [PATCH 3/3] btrfs: ctree: Remove stalled comment of setting up path lock

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 10.09.19 г. 10:40 ч., Qu Wenruo wrote:
> The following comment shows up in btrfs_search_slot() with out much
> sense:
> 
> 	/*
> 	 * setup the path here so we can release it under lock
> 	 * contention with the cow code
> 	 */
> 	if (cow) {
> 		/* code touching path->lock[] is far away from here */
> 	}
> 
> It turns out that just some stalled comment which is not cleaned up
> properly.
> 
> The original code is introduced in commit 65b51a009e29
> ("btrfs_search_slot: reduce lock contention by cowing in two stages"):
> +
> +               /*
> +                * setup the path here so we can release it under lock
> +                * contention with the cow code
> +                */
> +               p->nodes[level] = b;
> +               if (!p->skip_locking)
> +                       p->locks[level] = 1;
> +
> 
> But in current code base, we have different timing modifying path lock,
> so just remove that stalled comment.
> 
> Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>

Reviewed-by: Nikolay Borisov <nborisov@xxxxxxxx>

> ---
>  fs/btrfs/ctree.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
> index 3be8b32c0d37..a2e264190eee 100644
> --- a/fs/btrfs/ctree.c
> +++ b/fs/btrfs/ctree.c
> @@ -2764,10 +2764,6 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root *root,
>  		int dec = 0;
>  		level = btrfs_header_level(b);
>  
> -		/*
> -		 * setup the path here so we can release it under lock
> -		 * contention with the cow code
> -		 */
>  		if (cow) {
>  			bool last_level = (level == (BTRFS_MAX_LEVEL - 1));
>  
> 



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux