Re: [PATCH RESEND] btrfs: Fix exception handling in relocating_repair_kthread()
From: Dan Carpenter
Date: Tue Mar 04 2025 - 01:38:46 EST
On Tue, Mar 04, 2025 at 01:34:00AM +0000, Naohiro Aota wrote:
> On Tue Mar 4, 2025 at 5:31 AM JST, Markus Elfring wrote:
> > From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> > Date: Wed, 22 Mar 2023 20:10:09 +0100
> >
> > The label “out” was used to jump to another pointer check despite of
> > the detail in the implementation of the function
> > “relocating_repair_kthread” that it was determined already that
> > a corresponding variable contained a null pointer because of
> > a failed call of the function “btrfs_lookup_block_group”.
> >
> > * Thus use more appropriate labels instead.
> >
> > * Delete a redundant check.
> >
> >
> > This issue was detected by using the Coccinelle software.
>
> Since this function is local to the zoned feature, could I have "zoned: "
> added to the subject line?
>
> Other than that, it looks reasonable to me.
>
> Reviewed-by: Naohiro Aota <naohiro.aota@xxxxxxx>
>
> >
> > Fixes: f7ef5287a63d ("btrfs: zoned: relocate block group to repair IO failure in zoned filesystems")
> > Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Don't use Fixes tags, if it's not a bug fix.
regards,
dan carpenter