summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2019-08-09 18:15:07 +0200
committerTrond Myklebust <trond.myklebust@hammerspace.com>2019-08-19 14:56:04 +0200
commit9821421a291b548ef4369c6998745baa36ddecd5 (patch)
treef35f585eb62fa1193813fb3586c3b6f7af7562cd /fs/nfs
parentNFSv4: Fix return values for nfs4_file_open() (diff)
downloadlinux-9821421a291b548ef4369c6998745baa36ddecd5.tar.xz
linux-9821421a291b548ef4369c6998745baa36ddecd5.zip
NFSv4: Fix return value in nfs_finish_open()
If the file turns out to be of the wrong type after opening, we want to revalidate the path and retry, so return EOPENSTALE rather than ESTALE. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 8d501093660f..0adfd8840110 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1487,7 +1487,7 @@ static int nfs_finish_open(struct nfs_open_context *ctx,
if (S_ISREG(file->f_path.dentry->d_inode->i_mode))
nfs_file_set_open_context(file, ctx);
else
- err = -ESTALE;
+ err = -EOPENSTALE;
out:
return err;
}