f2fs: fix to active page in lru list for read path
authorChao Yu <yuchao0@huawei.com>
Fri, 27 Jul 2018 10:15:14 +0000 (18:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 19 Sep 2018 20:43:40 +0000 (22:43 +0200)
commitd85e49570227411fd47a915bfefd4b58d64417b4
treed4ef2d91884045253687656402f3b0a84f0e4052
parentca21de151016d69c3415d95731761c9dd0bf1e00
f2fs: fix to active page in lru list for read path

[ Upstream commit 82cf4f132e6d16dca6fc3bd955019246141bc645 ]

If config CONFIG_F2FS_FAULT_INJECTION is on, for both read or write path
we will call find_lock_page() to get the page, but for read path, it
missed to passing FGP_ACCESSED to allocator to active the page in LRU
list, result in being reclaimed in advance incorrectly, fix it.

Reported-by: Xianrong Zhou <zhouxianrong@huawei.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/f2fs.h