]> git.baikalelectronics.ru Git - kernel.git/commit
time/timekeeping: Avoid invoking clock_was_set() twice
authorThomas Gleixner <tglx@linutronix.de>
Tue, 13 Jul 2021 13:39:52 +0000 (15:39 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 10 Aug 2021 15:57:23 +0000 (17:57 +0200)
commit36b2000abdee5cee522e39cfbd8da579267a2bda
tree30427a10c5a74b5c0922367aa74a616a8d5e0238
parent62ed938aba93e90fae742e8c374866eb09ae95b1
time/timekeeping: Avoid invoking clock_was_set() twice

do_adjtimex() might end up scheduling a delayed clock_was_set() via
timekeeping_advance() and then invoke clock_was_set() directly which is
pointless.

Make timekeeping_advance() return whether an invocation of clock_was_set()
is required and handle it at the call sites which allows do_adjtimex() to
issue a single direct call if required.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20210713135158.580966888@linutronix.de
kernel/time/timekeeping.c