Re: [PATCH] Btrfs: fix read_node_slot to return errors

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

 



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
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[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