mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
mm: introduce PAGEFLAGS_MASK to replace ((1UL << NR_PAGEFLAGS) - 1)
Instead of hard-coding ((1UL << NR_PAGEFLAGS) - 1) everywhere, introducing PAGEFLAGS_MASK to make the code clear to get the page flags. Link: https://lkml.kernel.org/r/20210819150712.59948-1-songmuchun@bytedance.com Signed-off-by: Muchun Song <songmuchun@bytedance.com> Reviewed-by: Roman Gushchin <guro@fb.com> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: Shakeel Butt <shakeelb@google.com> Cc: Michal Hocko <mhocko@kernel.org> Cc: Vladimir Davydov <vdavydov.dev@gmail.com> Cc: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
ea0eafead4
commit
41c961b901
@@ -614,7 +614,7 @@ page_flags_test(int section, int node, int zone, int last_cpupid,
|
||||
bool append = false;
|
||||
int i;
|
||||
|
||||
flags &= BIT(NR_PAGEFLAGS) - 1;
|
||||
flags &= PAGEFLAGS_MASK;
|
||||
if (flags) {
|
||||
page_flags |= flags;
|
||||
snprintf(cmp_buf + size, BUF_SIZE - size, "%s", name);
|
||||
|
Reference in New Issue
Block a user