]> git.baikalelectronics.ru Git - kernel.git/commit
bpf: Use __llist_del_all() whenever possbile during memory draining
authorHou Tao <houtao1@huawei.com>
Fri, 21 Oct 2022 11:49:13 +0000 (19:49 +0800)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 22 Oct 2022 02:17:38 +0000 (19:17 -0700)
commit7202e888ffd61c1b5c1a6566ddc98f81f75bf779
tree880478f51c4b63a582c3b1dba2a5730d31fe9394
parent2e6b2d545e5d6e20c97d4ce42c3ef22961dd637f
bpf: Use __llist_del_all() whenever possbile during memory draining

Except for waiting_for_gp list, there are no concurrent operations on
free_by_rcu, free_llist and free_llist_extra lists, so use
__llist_del_all() instead of llist_del_all(). waiting_for_gp list can be
deleted by RCU callback concurrently, so still use llist_del_all().

Acked-by: Stanislav Fomichev <sdf@google.com>
Signed-off-by: Hou Tao <houtao1@huawei.com>
Link: https://lore.kernel.org/r/20221021114913.60508-3-houtao@huaweicloud.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/memalloc.c