diff options
author | Hugh Dickins <[email protected]> | 2020-05-27 22:20:43 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2020-05-28 11:35:40 -0700 |
commit | 2f33a706027c94cd4f70fcd3e3f4a17c1ce4ea4b (patch) | |
tree | feed8be2e1bfe182a6ceba362ea0f0203dd35b61 | |
parent | af4798a5bba60af881626780cbc6457cb162bfd1 (diff) |
mm,thp: stop leaking unreleased file pages
When collapse_file() calls try_to_release_page(), it has already isolated
the page: so if releasing buffers happens to fail (as it sometimes does),
remember to putback_lru_page(): otherwise that page is left unreclaimable
and unfreeable, and the file extent uncollapsible.
Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS")
Signed-off-by: Hugh Dickins <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Acked-by: Song Liu <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: <[email protected]> [5.4+]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/khugepaged.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/khugepaged.c b/mm/khugepaged.c index 99d77ffb79c2..cd280afb246e 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -1692,6 +1692,7 @@ static void collapse_file(struct mm_struct *mm, if (page_has_private(page) && !try_to_release_page(page, GFP_KERNEL)) { result = SCAN_PAGE_HAS_PRIVATE; + putback_lru_page(page); goto out_unlock; } |