aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/time.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2008-02-01 11:45:13 -0500
committerIngo Molnar <mingo@elte.hu>2008-02-01 11:45:13 -0500
commit1001d0a9ee74a468077dfd4da0565174e88de26b (patch)
tree8775592b23e8049700ff98a7bdbcf9c802a0f127 /kernel/time.c
parent3588a085cd52ef080bf72df772378e1ba6bb292f (diff)
timekeeping: update xtime_cache when time(zone) changes
xtime_cache needs to be updated whenever xtime and or wall_to_monotic are changed. Otherwise users of xtime_cache might see a stale (and in the case of timezone changes utterly wrong) value until the next update happens. Fixup the obvious places, which miss this update. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: John Stultz <johnstul@us.ibm.com> Tested-by: Dhaval Giani <dhaval@linux.vnet.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/time.c')
-rw-r--r--kernel/time.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/time.c b/kernel/time.c
index 09d3c45c4da7..4064c0566e77 100644
--- a/kernel/time.c
+++ b/kernel/time.c
@@ -129,6 +129,7 @@ static inline void warp_clock(void)
129 write_seqlock_irq(&xtime_lock); 129 write_seqlock_irq(&xtime_lock);
130 wall_to_monotonic.tv_sec -= sys_tz.tz_minuteswest * 60; 130 wall_to_monotonic.tv_sec -= sys_tz.tz_minuteswest * 60;
131 xtime.tv_sec += sys_tz.tz_minuteswest * 60; 131 xtime.tv_sec += sys_tz.tz_minuteswest * 60;
132 update_xtime_cache(0);
132 write_sequnlock_irq(&xtime_lock); 133 write_sequnlock_irq(&xtime_lock);
133 clock_was_set(); 134 clock_was_set();
134} 135}