aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/nfs/nfs_var.h2
-rw-r--r--sys/fs/nfsclient/nfs_clrpcops.c2
-rw-r--r--sys/fs/nfsclient/nfs_clstate.c12
3 files changed, 8 insertions, 8 deletions
diff --git a/sys/fs/nfs/nfs_var.h b/sys/fs/nfs/nfs_var.h
index 9c5a5ca5c729..3f0fbc535166 100644
--- a/sys/fs/nfs/nfs_var.h
+++ b/sys/fs/nfs/nfs_var.h
@@ -631,7 +631,7 @@ void nfscl_deleggetmodtime(vnode_t, struct timespec *);
int nfscl_trydelegreturn(struct nfscldeleg *, struct ucred *,
struct nfsmount *, NFSPROC_T *);
int nfscl_tryclose(struct nfsclopen *, struct ucred *,
- struct nfsmount *, NFSPROC_T *);
+ struct nfsmount *, NFSPROC_T *, bool);
void nfscl_cleanup(NFSPROC_T *);
int nfscl_layout(struct nfsmount *, vnode_t, u_int8_t *, int, nfsv4stateid_t *,
int, int, struct nfsclflayouthead *, struct nfscllayout **, struct ucred *,
diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c
index 1c72269dc276..04597a27edfa 100644
--- a/sys/fs/nfsclient/nfs_clrpcops.c
+++ b/sys/fs/nfsclient/nfs_clrpcops.c
@@ -841,7 +841,7 @@ nfsrpc_doclose(struct nfsmount *nmp, struct nfsclopen *op, NFSPROC_T *p)
nfscl_lockexcl(&op->nfso_own->nfsow_rwlock, NFSCLSTATEMUTEXPTR);
NFSUNLOCKCLSTATE();
do {
- error = nfscl_tryclose(op, tcred, nmp, p);
+ error = nfscl_tryclose(op, tcred, nmp, p, true);
if (error == NFSERR_GRACE)
(void) nfs_catnap(PZERO, error, "nfs_close");
} while (error == NFSERR_GRACE);
diff --git a/sys/fs/nfsclient/nfs_clstate.c b/sys/fs/nfsclient/nfs_clstate.c
index 40bf5b41361a..d3ce1c6bef8b 100644
--- a/sys/fs/nfsclient/nfs_clstate.c
+++ b/sys/fs/nfsclient/nfs_clstate.c
@@ -2399,7 +2399,7 @@ nfscl_recover(struct nfsclclient *clp, bool *retokp, struct ucred *cred,
LIST_FOREACH_SAFE(op, &extra_open, nfso_list, nop) {
do {
newnfs_copycred(&op->nfso_cred, tcred);
- error = nfscl_tryclose(op, tcred, nmp, p);
+ error = nfscl_tryclose(op, tcred, nmp, p, true);
if (error == NFSERR_GRACE)
(void) nfs_catnap(PZERO, error, "nfsexcls");
} while (error == NFSERR_GRACE);
@@ -4506,24 +4506,24 @@ nfscl_trydelegreturn(struct nfscldeleg *dp, struct ucred *cred,
*/
int
nfscl_tryclose(struct nfsclopen *op, struct ucred *cred,
- struct nfsmount *nmp, NFSPROC_T *p)
+ struct nfsmount *nmp, NFSPROC_T *p, bool loop_on_delayed)
{
struct nfsrv_descript nfsd, *nd = &nfsd;
int error;
do {
error = nfsrpc_closerpc(nd, nmp, op, cred, p, 0);
- if (error == NFSERR_DELAY)
+ if (loop_on_delayed && error == NFSERR_DELAY)
(void) nfs_catnap(PZERO, error, "nfstrycl");
- } while (error == NFSERR_DELAY);
+ } while (loop_on_delayed && error == NFSERR_DELAY);
if (error == EAUTH || error == EACCES) {
/* Try again using system credentials */
newnfs_setroot(cred);
do {
error = nfsrpc_closerpc(nd, nmp, op, cred, p, 1);
- if (error == NFSERR_DELAY)
+ if (loop_on_delayed && error == NFSERR_DELAY)
(void) nfs_catnap(PZERO, error, "nfstrycl");
- } while (error == NFSERR_DELAY);
+ } while (loop_on_delayed && error == NFSERR_DELAY);
}
return (error);
}