Re: [PATCH] nfs: add dummy definition for nfsd_file

Vincent Mailhol
2025-04-09T12:18:47Z

On 27/03/2025 at 00:09, Mike Snitzer wrote:
> Add dummy definition for nfsd_file in both nfslocalio.c and localio.c
> so older gcc (e.g. EL8's 8.5.0) can be used. Older gcc causes RCU
> code (rcu_dereference and rcu_access_pointer) to dereference what
> should just be an opaque pointer with its use of typeof.
>
> So without the dummy definition compiling with older gcc fails.

Same issue on GCC 9.5.0 and I confirmed that this fixes the issue. So:

Tested-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>

> Link: https://lore.kernel.org/all/Zsyhco1OrOI_uSbd@kernel.org/
> Fixes: 55a9742d02eff ("nfs: cache all open LOCALIO nfsd_file(s) in client")
> Signed-off-by: Mike Snitzer <snitzer@hammerspace.com>

Results from checkpatch.pl:

WARNING: Unknown commit id '55a9742d02eff', maybe rebased or not pulled?
#63:
Fixes: 55a9742d02eff ("nfs: cache all open LOCALIO nfsd_file(s) in
client")

WARNING: From:/Signed-off-by: email address mismatch: 'From: Mike
Snitzer <snitzer@kernel.org>' != 'Signed-off-by: Mike Snitzer
<snitzer@hammerspace.com>'

total: 0 errors, 2 warnings, 28 lines checked

For the first one, I think that the correct commit hash is:

86e00412254a ("nfs: cache all open LOCALIO nfsd_file(s) in client")
Link: https://git.kernel.org/torvalds/c/86e00412254a

Unless someone already picked up the patch, you should probably fix
those and resend.

Yours sincerely,
Vincent Mailhol