Skip to content

Commit

Permalink
fs: 9p: fix v9fs_file_open writeback fid error check
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Yang Yingliang authored and martinetd committed Mar 30, 2021
1 parent 0dae522 commit f8b139e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/9p/vfs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit f8b139e

Please sign in to comment.