HomeFreeBSD

nfscl: add check for NULL clp and forced dismounts to nfscl_delegreturnvp()

Description

nfscl: add check for NULL clp and forced dismounts to nfscl_delegreturnvp()

Commit aad780464fad added a function called nfscl_delegreturnvp()
to return delegations during the NFS VOP_RECLAIM().
The function erroneously assumed that nm_clp would
be non-NULL. It will be NULL for NFSV4.0 mounts until
a regular file is opened. It will also be NULL during
vflush() in nfs_unmount() for a forced dismount.

This patch adds a check for clp == NULL to fix this.

Also, since it makes no sense to call nfscl_delegreturnvp()
during a forced dismount, the patch adds a check for that
case and does not do the call during forced dismounts.

PR: 255436
Reported by: ish@amail.plala.or.jp
MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on Apr 28 2021, 12:30 AM
Parents
rGdb8c27f49910: nfsd: fix a NFSv4.1 Linux client mount stuck in CLOSE_WAIT
Branches
Unknown
Tags
Unknown