summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@citrix.com>2011-07-25 17:11:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 20:57:07 -0700
commit67db392d1124e14684e23deb572de2a63b9b3b69 (patch)
treebfc7e319d1f78b9e18fdfb468529a3ec9a8c6a3b /include
parent33dd4e0ec91138c3d80e790c08a3db47426c81f2 (diff)
downloadlwn-67db392d1124e14684e23deb572de2a63b9b3b69.tar.gz
lwn-67db392d1124e14684e23deb572de2a63b9b3b69.zip
mm: use const struct page for r/o page-flag accessor methods
In a subsquent patch I have a const struct page in my hand... [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Rik van Riel <riel@redhat.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Michel Lespinasse <walken@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/page-flags.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 6081493db68f..3e5a1b189a41 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -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) \