diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-08-09 12:15:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-21 07:15:33 +0200 |
commit | 227755c8facd0f59738b74270a6c28b1ce4a8bb7 (patch) | |
tree | 5ee78213f5a0fe5b58462e31e433fe6722bebd6d | |
parent | c9e6a3f0e9fa14f99457a506a91f346c6161ee21 (diff) | |
download | linux-rt-227755c8facd0f59738b74270a6c28b1ce4a8bb7.tar.gz |
NFSv4: Fix return value in nfs_finish_open()
[ Upstream commit 9821421a291b548ef4369c6998745baa36ddecd5 ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-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 85a6fdd76e20..50c181fa0025 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c @@ -1470,7 +1470,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; } |