diff options
author | Rick Macklem <rmacklem@FreeBSD.org> | 2021-06-03 01:13:21 +0000 |
---|---|---|
committer | Rick Macklem <rmacklem@FreeBSD.org> | 2021-06-03 01:13:21 +0000 |
commit | 7f527ae46b061c056fd395f46daf0481e2a292b8 (patch) | |
tree | b34763eeceb3cdb3d556c9d38018769b609b43ce | |
parent | c8773c8018e74a34a5d9e7ec6d66f4311148f975 (diff) | |
download | src-7f527ae46b061c056fd395f46daf0481e2a292b8.tar.gz src-7f527ae46b061c056fd395f46daf0481e2a292b8.zip |
nfscl: Revert commit 5a8b2c5a46dffa3828ad16abee36ac4676f741bf
This is a direct commit, since the MFC mis-merged.
-rw-r--r-- | sys/fs/nfsclient/nfs_clstate.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c index e1b9d37b3a3e..e705af31185b 100644 --- a/sys/fs/nfsclient/nfs_clstate.c +++ b/sys/fs/nfsclient/nfs_clstate.c @@ -1977,7 +1977,6 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p) u_int32_t delegtype = NFSV4OPEN_DELEGATEWRITE, mode; int i, igotlock = 0, error, trycnt, firstlock; struct nfscllayout *lyp, *nlyp; - bool recovered_one; /* * First, lock the client structure, so everyone else will @@ -2051,7 +2050,6 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p) * Now traverse the state lists, doing Open and Lock Reclaims. */ tcred = newnfs_getcred(); - recovered_one = false; owp = LIST_FIRST(&clp->nfsc_owner); while (owp != NULL) { nowp = LIST_NEXT(owp, nfsow_list); @@ -2085,7 +2083,6 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p) op->nfso_mode, op, NULL, 0, &ndp, 1, delegtype, tcred, p); if (!error) { - recovered_one = true; /* Handle any replied delegation */ if (ndp != NULL && ((ndp->nfsdl_flags & NFSCLDL_WRITE) || NFSMNT_RDONLY(nmp->nm_mountp))) { @@ -2144,21 +2141,6 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p) nfscl_freelockowner(lp, 0); lp = nlp; } - } else if (error == NFSERR_NOGRACE && !recovered_one && - NFSHASNFSV4N(nmp)) { - /* - * For NFSv4.1/4.2, the NFSERR_EXPIRED case will - * actually end up here, since the client will do - * a recovery for NFSERR_BADSESSION, but will get - * an NFSERR_NOGRACE reply for the first "reclaim" - * attempt. - * So, call nfscl_expireclient() to recover the - * opens as best we can and then do a reclaim - * complete and return. - */ - nfsrpc_reclaimcomplete(nmp, cred, p); - nfscl_expireclient(clp, nmp, tcred, p); - goto out; } } if (error != 0 && error != NFSERR_BADSESSION) @@ -2245,23 +2227,6 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p) if (error) { if (nop != NULL) free(nop, M_NFSCLOPEN); - if (error == NFSERR_NOGRACE && !recovered_one && - NFSHASNFSV4N(nmp)) { - /* - * For NFSv4.1/4.2, the NFSERR_EXPIRED case will - * actually end up here, since the client will do - * a recovery for NFSERR_BADSESSION, but will get - * an NFSERR_NOGRACE reply for the first "reclaim" - * attempt. - * So, call nfscl_expireclient() to recover the - * opens as best we can and then do a reclaim - * complete and return. - */ - nfsrpc_reclaimcomplete(nmp, cred, p); - nfscl_expireclient(clp, nmp, tcred, p); - free(nowp, M_NFSCLOWNER); - goto out; - } /* * Couldn't reclaim it, so throw the state * away. Ouch!! @@ -2269,7 +2234,6 @@ nfscl_recover(struct nfsclclient *clp, struct ucred *cred, NFSPROC_T *p) nfscl_cleandeleg(dp); nfscl_freedeleg(&clp->nfsc_deleg, dp, true); } else { - recovered_one = true; LIST_INSERT_HEAD(&extra_open, nop, nfso_list); } } |