mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 18:09:56 +00:00
NFSv4: Fix return value in nfs_finish_open()
[ Upstream commit 9821421a29 ]
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b8cb57c86f
commit
d29a04e98c
@@ -1483,7 +1483,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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user