svn commit: r223971 - head/sys/fs/nfsclient
Rick Macklem
rmacklem at FreeBSD.org
Wed Jul 13 00:48:36 UTC 2011
Author: rmacklem
Date: Wed Jul 13 00:48:36 2011
New Revision: 223971
URL: http://svn.freebsd.org/changeset/base/223971
Log:
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
Modified:
head/sys/fs/nfsclient/nfs_clstate.c
Modified: head/sys/fs/nfsclient/nfs_clstate.c
==============================================================================
--- head/sys/fs/nfsclient/nfs_clstate.c Tue Jul 12 23:48:57 2011 (r223970)
+++ head/sys/fs/nfsclient/nfs_clstate.c Wed Jul 13 00:48:36 2011 (r223971)
@@ -761,7 +761,8 @@ nfscl_getcl(vnode_t vp, struct ucred *cr
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)
More information about the svn-src-all
mailing list