* [merged mm-stable] mm-z3fold-throw-warning-on-failure-of-trylock_page-in-z3fold_alloc.patch removed from -mm tree
@ 2022-05-27 16:34 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2022-05-27 16:34 UTC (permalink / raw)
To: mm-commits, vitaly.wool, linmiaohe, akpm
The quilt patch titled
Subject: mm/z3fold: throw warning on failure of trylock_page in z3fold_alloc
has been removed from the -mm tree. Its filename was
mm-z3fold-throw-warning-on-failure-of-trylock_page-in-z3fold_alloc.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Miaohe Lin <linmiaohe@huawei.com>
Subject: mm/z3fold: throw warning on failure of trylock_page in z3fold_alloc
Date: Fri, 29 Apr 2022 14:40:43 +0800
If trylock_page fails, the page won't be non-lru movable page. When this
page is freed via free_z3fold_page, it will trigger bug on PageMovable
check in __ClearPageMovable. Throw warning on failure of trylock_page to
guard against such rare case just as what zsmalloc does.
Link: https://lkml.kernel.org/r/20220429064051.61552-5-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Cc: Vitaly Wool <vitaly.wool@konsulko.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/z3fold.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/mm/z3fold.c~mm-z3fold-throw-warning-on-failure-of-trylock_page-in-z3fold_alloc
+++ a/mm/z3fold.c
@@ -1122,10 +1122,9 @@ retry:
__SetPageMovable(page, pool->inode->i_mapping);
unlock_page(page);
} else {
- if (trylock_page(page)) {
- __SetPageMovable(page, pool->inode->i_mapping);
- unlock_page(page);
- }
+ WARN_ON(!trylock_page(page));
+ __SetPageMovable(page, pool->inode->i_mapping);
+ unlock_page(page);
}
z3fold_page_lock(zhdr);
_
Patches currently in -mm which might be from linmiaohe@huawei.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-27 16:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-27 16:34 [merged mm-stable] mm-z3fold-throw-warning-on-failure-of-trylock_page-in-z3fold_alloc.patch removed from -mm tree Andrew Morton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.