[Devel] [PATCH vz7] fuse: writepages search nits

Kirill Tkhai ktkhai at virtuozzo.com
Fri Apr 7 11:58:29 PDT 2017


On 07.04.2017 20:59, Maxim Patlasov wrote:
> The patch removes redundant checks in rb-tree search. Thanks to
> Kirill Tkhai for pointing out.
> 
> https://jira.sw.ru/browse/PSBM-59254
> 
> Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>

Reviewed-by: Kirill Tkhai <ktkhai at virtuozzo.com>

> ---
>  fs/fuse/file.c |    9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
> index eab5030..4f62237 100644
> --- a/fs/fuse/file.c
> +++ b/fs/fuse/file.c
> @@ -507,10 +507,6 @@ static bool fuse_range_is_writeback(struct inode *inode, pgoff_t idx_from,
>  	spin_lock(&fc->lock);
>  
>  	n = fi->writepages.rb_node;
> -	if (!n) {
> -		spin_unlock(&fc->lock);
> -		return false;
> -	}
>  
>  	while (n) {
>  		struct fuse_req *req;
> @@ -550,11 +546,6 @@ static bool fuse_page_is_writeback(struct inode *inode, pgoff_t index)
>  	spin_lock(&fc->lock);
>  
>  	n = fi->writepages.rb_node;
> -	if (!n) {
> -		spin_unlock(&fc->lock);
> -		return false;
> -	}
> -
>  
>  	while (n) {
>  		struct fuse_req *req;
> 


More information about the Devel mailing list