]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm: lru: add VM_WARN_ON_ONCE_FOLIO to lru maintenance function
authorMuchun Song <songmuchun@bytedance.com>
Tue, 21 Jun 2022 12:56:57 +0000 (20:56 +0800)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Jul 2022 00:15:11 +0000 (20:15 -0400)
commit84e55c1067bc577f63dd8be9ff7a66e612663b42
tree73a0730e35667c56333ff3255132263b609c83ab
parent0f6ab2c233c9169d7818c5596ef3d635535fe93c
mm: lru: add VM_WARN_ON_ONCE_FOLIO to lru maintenance function

We need to make sure that the page is deleted from or added to the correct
lruvec list.  So add a VM_WARN_ON_ONCE_FOLIO() to catch invalid users.
Then the VM_BUG_ON_PAGE() in move_pages_to_lru() could be removed since
add_page_to_lru_list() will check that.

Link: https://lkml.kernel.org/r/20220621125658.64935-11-songmuchun@bytedance.com
Signed-off-by: Muchun Song <songmuchun@bytedance.com>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Michal Koutný <mkoutny@suse.com>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Waiman Long <longman@redhat.com>
Cc: Xiongchun Duan <duanxiongchun@bytedance.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/mm_inline.h
mm/vmscan.c