srcu: add missing header file
PATCH 1/1 srcu: add missing header file
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".
---
include/linux/srcu.h +3 -0
@@ -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 ]; };
Quoted 10 lines · Lai Jiangshan
When I was writing a module, I hit this compile error.
include/linux/srcu.h:39: error: field 'mutex' has incomplete typeinclude/linux/srcu.h:41: error: field 'dep_map' has incomplete type
mutex.his missed insrcu.h, butsrcu.huses struct mutex, so this patch adds this missing header file.
__percpuis defined incompiler.hwhich is included inmutex.halready. But I also includepercpu.hbecause it names "__percpu".
Good catch!!! Queued for 2.6.35.
Thanx, Paul
Quoted 17 lines
Signed-off-by Lai Jiangshan <[email protected]>---
include/linux/srcu.h +3
-0@@ -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 ]; };