]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
once: don't use a work queue to reset sleepable static key
authorLuck, Tony <tony.luck@intel.com>
Mon, 12 Jan 2026 18:08:53 +0000 (10:08 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Tue, 27 Jan 2026 03:07:13 +0000 (19:07 -0800)
commite8eef69a99f185e75909adb24ab93d706e07bf27
tree65489d4b2a1e2abe7752ee38d6d6c075aeaea923
parent8cafcb881364af5ef3a8b9fed4db254054033d8a
once: don't use a work queue to reset sleepable static key

Pointless overhead to use a work queue to reset the static key for a
DO_ONCE_SLEEPABLE() invocation.

Note that the previous code path included a BUG_ON() if the static key
was already disabled. Dropped that as part of this change because:
1) Use of BUG_ON() is highly discouraged.
2) There is a WARN_ON() in the static_branch_disable() code path
   that would provide adequate breadcrumbs to debug any issue.

Link: https://lkml.kernel.org/r/aWU4tfTju1l3oZCu@agluck-desk3
Signed-off-by: Tony Luck <tony.luck@intel.com>
Reported-by: Reinette Chatre <reinette.chatre@intel.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/once.c