From: Yang Yingliang Date: Tue, 30 Mar 2021 13:06:32 +0000 (+0800) Subject: fs: 9p: fix v9fs_file_open writeback fid error check X-Git-Tag: baikal/mips/sdk5.9~10971^2 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=7984429dbba9b65fead0e2683baeea403dc055da;p=kernel.git 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: 56791b7135ee ("9p: Fix writeback fid incorrectly being attached to dentry") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang [Dominique: adjusted commit summary] Signed-off-by: Dominique Martinet --- diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c index 649f04f112dc2..59c32c9b799fc 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; }