Skip to content

Commit 0d84646

Browse files
Matthew Wilcox (Oracle)akpm00
authored andcommitted
mm: remove PageWaiters, PageSetWaiters and PageClearWaiters
All callers have been converted to use folios. This was the only user of PF_ONLY_HEAD, so remove that too. Link: https://lkml.kernel.org/r/20240227192337.757313-3-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent dfbac6d commit 0d84646

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

include/linux/page-flags.h

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,6 @@ static unsigned long *folio_flags(struct folio *folio, unsigned n)
328328
* for compound page all operations related to the page flag applied to
329329
* head page.
330330
*
331-
* PF_ONLY_HEAD:
332-
* for compound page, callers only ever operate on the head page.
333-
*
334331
* PF_NO_TAIL:
335332
* modifications of the page flag must be done on small or head pages,
336333
* checks can be done on tail pages too.
@@ -346,9 +343,6 @@ static unsigned long *folio_flags(struct folio *folio, unsigned n)
346343
page; })
347344
#define PF_ANY(page, enforce) PF_POISONED_CHECK(page)
348345
#define PF_HEAD(page, enforce) PF_POISONED_CHECK(compound_head(page))
349-
#define PF_ONLY_HEAD(page, enforce) ({ \
350-
VM_BUG_ON_PGFLAGS(PageTail(page), page); \
351-
PF_POISONED_CHECK(page); })
352346
#define PF_NO_TAIL(page, enforce) ({ \
353347
VM_BUG_ON_PGFLAGS(enforce && PageTail(page), page); \
354348
PF_POISONED_CHECK(compound_head(page)); })
@@ -362,7 +356,6 @@ static unsigned long *folio_flags(struct folio *folio, unsigned n)
362356
/* Which page is the flag stored in */
363357
#define FOLIO_PF_ANY 0
364358
#define FOLIO_PF_HEAD 0
365-
#define FOLIO_PF_ONLY_HEAD 0
366359
#define FOLIO_PF_NO_TAIL 0
367360
#define FOLIO_PF_NO_COMPOUND 0
368361
#define FOLIO_PF_SECOND 1
@@ -488,7 +481,7 @@ static inline int TestClearPage##uname(struct page *page) { return 0; }
488481
TESTSETFLAG_FALSE(uname, lname) TESTCLEARFLAG_FALSE(uname, lname)
489482

490483
__PAGEFLAG(Locked, locked, PF_NO_TAIL)
491-
PAGEFLAG(Waiters, waiters, PF_ONLY_HEAD)
484+
FOLIO_FLAG(waiters, FOLIO_HEAD_PAGE)
492485
PAGEFLAG(Error, error, PF_NO_TAIL) TESTCLEARFLAG(Error, error, PF_NO_TAIL)
493486
PAGEFLAG(Referenced, referenced, PF_HEAD)
494487
TESTCLEARFLAG(Referenced, referenced, PF_HEAD)
@@ -1138,7 +1131,6 @@ static inline bool folio_has_private(struct folio *folio)
11381131

11391132
#undef PF_ANY
11401133
#undef PF_HEAD
1141-
#undef PF_ONLY_HEAD
11421134
#undef PF_NO_TAIL
11431135
#undef PF_NO_COMPOUND
11441136
#undef PF_SECOND

0 commit comments

Comments
 (0)