linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org, Peter Becker <floyd.net@gmail.com>
Subject: Re: [PATCH] Btrfs: fix read_node_slot to return errors
Date: Tue, 5 Jul 2016 10:51:55 -0700	[thread overview]
Message-ID: <20160705175155.GA16941@localhost.localdomain> (raw)
In-Reply-To: <20160704170818.GK13336@twin.jikos.cz>

On Mon, Jul 04, 2016 at 07:08:18PM +0200, David Sterba wrote:
> On Tue, Jun 28, 2016 at 06:55:48PM -0700, Liu Bo wrote:
> > @@ -5238,6 +5256,10 @@ static void tree_move_down(struct btrfs_root *root,
> >  					path->slots[*level]);
> >  	path->slots[*level - 1] = 0;
> >  	(*level)--;
> > +
> > +	if (IS_ERR(path->nodes[*level - 1]))
> > +		return PTR_ERR(path->nodes[*level - 1]);
> 
> Is this right? *level changes since the call to read_node_slot so I
> don't understand which value are we actually testing for error.

Uh, it should check the returned btree block, not after (*level)--;


> 
> Otherwise looks good.

Thanks for reviewing this.

Thanks,

-liubo

  reply	other threads:[~2016-07-05 17:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29  1:55 [PATCH] Btrfs: fix read_node_slot to return errors Liu Bo
2016-07-04 17:08 ` David Sterba
2016-07-05 17:51   ` Liu Bo [this message]
2016-07-05 19:10 ` [PATCH v2] " Liu Bo
2016-07-07 12:05   ` 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=20160705175155.GA16941@localhost.localdomain \
    --to=bo.li.liu@oracle.com \
    --cc=dsterba@suse.cz \
    --cc=floyd.net@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).