diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-08-09 19:15:07 +0300 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-08-19 15:56:04 +0300 |
commit | 9821421a291b548ef4369c6998745baa36ddecd5 (patch) | |
tree | f35f585eb62fa1193813fb3586c3b6f7af7562cd /fs | |
parent | 90cf500e338ab3f3c0f126ba37e36fb6a9058441 (diff) | |
download | linux-9821421a291b548ef4369c6998745baa36ddecd5.tar.xz |
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')
-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; } |