Skip to content

Commit f8b139e

Browse files
Yang Yingliangmartinetd
authored andcommitted
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/[email protected] Fixes: 5bfe97d ("9p: Fix writeback fid incorrectly being attached to dentry") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Yang Yingliang <[email protected]> [Dominique: adjusted commit summary] Signed-off-by: Dominique Martinet <[email protected]>
1 parent 0dae522 commit f8b139e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/9p/vfs_file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ int v9fs_file_open(struct inode *inode, struct file *file)
8686
* to work.
8787
*/
8888
writeback_fid = v9fs_writeback_fid(file_dentry(file));
89-
if (IS_ERR(fid)) {
90-
err = PTR_ERR(fid);
89+
if (IS_ERR(writeback_fid)) {
90+
err = PTR_ERR(writeback_fid);
9191
mutex_unlock(&v9inode->v_mutex);
9292
goto out_error;
9393
}

0 commit comments

Comments
 (0)