summaryrefslogtreecommitdiff
path: root/include/linux/srcu.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-01-30 10:44:56 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2018-01-30 10:44:56 -0800
commit5e7481a25e90b661d1dbbba18be3fd3dfe12ec6f (patch)
tree9ac1884e2dd735256eb3ba5d52e60e040e407e55 /include/linux/srcu.h
parentb8dbf73086085f1973d3ae66f709e78c077fed05 (diff)
parent05b93801a23c21a6f355f4c492c51715d6ccc96d (diff)
downloadlinux-5e7481a25e90b661d1dbbba18be3fd3dfe12ec6f.tar.gz
linux-5e7481a25e90b661d1dbbba18be3fd3dfe12ec6f.tar.xz
Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull locking updates from Ingo Molnar: "The main changes relate to making lock_is_held() et al (and external wrappers of them) work on const data types - this requires const propagation through the depths of lockdep. This removes a number of ugly type hacks the external helpers used" * 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: lockdep: Convert some users to const lockdep: Make lockdep checking constant lockdep: Assign lock keys on registration
Diffstat (limited to 'include/linux/srcu.h')
-rw-r--r--include/linux/srcu.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/srcu.h b/include/linux/srcu.h
index 62be8966e837..33c1c698df09 100644
--- a/include/linux/srcu.h
+++ b/include/linux/srcu.h
@@ -92,7 +92,7 @@ void synchronize_srcu(struct srcu_struct *sp);
* relies on normal RCU, it can be called from the CPU which
* is in the idle loop from an RCU point of view or offline.
*/
-static inline int srcu_read_lock_held(struct srcu_struct *sp)
+static inline int srcu_read_lock_held(const struct srcu_struct *sp)
{
if (!debug_lockdep_rcu_enabled())
return 1;
@@ -101,7 +101,7 @@ static inline int srcu_read_lock_held(struct srcu_struct *sp)
#else /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */
-static inline int srcu_read_lock_held(struct srcu_struct *sp)
+static inline int srcu_read_lock_held(const struct srcu_struct *sp)
{
return 1;
}