From: Avishay Traeger Date: Sun, 8 Jan 2006 09:00:58 +0000 (-0800) Subject: [PATCH] set_page_count() macro safety X-Git-Tag: v2.6.16-rc1~882 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=152194aaa6266d71dfee57882a23def339ef17a4;p=linux-2.6-omap-h63xx.git [PATCH] set_page_count() macro safety Fix set_page_count() macro to handle complex arguments. Signed-off-by: Avishay Traeger Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/mm.h b/include/linux/mm.h index 83c651f2518..7ff54242c5d 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 *));