From: Avi Kivity <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>
diff --git a/external-module-compat-comm.h b/external-module-compat-comm.h
index 5b96c46..1e511dc 100644
--- a/external-module-compat-comm.h
+++ b/external-module-compat-comm.h
@@ -737,6 +737,21 @@ static inline void cpumask_clear_cpu(int cpu,
cpumask_var_t mask)
#endif
+/* A zeroing constructor was added late 2.6.30 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+
+static inline bool zalloc_cpumask_var(cpumask_var_t *mask, gfp_t flags)
+{
+ bool ret;
+
+ ret = alloc_cpumask_var(mask, flags);
+ if (ret)
+ cpumask_clear(*mask);
+ return ret;
+}
+
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29)
#define IF_ANON_INODES_DOES_REFCOUNTS(x)
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html