summaryrefslogtreecommitdiff
path: root/fs/9p
diff options
context:
space:
mode:
authorYang Yingliang <yangyingliang@huawei.com>2021-03-30 21:06:32 +0800
committerDominique Martinet <asmadeus@codewreck.org>2021-03-31 07:02:47 +0900
commitf8b139e2f24112f4e21f1eb02c7fc7600fea4b8d (patch)
tree7be268560bc3efa30ddfb97ed3e0020e5d58a3a3 /fs/9p
parent0dae52282a5eede01339480f7273a545ca4447c2 (diff)
fs: 9p: fix v9fs_file_open writeback fid error check
IS_ERR() and PTR_ERR() use wrong pointer, it should be writeback_fid, fix it. Link: http://lkml.kernel.org/r/20210330130632.1054357-1-yangyingliang@huawei.com Fixes: 5bfe97d7382b ("9p: Fix writeback fid incorrectly being attached to dentry") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> [Dominique: adjusted commit summary] Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 649f04f112dc..59c32c9b799f 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -86,8 +86,8 @@ int v9fs_file_open(struct inode *inode, struct file *file)
* to work.
*/
writeback_fid = v9fs_writeback_fid(file_dentry(file));
- if (IS_ERR(fid)) {
- err = PTR_ERR(fid);
+ if (IS_ERR(writeback_fid)) {
+ err = PTR_ERR(writeback_fid);
mutex_unlock(&v9inode->v_mutex);
goto out_error;
}