]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] set_page_count() macro safety
authorAvishay Traeger <atraeger@cs.sunysb.edu>
Sun, 8 Jan 2006 09:00:58 +0000 (01:00 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Jan 2006 04:12:43 +0000 (20:12 -0800)
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>
include/linux/mm.h

index 83c651f25188e6671307e6886611563d4d17aa71..7ff54242c5d75d6144a23185b933b8201627f46a 100644 (file)
@@ -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 *));