mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-01 06:46:35 +01:00
f2fs: remove non-uptodate folio from the page cache in move_data_block
During data movement, move_data_block acquires file folio without triggering a file read. Such folio are typically not uptodate, they need to be removed from the page cache after gc complete. This patch marks folio with the PG_dropbehind flag and uses folio_end_dropbehind to remove folio from the page cache. Signed-off-by: Yunlei He <[email protected]> Signed-off-by: Yongpeng Yang <[email protected]> Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
This commit is contained in:
1 parent
db1a8a7813
commit
9609dd7047
1 file changed
+5
-1
+5
-1
@@ -1453,7 +1453,11 @@ up_out:
|
||||
put_out:
|
||||
f2fs_put_dnode(&dn);
|
||||
out:
|
||||
f2fs_folio_put(folio, true);
|
||||
if (!folio_test_uptodate(folio))
|
||||
__folio_set_dropbehind(folio);
|
||||
folio_unlock(folio);
|
||||
folio_end_dropbehind(folio);
|
||||
folio_put(folio);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user