summaryrefslogtreecommitdiffstats
path: root/kernel/bpf/cgroup_iter.c
diff options
context:
space:
mode:
authorKamalesh Babulal <kamalesh.babulal@oracle.com>2023-03-03 10:53:10 +0100
committerTejun Heo <tj@kernel.org>2023-03-17 23:07:13 +0100
commit4cdb91b0dea7d7f59fa84a13c7753cd434fdedcf (patch)
treeb27b45747bdf53a7758e9ca57292ffbde71bd46f /kernel/bpf/cgroup_iter.c
parentMerge tag 'block-6.3-2023-03-16' of git://git.kernel.dk/linux (diff)
downloadlinux-4cdb91b0dea7d7f59fa84a13c7753cd434fdedcf.tar.xz
linux-4cdb91b0dea7d7f59fa84a13c7753cd434fdedcf.zip
cgroup: bpf: use cgroup_lock()/cgroup_unlock() wrappers
Replace mutex_[un]lock() with cgroup_[un]lock() wrappers to stay consistent across cgroup core and other subsystem code, while operating on the cgroup_mutex. Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com> Acked-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/bpf/cgroup_iter.c')
-rw-r--r--kernel/bpf/cgroup_iter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/bpf/cgroup_iter.c b/kernel/bpf/cgroup_iter.c
index 06989d278846..810378f04fbc 100644
--- a/kernel/bpf/cgroup_iter.c
+++ b/kernel/bpf/cgroup_iter.c
@@ -58,7 +58,7 @@ static void *cgroup_iter_seq_start(struct seq_file *seq, loff_t *pos)
{
struct cgroup_iter_priv *p = seq->private;
- mutex_lock(&cgroup_mutex);
+ cgroup_lock();
/* cgroup_iter doesn't support read across multiple sessions. */
if (*pos > 0) {
@@ -89,7 +89,7 @@ static void cgroup_iter_seq_stop(struct seq_file *seq, void *v)
{
struct cgroup_iter_priv *p = seq->private;
- mutex_unlock(&cgroup_mutex);
+ cgroup_unlock();
/* pass NULL to the prog for post-processing */
if (!v) {