Commit 172c85dd authored by J. Bruce Fields's avatar J. Bruce Fields

nfsd4: treat more recall errors as failures

If a recall fails for some unexpected reason, instead of ignoring it and
treating it like a success, it's safer to treat it as a failure,
preventing further delgation grants and returning CB_PATH_DOWN.

Also put put switches in a (two me) more logical order, with normal case
first.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
parent 378b7d37
...@@ -667,24 +667,23 @@ static void nfsd4_cb_recall_done(struct rpc_task *task, void *calldata) ...@@ -667,24 +667,23 @@ static void nfsd4_cb_recall_done(struct rpc_task *task, void *calldata)
} }
switch (task->tk_status) { switch (task->tk_status) {
case -EIO: case 0:
/* Network partition? */
atomic_set(&clp->cl_cb_set, 0);
warn_no_callback_path(clp, task->tk_status);
if (current_rpc_client != task->tk_client) {
/* queue a callback on the new connection: */
nfsd4_cb_recall(dp);
return; return;
}
case -EBADHANDLE: case -EBADHANDLE:
case -NFS4ERR_BAD_STATEID: case -NFS4ERR_BAD_STATEID:
/* Race: client probably got cb_recall /* Race: client probably got cb_recall
* before open reply granting delegation */ * before open reply granting delegation */
break; break;
default: default:
/* success, or error we can't handle */ /* Network partition? */
atomic_set(&clp->cl_cb_set, 0);
warn_no_callback_path(clp, task->tk_status);
if (current_rpc_client != task->tk_client) {
/* queue a callback on the new connection: */
nfsd4_cb_recall(dp);
return; return;
} }
}
if (dp->dl_retries--) { if (dp->dl_retries--) {
rpc_delay(task, 2*HZ); rpc_delay(task, 2*HZ);
task->tk_status = 0; task->tk_status = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment