From: Trond Myklebust Date: Fri, 20 Sep 2019 11:23:46 +0000 (-0400) Subject: NFSv4: Fix OPEN_DOWNGRADE error handling X-Git-Tag: v5.4-rc1~40^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e217e825dca8d2d80c371b43da7257adc499404a;p=thirdparty%2Fkernel%2Flinux.git 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 Signed-off-by: Anna Schumaker --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 27964ea0b3b75..9e283a8e8e93b 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);