summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2010-05-25 00:04:28 +0200
committerThomas Gleixner <tglx@linutronix.de>2010-05-26 16:51:21 +0200
commit9846da2c9d0098bd3bbace16865aec9c463669a3 (patch)
tree241f9da8678c06207e727d63564391284e727b21 /init
parente86825210e29c0be2691e7055f942555d02a4314 (diff)
downloadlwn-9846da2c9d0098bd3bbace16865aec9c463669a3.tar.gz
lwn-9846da2c9d0098bd3bbace16865aec9c463669a3.zip
fix undefined references to kernel_sem
protect kernel_sem access with CONFIG_LOCK_KERNEL lib/kernel_lock.c is compiled conditionally. Signed-off-by: Olaf Hering <olaf@aepfle.de> LKML-Reference: <20100524220428.GA17771@aepfle.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'init')
-rw-r--r--init/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/init/main.c b/init/main.c
index a1d74a5ca4e6..2e9549bc8be7 100644
--- a/init/main.c
+++ b/init/main.c
@@ -629,9 +629,13 @@ asmlinkage void __init start_kernel(void)
* the lockdep state, so release the one known lock and
* acquire it again after the self-test is done.
*/
+#ifdef CONFIG_LOCK_KERNEL
mutex_release(&kernel_sem.dep_map, 1, _THIS_IP_);
+#endif
locking_selftest();
+#ifdef CONFIG_LOCK_KERNEL
mutex_acquire(&kernel_sem.dep_map, 0, 0, _THIS_IP_);
+#endif
}
#ifdef CONFIG_BLK_DEV_INITRD