diff options
author | Kamalesh Babulal <kamalesh.babulal@oracle.com> | 2023-03-03 15:23:10 +0530 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2023-03-17 12:07:13 -1000 |
commit | 4cdb91b0dea7d7f59fa84a13c7753cd434fdedcf (patch) | |
tree | b27b45747bdf53a7758e9ca57292ffbde71bd46f /kernel/bpf/local_storage.c | |
parent | 8d3c682a5e3d9dfc2448ecbb22f4cd48359b9e21 (diff) | |
download | linux-stable-4cdb91b0dea7d7f59fa84a13c7753cd434fdedcf.tar.gz linux-stable-4cdb91b0dea7d7f59fa84a13c7753cd434fdedcf.tar.bz2 linux-stable-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/local_storage.c')
-rw-r--r-- | kernel/bpf/local_storage.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/bpf/local_storage.c b/kernel/bpf/local_storage.c index e90d9f63edc5..9bceefee14d5 100644 --- a/kernel/bpf/local_storage.c +++ b/kernel/bpf/local_storage.c @@ -333,14 +333,14 @@ static void cgroup_storage_map_free(struct bpf_map *_map) struct list_head *storages = &map->list; struct bpf_cgroup_storage *storage, *stmp; - mutex_lock(&cgroup_mutex); + cgroup_lock(); list_for_each_entry_safe(storage, stmp, storages, list_map) { bpf_cgroup_storage_unlink(storage); bpf_cgroup_storage_free(storage); } - mutex_unlock(&cgroup_mutex); + cgroup_unlock(); WARN_ON(!RB_EMPTY_ROOT(&map->root)); WARN_ON(!list_empty(&map->list)); |