diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2010-04-15 23:56:05 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2010-04-15 23:56:05 +0000 |
commit | 2475682bb00e04f6926af142db9e2576de10cd7b (patch) | |
tree | a0172e0a46f5ac2404783adcf0b60619f40dd275 /sys/fs | |
parent | 78fcb82b983e608ccfb4e20828f57e55269366a4 (diff) | |
download | FreeBSD-src-2475682bb00e04f6926af142db9e2576de10cd7b.zip FreeBSD-src-2475682bb00e04f6926af142db9e2576de10cd7b.tar.gz |
Add mutex lock calls to 2 cases in the experimental NFS client's
renew thread where they were missing.
MFC after: 1 week
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/nfsclient/nfs_clstate.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index 08150a7..7bccbfc 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -2318,7 +2318,9 @@ nfscl_renewthread(struct nfsclclient *clp, NFSPROC_T *p) int error, cbpathdown, islept, igotlock, ret, clearok; cred = newnfs_getcred(); + NFSLOCKCLSTATE(); clp->nfsc_flags |= NFSCLFLAGS_HASTHREAD; + NFSUNLOCKCLSTATE(); for(;;) { newnfs_setroot(cred); cbpathdown = 0; @@ -2331,9 +2333,11 @@ nfscl_renewthread(struct nfsclclient *clp, NFSPROC_T *p) error = nfsrpc_renew(clp, cred, p); if (error == NFSERR_CBPATHDOWN) cbpathdown = 1; - else if (error == NFSERR_STALECLIENTID) + else if (error == NFSERR_STALECLIENTID) { + NFSLOCKCLSTATE(); clp->nfsc_flags |= NFSCLFLAGS_RECOVER; - else if (error == NFSERR_EXPIRED) + NFSUNLOCKCLSTATE(); + } else if (error == NFSERR_EXPIRED) (void) nfscl_hasexpired(clp, clidrev, p); } |