Commit 1f0a6b3f authored by Trond Myklebust's avatar Trond Myklebust Committed by Anna Schumaker

NFSv4: Add support for OPEN4_RESULT_NO_OPEN_STATEID

If the server returns a delegation stateid only, then don't try to set
an open stateid.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarLance Shelton <lance.shelton@hammerspace.com>
Reviewed-by: default avatarJeff Layton <jlayton@kernel.org>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
parent d2a00cce
...@@ -2035,8 +2035,11 @@ _nfs4_opendata_reclaim_to_nfs4_state(struct nfs4_opendata *data) ...@@ -2035,8 +2035,11 @@ _nfs4_opendata_reclaim_to_nfs4_state(struct nfs4_opendata *data)
data->o_arg.claim, data->o_arg.claim,
&data->o_res.delegation); &data->o_res.delegation);
if (!update_open_stateid(state, &data->o_res.stateid, if (!(data->o_res.rflags & NFS4_OPEN_RESULT_NO_OPEN_STATEID)) {
NULL, data->o_arg.fmode)) if (!update_open_stateid(state, &data->o_res.stateid,
NULL, data->o_arg.fmode))
return ERR_PTR(-EAGAIN);
} else if (!update_open_stateid(state, NULL, NULL, data->o_arg.fmode))
return ERR_PTR(-EAGAIN); return ERR_PTR(-EAGAIN);
refcount_inc(&state->count); refcount_inc(&state->count);
...@@ -2105,8 +2108,13 @@ _nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data) ...@@ -2105,8 +2108,13 @@ _nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data)
data->o_arg.claim, data->o_arg.claim,
&data->o_res.delegation); &data->o_res.delegation);
if (!update_open_stateid(state, &data->o_res.stateid, if (!(data->o_res.rflags & NFS4_OPEN_RESULT_NO_OPEN_STATEID)) {
NULL, data->o_arg.fmode)) { if (!update_open_stateid(state, &data->o_res.stateid,
NULL, data->o_arg.fmode)) {
nfs4_put_open_state(state);
state = ERR_PTR(-EAGAIN);
}
} else if (!update_open_stateid(state, NULL, NULL, data->o_arg.fmode)) {
nfs4_put_open_state(state); nfs4_put_open_state(state);
state = ERR_PTR(-EAGAIN); state = ERR_PTR(-EAGAIN);
} }
......
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