Skip to content

Commit

Permalink
f2fs: fix to update iostat correctly in f2fs_filemap_fault()
Browse files Browse the repository at this point in the history
[ Upstream commit bb34cc6 ]

In f2fs_filemap_fault(), it fixes to update iostat info only if
VM_FAULT_LOCKED is tagged in return value of filemap_fault().

Fixes: 8b83ac8 ("f2fs: support read iostat")
Signed-off-by: Chao Yu <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
chaseyu authored and gregkh committed Jan 25, 2024
1 parent df2571b commit f3a220d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static vm_fault_t f2fs_filemap_fault(struct vm_fault *vmf)
vm_fault_t ret;

ret = filemap_fault(vmf);
if (!ret)
if (ret & VM_FAULT_LOCKED)
f2fs_update_iostat(F2FS_I_SB(inode), APP_MAPPED_READ_IO,
F2FS_BLKSIZE);

Expand Down

0 comments on commit f3a220d

Please sign in to comment.