HomeFreeBSD

nfsd: Avoid relocking vnode for NFSv4 Readdir

Description

nfsd: Avoid relocking vnode for NFSv4 Readdir

Without this patch, nfsv4_fillattr() relocks the vnode to
test to see if extended attributes are supported.
This is inefficient and could cause deadlocks if Readdir
ever asks for this attribute.

At this time, no extant NFSv4 client asks for this attribute
for Readdir, but this patch fixes the problem in case a
future client does so, by moving the test for extended attribute
support to before the nfsv4_fillattr() call where the vnode
is still locked.

MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on Jul 19 2025, 10:45 PM
Parents
rGb153804256c5: mld: allow sysctls to be set per vnet
Branches
Unknown
Tags
Unknown