Re: [PATCH] xfs: fix temporary cursor leak in btree shift corruption paths

From: Jianyun Gao

Date: Tue Nov 03 2026 - 09:23:22 EST


Hi Markus,
Thanks for the review and the suggestion. I agree that centralizing
the error handling paths in these functions would improve readability.
However, to keep this patch focused strictly on the cursor leak fix
(as per the 'one patch, one thing' principle), I would prefer to
submit the code clean-up as a separate follow-up patch if that's
acceptable. I will review the affected functions and see if there are
any obvious style issues worth addressing.
Best regards,
Jianyun

On Tue, Nov 3, 2026 at 6:43 PM Markus Elfring <Markus.Elfring@xxxxxx> wrote:
>
> …
> > held by the duplicated cursor. Jump to error1 instead, which calls
> > xfs_btree_del_cursor(tcur, XFS_BTREE_ERROR) to properly release all
> > resources.
>
> Can further source code clean-up become helpful for affected function implementations?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-style.rst?h=v7.4-rc1#n526
>
> Regards,
> Markus