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)
commitfa4447cb73b2bfe7175f1b7ffdc70580fcfcb991
tree880478f51c4b63a582c3b1dba2a5730d31fe9394
parent3d05818707bb2cf133ccdcd29f2d5585b5bc1298
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