public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Tejun Heo <tj@kernel.org>, LKML <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: [PATCH] srcu: add missing header file
Date: Sat, 17 Apr 2010 19:13:53 +0800	[thread overview]
Message-ID: <4BC997F1.4000801@cn.fujitsu.com> (raw)


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@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];
 };


             reply	other threads:[~2010-04-17 11:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-17 11:13 Lai Jiangshan [this message]
2010-04-18  1:06 ` [PATCH] srcu: add missing header file Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BC997F1.4000801@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox