summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/nfsd/nfs4state.c20
-rw-r--r--include/linux/nfsd/nfsd.h1
2 files changed, 11 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 1d7e08251965..eb6e42fc1aa8 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1809,19 +1809,19 @@ nfsd4_renew(clientid_t *clid)
status = nfserr_stale_clientid;
if (STALE_CLIENTID(clid))
goto out;
- status = nfs_ok;
clp = find_confirmed_client(clid);
- if (clp) {
- renew_client(clp);
+ status = nfserr_expired;
+ if (clp == NULL) {
+ /* We assume the client took too long to RENEW. */
+ dprintk("nfsd4_renew: clientid not found!\n");
goto out;
}
- /*
- * Couldn't find an nfs4_client for this clientid.
- * Presumably this is because the client took too long to
- * RENEW, so return NFS4ERR_EXPIRED.
- */
- dprintk("nfsd4_renew: clientid not found!\n");
- status = nfserr_expired;
+ renew_client(clp);
+ status = nfserr_cb_path_down;
+ if (!list_empty(&clp->cl_del_perclnt)
+ && !atomic_read(&clp->cl_callback.cb_set))
+ goto out;
+ status = nfs_ok;
out:
nfs4_unlock_state();
return status;
diff --git a/include/linux/nfsd/nfsd.h b/include/linux/nfsd/nfsd.h
index ae14a0124ea1..af61d7bb9f44 100644
--- a/include/linux/nfsd/nfsd.h
+++ b/include/linux/nfsd/nfsd.h
@@ -209,6 +209,7 @@ void nfsd_lockd_shutdown(void);
#define nfserr_no_grace __constant_htonl(NFSERR_NO_GRACE)
#define nfserr_reclaim_bad __constant_htonl(NFSERR_RECLAIM_BAD)
#define nfserr_badname __constant_htonl(NFSERR_BADNAME)
+#define nfserr_cb_path_down __constant_htonl(NFSERR_CB_PATH_DOWN)
/* error codes for internal use */
/* if a request fails due to kmalloc failure, it gets dropped.