mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-06 11:54:14 -04:00
ANDROID: f2fs: check nr_pages for readahead
Old kernel versions have the issue, since upstream f2fs removed this flow by:
commit d4384de9eb5e ("f2fs: Remove readahead collision detection").
Bug: 206148707
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Fixes: 8c95605c41a1 ("f2fs: avoid readahead race condition")
Change-Id: I3a95f0b436d0a5ee420f41d892401a8d79d4fe79
This commit is contained in:
parent
f711e743ec
commit
7e4f972231
1 changed files with 4 additions and 0 deletions
|
|
@ -2359,6 +2359,10 @@ int f2fs_mpage_readpages(struct address_space *mapping,
|
|||
unsigned max_nr_pages = nr_pages;
|
||||
int ret = 0;
|
||||
|
||||
/* this is real from f2fs_merkle_tree_readahead() in old kernel only. */
|
||||
if (!nr_pages)
|
||||
return 0;
|
||||
|
||||
map.m_pblk = 0;
|
||||
map.m_lblk = 0;
|
||||
map.m_len = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue