diff options
author | Trond Myklebust <trondmy@gmail.com> | 2019-09-20 13:23:46 +0200 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2019-09-20 21:52:44 +0200 |
commit | e217e825dca8d2d80c371b43da7257adc499404a (patch) | |
tree | 5fd5ea35aacf138c044fde46bb02e47a4c2ac617 /fs/nfs | |
parent | pNFS: Handle NFS4ERR_OLD_STATEID on layoutreturn by bumping the state seqid (diff) | |
download | linux-e217e825dca8d2d80c371b43da7257adc499404a.tar.xz linux-e217e825dca8d2d80c371b43da7257adc499404a.zip |
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>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 27964ea0b3b7..9e283a8e8e93 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -3399,7 +3399,9 @@ static void nfs4_close_done(struct rpc_task *task, void *data) task->tk_msg.rpc_cred); /* Fallthrough */ case -NFS4ERR_BAD_STATEID: - break; + if (calldata->arg.fmode == 0) + break; + /* Fallthrough */ default: task->tk_status = nfs4_async_handle_exception(task, server, task->tk_status, &exception); |