Re: [RESEBD PATCH v3] bcache: Remove some unnecessary NULL point check for the return value of __bch_btree_node_alloc-related pointer
From: Zheng Hacker
Date: Sat Feb 18 2023 - 02:06:48 EST
Eric Wheeler <bcache@xxxxxxxxxxxxxxxxxx> 于2023年2月18日周六 05:57写道:
>
> On Fri, 17 Feb 2023, Zheng Wang wrote:
>
> > Due to the previously fix of __bch_btree_node_alloc, the return value will
> > never be a NULL pointer. So IS_ERR is enough to handle the failure
> > situation. Fix it by replacing IS_ERR_OR_NULL check to IS_ERR check.
> >
> > Fixes: cafe56359144 ("bcache: A block layer cache")
> > Cc: stable@xxxxxxxxxxxxxxx
> > Signed-off-by: Zheng Wang <zyytlz.wz@xxxxxxx>
> > ---
> > v3:
> > - Add Cc: stable@xxxxxxxxxxxxxxx suggested by Eric
>
> Make sure that the commit
> bcache: Fix __bch_btree_node_alloc to make the failure behavior consistent
> is committed _before_ this "Remove some unnecessary NULL point check..."
> patch.
Oh, sorry for my mistake. I forgot to commit the first patch. I'll try
to commit it first.
>
> It would be a good idea to add "this patch depends on `bcache: Fix
> __bch_btree_node_alloc to make the failure behavior consistent`" to the
> commit message so the stable maintainers know.
Yes, I will append that msg in the next version.
Best regargds,
Zheng