[PATCH] __percpu_alloc_mask() has to be __always_inline in UP case
authorAl Viro <viro@ftp.linux.org.uk>
Fri, 29 Sep 2006 08:58:34 +0000 (01:58 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 29 Sep 2006 16:18:02 +0000 (09:18 -0700)
...  or we'll end up with cpu_online_map being evaluated on UP.  In
modules.  cpumask.h is very careful to avoid that, and for a very good
reason.  So should we...

PS: yes, it really triggers (on alpha).

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/linux/percpu.h

index 3835a96..46ec72f 100644 (file)
@@ -74,7 +74,7 @@ static inline int __percpu_populate_mask(void *__pdata, size_t size, gfp_t gfp,
        return 0;
 }
 
-static inline void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask)
+static __always_inline void *__percpu_alloc_mask(size_t size, gfp_t gfp, cpumask_t *mask)
 {
        return kzalloc(size, gfp);
 }