aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/locking/percpu-rwsem.c
diff options
context:
space:
mode:
authorMinchan Kim <minchan@kernel.org>2022-01-15 15:16:57 -0800
committerPeter Zijlstra <peterz@infradead.org>2022-02-11 12:13:55 +0100
commitc441e934b604a3b5f350a9104124cf6a3ba07a34 (patch)
treef01b72cc4850b7425af837667774d32e099567bd /kernel/locking/percpu-rwsem.c
parentcpumask: Always inline helpers which use bit manipulation functions (diff)
downloadlinux-dev-c441e934b604a3b5f350a9104124cf6a3ba07a34.tar.xz
linux-dev-c441e934b604a3b5f350a9104124cf6a3ba07a34.zip
locking: Add missing __sched attributes
This patch adds __sched attributes to a few missing places to show blocked function rather than locking function in get_wchan. Signed-off-by: Minchan Kim <minchan@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://lkml.kernel.org/r/20220115231657.84828-1-minchan@kernel.org
Diffstat (limited to 'kernel/locking/percpu-rwsem.c')
-rw-r--r--kernel/locking/percpu-rwsem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/locking/percpu-rwsem.c b/kernel/locking/percpu-rwsem.c
index 70a32a576f3f..c9fdae94e098 100644
--- a/kernel/locking/percpu-rwsem.c
+++ b/kernel/locking/percpu-rwsem.c
@@ -7,6 +7,7 @@
#include <linux/rcupdate.h>
#include <linux/sched.h>
#include <linux/sched/task.h>
+#include <linux/sched/debug.h>
#include <linux/errno.h>
int __percpu_init_rwsem(struct percpu_rw_semaphore *sem,
@@ -162,7 +163,7 @@ static void percpu_rwsem_wait(struct percpu_rw_semaphore *sem, bool reader)
__set_current_state(TASK_RUNNING);
}
-bool __percpu_down_read(struct percpu_rw_semaphore *sem, bool try)
+bool __sched __percpu_down_read(struct percpu_rw_semaphore *sem, bool try)
{
if (__percpu_down_read_trylock(sem))
return true;
@@ -211,7 +212,7 @@ static bool readers_active_check(struct percpu_rw_semaphore *sem)
return true;
}
-void percpu_down_write(struct percpu_rw_semaphore *sem)
+void __sched percpu_down_write(struct percpu_rw_semaphore *sem)
{
might_sleep();
rwsem_acquire(&sem->dep_map, 0, 0, _RET_IP_);