summaryrefslogtreecommitdiffstats
path: root/lib/refcount.c
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2018-04-01 01:00:36 +0300
committerIngo Molnar <mingo@kernel.org>2018-06-21 18:22:02 +0200
commit75a040ff14d9a99fc041f5e1d8f09541cab13ba4 (patch)
treeca8f30d563d6f20a92b9afa6f1ea2459e064aa20 /lib/refcount.c
parent7cc7eaad49c30ac165ecf84d95b26f7e0d53bd97 (diff)
downloadlinux-stable-75a040ff14d9a99fc041f5e1d8f09541cab13ba4.tar.gz
linux-stable-75a040ff14d9a99fc041f5e1d8f09541cab13ba4.tar.bz2
linux-stable-75a040ff14d9a99fc041f5e1d8f09541cab13ba4.zip
locking/refcounts: Include fewer headers in <linux/refcount.h>
Debloat <linux/refcount.h>'s dependencies: - <linux/kernel.h> is not needed, but <linux/compiler.h> is. - <linux/mutex.h> is not needed, only a forward declaration of "struct mutex". - <linux/spinlock.h> is not needed, <linux/spinlock_types.h> is enough. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Will Deacon <will.deacon@arm.com> Link: https://lkml.kernel.org/lkml/20180331220036.GA7676@avx2 Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib/refcount.c')
-rw-r--r--lib/refcount.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/refcount.c b/lib/refcount.c
index 0eb48353abe3..4bd842f20749 100644
--- a/lib/refcount.c
+++ b/lib/refcount.c
@@ -35,7 +35,9 @@
*
*/
+#include <linux/mutex.h>
#include <linux/refcount.h>
+#include <linux/spinlock.h>
#include <linux/bug.h>
#ifdef CONFIG_REFCOUNT_FULL