NFSv4: Don't use the zero stateid with layoutget
The NFSv4.1 protocol explicitly forbids us from using the zero stateid together with layoutget, so when we see that nfs4_select_rw_stateid() is unable to return a valid delegation, lock or open stateid, then we should initiate recovery and retry. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
@@ -1064,8 +1064,7 @@ int nfs4_select_rw_stateid(struct nfs4_state *state,
|
||||
* choose to use.
|
||||
*/
|
||||
goto out;
|
||||
nfs4_copy_open_stateid(dst, state);
|
||||
ret = 0;
|
||||
ret = nfs4_copy_open_stateid(dst, state) ? 0 : -EAGAIN;
|
||||
out:
|
||||
if (nfs_server_capable(state->inode, NFS_CAP_STATEID_NFSV41))
|
||||
dst->seqid = 0;
|
||||
|
Reference in New Issue
Block a user