summaryrefslogtreecommitdiff
path: root/include/linux/mm.h
diff options
context:
space:
mode:
authorAvishay Traeger <atraeger@cs.sunysb.edu>2006-01-08 01:00:58 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-08 20:12:43 -0800
commit152194aaa6266d71dfee57882a23def339ef17a4 (patch)
tree9af269a9f4c14e549c719207b0856da32ddec746 /include/linux/mm.h
parentaea47ff363c15b0be5fc27ed991b1fdee338f0a7 (diff)
[PATCH] set_page_count() macro safety
Fix set_page_count() macro to handle complex arguments. Signed-off-by: Avishay Traeger <atraeger@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 83c651f25188..7ff54242c5d7 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -308,7 +308,7 @@ struct page {
*/
#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)
extern void FASTCALL(__page_cache_release(struct page *));