summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfsproc.c
diff options
context:
space:
mode:
authorJeff Layton <jeff.layton@primarydata.com>2021-12-18 20:37:56 -0500
committerChuck Lever <chuck.lever@oracle.com>2022-01-08 14:42:02 -0500
commit12bcbd40fd931472c7fc9cf3bfe66799ece93ed8 (patch)
tree236e5be9301ff30f8752024d02cf985b4c455090 /fs/nfsd/nfsproc.c
parenta2694e51f60c5a18c7e43d1a9feaa46d7f153e65 (diff)
downloadlinux-12bcbd40fd931472c7fc9cf3bfe66799ece93ed8.tar.gz
linux-12bcbd40fd931472c7fc9cf3bfe66799ece93ed8.tar.bz2
linux-12bcbd40fd931472c7fc9cf3bfe66799ece93ed8.zip
nfsd: Retry once in nfsd_open on an -EOPENSTALE return
If we get back -EOPENSTALE from an NFSv4 open, then we either got some unhandled error or the inode we got back was not the same as the one associated with the dentry. We really have no recourse in that situation other than to retry the open, and if it fails to just return nfserr_stale back to the client. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> Signed-off-by: Lance Shelton <lance.shelton@hammerspace.com> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfsproc.c')
-rw-r--r--fs/nfsd/nfsproc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfsd/nfsproc.c b/fs/nfsd/nfsproc.c
index da0414ecf4d2..48c7344151df 100644
--- a/fs/nfsd/nfsproc.c
+++ b/fs/nfsd/nfsproc.c
@@ -875,6 +875,7 @@ nfserrno (int errno)
{ nfserr_serverfault, -ESERVERFAULT },
{ nfserr_serverfault, -ENFILE },
{ nfserr_io, -EREMOTEIO },
+ { nfserr_stale, -EOPENSTALE },
{ nfserr_io, -EUCLEAN },
{ nfserr_perm, -ENOKEY },
{ nfserr_no_grace, -ENOGRACE},