Skip to content

Commit

Permalink
MM: Fix macro argument substitution in PageHead() and PageTail()
Browse files Browse the repository at this point in the history
Fix macro argument substitution in PageHead() and PageTail() - 'page' should
have brackets surrounding it (commit 6d77795).

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Howells authored and Linus Torvalds committed Feb 22, 2008
1 parent 5e45bb2 commit a62f735
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/linux/page-flags.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ static inline void SetPageUptodate(struct page *page)

#define PG_head_tail_mask ((1L << PG_compound) | (1L << PG_reclaim))

#define PageTail(page) ((page->flags & PG_head_tail_mask) \
#define PageTail(page) (((page)->flags & PG_head_tail_mask) \
== PG_head_tail_mask)

static inline void __SetPageTail(struct page *page)
Expand All @@ -279,7 +279,7 @@ static inline void __ClearPageTail(struct page *page)
page->flags &= ~PG_head_tail_mask;
}

#define PageHead(page) ((page->flags & PG_head_tail_mask) \
#define PageHead(page) (((page)->flags & PG_head_tail_mask) \
== (1L << PG_compound))
#define __SetPageHead(page) __SetPageCompound(page)
#define __ClearPageHead(page) __ClearPageCompound(page)
Expand Down

0 comments on commit a62f735

Please sign in to comment.