summaryrefslogtreecommitdiff
path: root/kernel/bpf
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@redhat.com>2019-06-28 11:12:34 +0200
committerDaniel Borkmann <daniel@iogearbox.net>2019-06-29 01:31:08 +0200
commitc8af5cd75e2411d5a5aacf115f59a5ff6b87f3fa (patch)
tree8546f434daf91c6cf24a15281eafc471ac50eabe /kernel/bpf
parent2d6dbb9a65f4001f2878512078394c11301994f3 (diff)
xskmap: Move non-standard list manipulation to helper
Add a helper in list.h for the non-standard way of clearing a list that is used in xskmap. This makes it easier to reuse it in the other map types, and also makes sure this usage is not forgotten in any list refactorings in the future. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'kernel/bpf')
-rw-r--r--kernel/bpf/xskmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/bpf/xskmap.c b/kernel/bpf/xskmap.c
index ef7338cebd18..9bb96ace9fa1 100644
--- a/kernel/bpf/xskmap.c
+++ b/kernel/bpf/xskmap.c
@@ -145,8 +145,7 @@ void __xsk_map_flush(struct bpf_map *map)
list_for_each_entry_safe(xs, tmp, flush_list, flush_node) {
xsk_flush(xs);
- __list_del(xs->flush_node.prev, xs->flush_node.next);
- xs->flush_node.prev = NULL;
+ __list_del_clearprev(&xs->flush_node);
}
}