Commit cdb9095c authored by Trond Myklebust's avatar Trond Myklebust

NFSv4: Exit without Oopsing from close when servers send us crazy errors.

 If retrying the request is not an option, we should just set state->state
 and be done with it.
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 39b4fa56
...@@ -682,7 +682,6 @@ static void nfs4_close_done(struct rpc_task *task) ...@@ -682,7 +682,6 @@ static void nfs4_close_done(struct rpc_task *task)
nfs4_increment_seqid(task->tk_status, sp); nfs4_increment_seqid(task->tk_status, sp);
switch (task->tk_status) { switch (task->tk_status) {
case 0: case 0:
state->state = calldata->arg.open_flags;
memcpy(&state->stateid, &calldata->res.stateid, memcpy(&state->stateid, &calldata->res.stateid,
sizeof(state->stateid)); sizeof(state->stateid));
break; break;
...@@ -697,6 +696,7 @@ static void nfs4_close_done(struct rpc_task *task) ...@@ -697,6 +696,7 @@ static void nfs4_close_done(struct rpc_task *task)
return; return;
} }
} }
state->state = calldata->arg.open_flags;
nfs4_put_open_state(state); nfs4_put_open_state(state);
up(&sp->so_sema); up(&sp->so_sema);
nfs4_put_state_owner(sp); nfs4_put_state_owner(sp);
......
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