提交 9821421a 编写于 作者: T Trond Myklebust

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: NTrond Myklebust <trond.myklebust@hammerspace.com>
上级 90cf500e
...@@ -1487,7 +1487,7 @@ static int nfs_finish_open(struct nfs_open_context *ctx, ...@@ -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)) if (S_ISREG(file->f_path.dentry->d_inode->i_mode))
nfs_file_set_open_context(file, ctx); nfs_file_set_open_context(file, ctx);
else else
err = -ESTALE; err = -EOPENSTALE;
out: out:
return err; return err;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册