mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Add balance_dirty_pages_ratelimited() to cont_expand_zero()
On the systems, ftruncate() which expand size for FAT became the cause of OOM. The cont_expand_zero() filled all memory with dirty pages, and since disk is very slow, limit of page scanning was exceeded, then it triggered OOM. This adds balance_dirty_pages_ratelimited() to avoid filling memory with dirty pages. Signed-off-by: OGAWA Hirofumi <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e69be4c9c4
commit
061e97469f
1 changed files with 2 additions and 0 deletions
|
|
@ -2246,6 +2246,8 @@ int cont_expand_zero(struct file *file, struct address_space *mapping,
|
|||
goto out;
|
||||
BUG_ON(err != len);
|
||||
err = 0;
|
||||
|
||||
balance_dirty_pages_ratelimited(mapping);
|
||||
}
|
||||
|
||||
/* page covers the boundary, find the boundary offset */
|
||||
|
|
|
|||
Loading…
Reference in a new issue