Re: [PATCH] ocfs2: make ocfs2_calc_xattr_init() return void
From: Joseph Qi
Date: Fri Sep 04 2026 - 03:16:16 EST
On 9/4/26 12:36 PM, Andrew Morton wrote:
> On Fri, 4 Sep 2026 10:37:51 +0800 Joseph Qi <joseph.qi@xxxxxxxxxxxxxxxxx> wrote:
>
>> ocfs2_calc_xattr_init() used to read the default ACL off the parent
>> inode itself, so it could return an error from ocfs2_xattr_get_nolock().
>> Commit bd7c05fb4a47 ("ocfs2: fix circular locking dependency in
>> ocfs2_init_acl()") moved that lookup before the transaction starts and
>> deleted the error path, but left the now vestigial 'int ret = 0'
>> declaration and both 'return ret' statements behind, along with an
>> unreachable error branch in ocfs2_mknod().
>>
>> Drop the leftover variable and convert the return type to void, so the
>> callee states that it always succeeds and the caller no longer carries
>> a check that can never trigger.
>>
>> No functional change.
>
> Thanks.
>
>> Fixes: bd7c05fb4a47 ("ocfs2: fix circular locking dependency in ocfs2_init_acl()")
>> Reported-by: kernel test robot <lkp@xxxxxxxxx>
>> Closes: https://lore.kernel.org/oe-kbuild-all/202609040247.8B3lmoqX-lkp@xxxxxxxxx/
>
> Gee, that's a bit picky, isn't it?
It's indeed a trivial fix.
I've followed the report mail to add the tags and I think it may help
kernel test robot tracking.
Thanks,
Joseph