summaryrefslogtreecommitdiff
path: root/fs/nfs/pnfs.c
diff options
context:
space:
mode:
authorTrond Myklebust <trondmy@gmail.com>2019-09-20 14:23:42 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2019-09-20 22:36:58 +0300
commit078a432d1c6afc2e70c6c5a0ce8ff29ce2a2e34a (patch)
treef4798d0538af3fe05a157ce4a376671729269e5d /fs/nfs/pnfs.c
parent287a9c558b9b825b3af36731bb09b06621f3e744 (diff)
downloadlinux-078a432d1c6afc2e70c6c5a0ce8ff29ce2a2e34a.tar.xz
NFSv4: Handle NFS4ERR_DELAY correctly in return-on-close
If the server sends a NFS4ERR_DELAY, then allow the caller to retry. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/pnfs.c')
-rw-r--r--fs/nfs/pnfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 8769422a12f5..6436047dc999 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1455,6 +1455,10 @@ int pnfs_roc_done(struct rpc_task *task, struct inode *inode,
case 0:
retval = 0;
break;
+ case -NFS4ERR_DELAY:
+ /* Let the caller handle the retry */
+ *ret = -NFS4ERR_NOMATCHING_LAYOUT;
+ return 0;
case -NFS4ERR_OLD_STATEID:
if (!nfs4_layoutreturn_refresh_stateid(&arg->stateid,
&arg->range, inode))