]> git.ipfire.org Git - thirdparty/linux.git/commit
vdso/gettimeofday: Add a helper to read the sequence lock of a time namespace aware...
authorThomas Weißschuh <thomas.weissschuh@linutronix.de>
Fri, 27 Feb 2026 06:43:21 +0000 (07:43 +0100)
committerThomas Gleixner <tglx@kernel.org>
Wed, 11 Mar 2026 09:27:35 +0000 (10:27 +0100)
commited78b7b2c5ae679960469c0f679539c427e051ab
tree465d3fccc31c85affb6ddc7c1c3ae36b512f524e
parent08cd5e1de815842089ca3938c3ad7ac511097d70
vdso/gettimeofday: Add a helper to read the sequence lock of a time namespace aware clock

Currently there are three different open-coded variants of a time
namespace aware variant of vdso_read_begin(). They make the code hard to
read and introduce an inconsistency, as only the first copy uses
unlikely().

Split the code into a shared helper function.
Move that next to the definition of the regular vdso_read_begin(), so
that any future changes can be kept in sync easily.

Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Link: https://patch.msgid.link/20260227-vdso-cleanups-v1-2-c848b4bc4850@linutronix.de
include/vdso/helpers.h
lib/vdso/gettimeofday.c