Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pageflag helpers for configed-out flags

Define proper false/noop inline functions for noreclaim page flags when
!defined(CONFIG_UNEVICTABLE_LRU)

Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Lee Schermerhorn and committed by
Linus Torvalds
8a7a8544 33c120ed

+12
+12
include/linux/page-flags.h
··· 162 162 #define TESTSCFLAG(uname, lname) \ 163 163 TESTSETFLAG(uname, lname) TESTCLEARFLAG(uname, lname) 164 164 165 + #define SETPAGEFLAG_NOOP(uname) \ 166 + static inline void SetPage##uname(struct page *page) { } 167 + 168 + #define CLEARPAGEFLAG_NOOP(uname) \ 169 + static inline void ClearPage##uname(struct page *page) { } 170 + 171 + #define __CLEARPAGEFLAG_NOOP(uname) \ 172 + static inline void __ClearPage##uname(struct page *page) { } 173 + 174 + #define TESTCLEARFLAG_FALSE(uname) \ 175 + static inline int TestClearPage##uname(struct page *page) { return 0; } 176 + 165 177 struct page; /* forward declaration */ 166 178 167 179 TESTPAGEFLAG(Locked, locked)