Commit 152194aa authored by Avishay Traeger's avatar Avishay Traeger Committed by Linus Torvalds

[PATCH] set_page_count() macro safety

Fix set_page_count() macro to handle complex arguments.
Signed-off-by: default avatarAvishay Traeger <atraeger@cs.sunysb.edu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent aea47ff3
...@@ -308,7 +308,7 @@ struct page { ...@@ -308,7 +308,7 @@ struct page {
*/ */
#define get_page_testone(p) atomic_inc_and_test(&(p)->_count) #define get_page_testone(p) atomic_inc_and_test(&(p)->_count)
#define set_page_count(p,v) atomic_set(&(p)->_count, v - 1) #define set_page_count(p,v) atomic_set(&(p)->_count, (v) - 1)
#define __put_page(p) atomic_dec(&(p)->_count) #define __put_page(p) atomic_dec(&(p)->_count)
extern void FASTCALL(__page_cache_release(struct page *)); extern void FASTCALL(__page_cache_release(struct page *));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment