diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-08-09 18:15:07 +0200 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-08-19 14:56:04 +0200 |
commit | 9821421a291b548ef4369c6998745baa36ddecd5 (patch) | |
tree | f35f585eb62fa1193813fb3586c3b6f7af7562cd /fs/nfs | |
parent | NFSv4: Fix return values for nfs4_file_open() (diff) | |
download | linux-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.c | 2 |
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; } |