Skip to content

Commit e217e82

Browse files
trondmyamschuma-ntap
authored andcommitted
NFSv4: Fix OPEN_DOWNGRADE error handling
If OPEN_DOWNGRADE returns a state error, then we want to initiate state recovery in addition to marking the stateid as closed. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent 30cb3ee commit e217e82

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/nfs/nfs4proc.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3399,7 +3399,9 @@ static void nfs4_close_done(struct rpc_task *task, void *data)
33993399
task->tk_msg.rpc_cred);
34003400
/* Fallthrough */
34013401
case -NFS4ERR_BAD_STATEID:
3402-
break;
3402+
if (calldata->arg.fmode == 0)
3403+
break;
3404+
/* Fallthrough */
34033405
default:
34043406
task->tk_status = nfs4_async_handle_exception(task,
34053407
server, task->tk_status, &exception);

0 commit comments

Comments
 (0)