]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
NFSv4: Handle NFS4ERR_DELAY correctly in return-on-close
authorTrond Myklebust <trondmy@gmail.com>
Fri, 20 Sep 2019 11:23:42 +0000 (07:23 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 20 Sep 2019 19:36:58 +0000 (15:36 -0400)
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>
fs/nfs/pnfs.c

index 8769422a12f5809b86d44a57818eed5398b2cbc0..6436047dc999a131e11353bde9ee12391bd51ed8 100644 (file)
@@ -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))