summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4callback.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-09-23 08:58:48 +0200
committerJ. Bruce Fields <bfields@redhat.com>2014-09-26 16:29:25 -0400
commit444b6e910d2a637cc144c74b15efd1b61bf737bb (patch)
tree53397fbe87fee6e7416a25daacde972ba3c5d19d /fs/nfsd/nfs4callback.c
parent70b2823535d2d884eef2d3dab0dfd0ec3da8a019 (diff)
downloadblackbird-op-linux-444b6e910d2a637cc144c74b15efd1b61bf737bb.tar.gz
blackbird-op-linux-444b6e910d2a637cc144c74b15efd1b61bf737bb.zip
nfsd: fix nfsd4_cb_recall_done error handling
For any error that is not EBADHANDLE or NFS4ERR_BAD_STATEID, nfsd4_cb_recall_done first marks the connection down, then retries until dl_retries hits zero, then marks the connection down again and sets cb_done. This changes the code to only retry for EBADHANDLE or NFS4ERR_BAD_STATEID, and factors setting cb_done into a single point in the function. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r--fs/nfsd/nfs4callback.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index e0be57b0f79b..795e218a2a98 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -874,24 +874,21 @@ static void nfsd4_cb_recall_done(struct rpc_task *task, void *calldata)
return;
switch (task->tk_status) {
case 0:
- cb->cb_done = true;
- return;
+ break;
case -EBADHANDLE:
case -NFS4ERR_BAD_STATEID:
/* Race: client probably got cb_recall
* before open reply granting delegation */
- break;
+ if (dp->dl_retries--) {
+ rpc_delay(task, 2*HZ);
+ task->tk_status = 0;
+ rpc_restart_call_prepare(task);
+ return;
+ }
default:
/* Network partition? */
nfsd4_mark_cb_down(clp, task->tk_status);
}
- if (dp->dl_retries--) {
- rpc_delay(task, 2*HZ);
- task->tk_status = 0;
- rpc_restart_call_prepare(task);
- return;
- }
- nfsd4_mark_cb_down(clp, task->tk_status);
cb->cb_done = true;
}
OpenPOWER on IntegriCloud