Re: [PATCH] ocfs2: make ocfs2_calc_xattr_init() return void

From: Andrew Morton

Date: Fri Sep 04 2026 - 00:39:07 EST


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?