diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2011-07-13 00:48:36 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2011-07-13 00:48:36 +0000 |
commit | a6611ba365603e677b3155b2b2493340d8b6c04b (patch) | |
tree | 6b77664eebfd30d3edb8060c26c91651ad7c0fec /sys/fs/nfsclient | |
parent | 9ddcdc361153958f6fd170befab585e362283ac3 (diff) | |
download | FreeBSD-src-a6611ba365603e677b3155b2b2493340d8b6c04b.zip FreeBSD-src-a6611ba365603e677b3155b2b2493340d8b6c04b.tar.gz |
r222389 introduced a case where the NFSv4 client could
loop in nfscl_getcl() when a forced dismount is in progress,
because nfsv4_lock() will return 0 without sleeping when
MNTK_UNMOUNTF is set.
This patch fixes it so it won't loop calling nfsv4_lock()
for this case.
MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsclient')
-rw-r--r-- | sys/fs/nfsclient/nfs_clstate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index b136974..7ce2b8e 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -761,7 +761,8 @@ nfscl_getcl(vnode_t vp, struct ucred *cred, NFSPROC_T *p, FREE((caddr_t)newclp, M_NFSCLCLIENT); } NFSLOCKCLSTATE(); - while ((clp->nfsc_flags & NFSCLFLAGS_HASCLIENTID) == 0 && !igotlock) + while ((clp->nfsc_flags & NFSCLFLAGS_HASCLIENTID) == 0 && !igotlock && + (mp->mnt_kern_flag & MNTK_UNMOUNTF) == 0) igotlock = nfsv4_lock(&clp->nfsc_lock, 1, NULL, NFSCLSTATEMUTEXPTR, mp); if (!igotlock) |