提交 152194aa 编写于 作者: A Avishay Traeger 提交者: Linus Torvalds

[PATCH] set_page_count() macro safety

Fix set_page_count() macro to handle complex arguments.
Signed-off-by: NAvishay Traeger <atraeger@cs.sunysb.edu>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 aea47ff3
......@@ -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 *));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册