]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rculist: Add hlist_nulls_replace_rcu() and hlist_nulls_replace_init_rcu()
authorXuanqiang Luo <luoxuanqiang@kylinos.cn>
Wed, 15 Oct 2025 02:02:34 +0000 (10:02 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 17 Oct 2025 23:08:42 +0000 (16:08 -0700)
commit9c4609225ec1cb551006d6a03c7c4ad8cb5584c0
tree5a6adcc12452f5f4f097a1396863364af08f705e
parent1c17f4373d4db1e1f0ebd3ddcd8e7a642927a826
rculist: Add hlist_nulls_replace_rcu() and hlist_nulls_replace_init_rcu()

Add two functions to atomically replace RCU-protected hlist_nulls entries.

Keep using WRITE_ONCE() to assign values to ->next and ->pprev, as
mentioned in the patch below:
commit efd04f8a8b45 ("rcu: Use WRITE_ONCE() for assignments to ->next for
rculist_nulls")
commit 860c8802ace1 ("rcu: Use WRITE_ONCE() for assignments to ->pprev for
hlist_nulls")

Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Frederic Weisbecker <frederic@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Xuanqiang Luo <luoxuanqiang@kylinos.cn>
Link: https://patch.msgid.link/20251015020236.431822-2-xuanqiang.luo@linux.dev
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/linux/rculist_nulls.h