[tip:locking/core] locking/rwlocks: Fix comments

From: tip-bot for Cheng Jian
Date: Tue Nov 07 2017 - 06:37:51 EST


Commit-ID: f791dd2589d7e217625d7e411621a5bac71cbf69
Gitweb: https://git.kernel.org/tip/f791dd2589d7e217625d7e411621a5bac71cbf69
Author: Cheng Jian <cj.chengjian@xxxxxxxxxx>
AuthorDate: Fri, 3 Nov 2017 18:59:48 +0800
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Tue, 7 Nov 2017 12:22:21 +0100

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@xxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: huawei.libin@xxxxxxxxxx
Cc: xiexiuqi@xxxxxxxxxx
Link: http://lkml.kernel.org/r/1509706788-152547-1-git-send-email-cj.chengjian@xxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
include/linux/rwlock_api_smp.h | 2 +-
kernel/locking/spinlock.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/include/linux/rwlock_api_smp.h b/include/linux/rwlock_api_smp.h
index 5b9b84b..86ebb4b 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 b963433..1fd1a75 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