All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Borisov <nborisov@suse.com>
To: Liu Bo <bo.liu@linux.alibaba.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: remove level==0 check in balance_level
Date: Wed, 12 Sep 2018 09:42:14 +0300	[thread overview]
Message-ID: <33dc70cf-ab6d-18e4-6971-3d231cd726bd@suse.com> (raw)
In-Reply-To: <1536703587-94565-4-git-send-email-bo.liu@linux.alibaba.com>



On 12.09.2018 01:06, Liu Bo wrote:
> btrfs_search_slot()
>    if (level != 0)
>       setup_nodes_for_search()
>           balance_level()
> 
> It is just impossible to have level=0 in balance_level.
> 
> Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>

I concur with the analysis:

Reviewed-by: Nikolay Borisov <nborisov@suse.com>

> ---
>  fs/btrfs/ctree.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
> index 8b31caa60b0a..858085490e23 100644
> --- a/fs/btrfs/ctree.c
> +++ b/fs/btrfs/ctree.c
> @@ -1778,9 +1778,6 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
>  	int orig_slot = path->slots[level];
>  	u64 orig_ptr;
>  
> -	if (level == 0)
> -		return 0;
> -
>  	mid = path->nodes[level];
>  
>  	WARN_ON(path->locks[level] != BTRFS_WRITE_LOCK &&
> 

  reply	other threads:[~2018-09-12 11:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-11 22:06 [PATCH] Btrfs: remove level==0 check in balance_level Liu Bo
2018-09-12  6:42 ` Nikolay Borisov [this message]
2018-09-12 12:52 ` David Sterba
2018-09-12 19:30   ` Liu Bo
2018-09-13 17:55 ` [PATCH v2] " Liu Bo
2018-09-14 12:49   ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=33dc70cf-ab6d-18e4-6971-3d231cd726bd@suse.com \
    --to=nborisov@suse.com \
    --cc=bo.liu@linux.alibaba.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.