Commit f8b139e2 authored by Yang Yingliang's avatar Yang Yingliang Committed by Dominique Martinet

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: 5bfe97d7 ("9p: Fix writeback fid incorrectly being attached to dentry")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
[Dominique: adjusted commit summary]
Signed-off-by: default avatarDominique Martinet <asmadeus@codewreck.org>
parent 0dae5228
...@@ -86,8 +86,8 @@ int v9fs_file_open(struct inode *inode, struct file *file) ...@@ -86,8 +86,8 @@ int v9fs_file_open(struct inode *inode, struct file *file)
* to work. * to work.
*/ */
writeback_fid = v9fs_writeback_fid(file_dentry(file)); writeback_fid = v9fs_writeback_fid(file_dentry(file));
if (IS_ERR(fid)) { if (IS_ERR(writeback_fid)) {
err = PTR_ERR(fid); err = PTR_ERR(writeback_fid);
mutex_unlock(&v9inode->v_mutex); mutex_unlock(&v9inode->v_mutex);
goto out_error; goto out_error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment