Commit 74a46084 authored by Chao Yu's avatar Chao Yu Committed by Sandeep Dhavale
Browse files

BACKPORT: f2fs: fix to mitigate overhead of f2fs_zero_post_eof_page()



f2fs_zero_post_eof_page() may cuase more overhead due to invalidate_lock
and page lookup, change as below to mitigate its overhead:
- check new_size before grabbing invalidate_lock
- lookup and invalidate pages only in range of [old_size, new_size]

Bug: 432527227
[Chao: adjust the code]
(cherry picked from commit c2f7c32b)
Change-Id: If1f91fb4a7651272e90ebc63dd9d691d5bd323fb
Fixes: ba8dac35 ("f2fs: fix to zero post-eof page")
Signed-off-by: default avatarChao Yu <chao@kernel.org>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: default avatarChao Yu <chao@kernel.org>
parent fc2f50b6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment