summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCheng Jian <cj.chengjian@huawei.com>2017-11-03 18:59:48 +0800
committerIngo Molnar <mingo@kernel.org>2017-11-07 12:22:21 +0100
commitf791dd2589d7e217625d7e411621a5bac71cbf69 (patch)
treea9fc6ee08d784158ebc7fa2e2421b31f12a1dada
parent8c5db92a705d9e2c986adec475980d1120fa07b4 (diff)
downloadlinux-f791dd2589d7e217625d7e411621a5bac71cbf69.tar.gz
linux-f791dd2589d7e217625d7e411621a5bac71cbf69.tar.bz2
linux-f791dd2589d7e217625d7e411621a5bac71cbf69.zip
locking/rwlocks: Fix comments
- fix the list of locking API headers in kernel/locking/spinlock.c - fix an #endif comment Signed-off-by: Cheng Jian <cj.chengjian@huawei.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: huawei.libin@huawei.com Cc: xiexiuqi@huawei.com Link: http://lkml.kernel.org/r/1509706788-152547-1-git-send-email-cj.chengjian@huawei.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--include/linux/rwlock_api_smp.h2
-rw-r--r--kernel/locking/spinlock.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/rwlock_api_smp.h b/include/linux/rwlock_api_smp.h
index 5b9b84b20407..86ebb4bf9c6e 100644
--- a/include/linux/rwlock_api_smp.h
+++ b/include/linux/rwlock_api_smp.h
@@ -211,7 +211,7 @@ static inline void __raw_write_lock(rwlock_t *lock)
LOCK_CONTENDED(lock, do_raw_write_trylock, do_raw_write_lock);
}
-#endif /* CONFIG_PREEMPT */
+#endif /* !CONFIG_GENERIC_LOCKBREAK || CONFIG_DEBUG_LOCK_ALLOC */
static inline void __raw_write_unlock(rwlock_t *lock)
{
diff --git a/kernel/locking/spinlock.c b/kernel/locking/spinlock.c
index b96343374a87..1fd1a7543cdd 100644
--- a/kernel/locking/spinlock.c
+++ b/kernel/locking/spinlock.c
@@ -30,7 +30,8 @@
#if !defined(CONFIG_GENERIC_LOCKBREAK) || defined(CONFIG_DEBUG_LOCK_ALLOC)
/*
* The __lock_function inlines are taken from
- * include/linux/spinlock_api_smp.h
+ * spinlock : include/linux/spinlock_api_smp.h
+ * rwlock : include/linux/rwlock_api_smp.h
*/
#else