From: Lai Jiangshan on

When I was writing a module, I hit this compile error.
include/linux/srcu.h:39: error: field 'mutex' has incomplete type
include/linux/srcu.h:41: error: field 'dep_map' has incomplete type

mutex.h is missed in srcu.h, but srcu.h uses struct mutex,
so this patch adds this missing header file.

__percpu is defined in compiler.h which is included in mutex.h already.
But I also include percpu.h because it names "__percpu".

Signed-off-by: Lai Jiangshan <laijs(a)cn.fujitsu.com>
---
diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index 4d5ecb2..675a16f 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -27,6 +27,9 @@
#ifndef _LINUX_SRCU_H
#define _LINUX_SRCU_H

+#include <linux/percpu.h>
+#include <linux/mutex.h>
+
struct srcu_struct_array {
int c[2];
};

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/