mm: use const struct page for r/o page-flag accessor methods
authorIan Campbell <[email protected]>
Tue, 26 Jul 2011 00:11:52 +0000 (17:11 -0700)
committerLinus Torvalds <[email protected]>
Tue, 26 Jul 2011 03:57:07 +0000 (20:57 -0700)
In a subsquent patch I have a const struct page in my hand...

[[email protected]: coding-style fixes]
Signed-off-by: Ian Campbell <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Martin Schwidefsky <[email protected]>
Cc: Michel Lespinasse <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/page-flags.h

index 6081493db68ff65aadcf3316128d0130a6973f1d..3e5a1b189a4196d393f7dca96903a83b1d2a277a 100644 (file)
@@ -135,7 +135,7 @@ enum pageflags {
  * Macros to create function definitions for page flags
  */
 #define TESTPAGEFLAG(uname, lname)                                     \
-static inline int Page##uname(struct page *page)                       \
+static inline int Page##uname(const struct page *page)                 \
                        { return test_bit(PG_##lname, &page->flags); }
 
 #define SETPAGEFLAG(uname, lname)                                      \
@@ -173,7 +173,7 @@ static inline int __TestClearPage##uname(struct page *page)         \
        __SETPAGEFLAG(uname, lname)  __CLEARPAGEFLAG(uname, lname)
 
 #define PAGEFLAG_FALSE(uname)                                          \
-static inline int Page##uname(struct page *page)                       \
+static inline int Page##uname(const struct page *page)                 \
                        { return 0; }
 
 #define TESTSCFLAG(uname, lname)                                       \