aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/time/timekeeping.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index c4d2a8751f3e..675f720a848b 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -607,6 +607,7 @@ void timekeeping_set_tai_offset(s32 tai_offset)
607 __timekeeping_set_tai_offset(tk, tai_offset); 607 __timekeeping_set_tai_offset(tk, tai_offset);
608 write_seqcount_end(&timekeeper_seq); 608 write_seqcount_end(&timekeeper_seq);
609 raw_spin_unlock_irqrestore(&timekeeper_lock, flags); 609 raw_spin_unlock_irqrestore(&timekeeper_lock, flags);
610 clock_was_set();
610} 611}
611 612
612/** 613/**
@@ -1639,7 +1640,7 @@ int do_adjtimex(struct timex *txc)
1639 struct timekeeper *tk = &timekeeper; 1640 struct timekeeper *tk = &timekeeper;
1640 unsigned long flags; 1641 unsigned long flags;
1641 struct timespec ts; 1642 struct timespec ts;
1642 s32 tai; 1643 s32 orig_tai, tai;
1643 int ret; 1644 int ret;
1644 1645
1645 /* Validate the data before disabling interrupts */ 1646 /* Validate the data before disabling interrupts */
@@ -1663,10 +1664,13 @@ int do_adjtimex(struct timex *txc)
1663 raw_spin_lock_irqsave(&timekeeper_lock, flags); 1664 raw_spin_lock_irqsave(&timekeeper_lock, flags);
1664 write_seqcount_begin(&timekeeper_seq); 1665 write_seqcount_begin(&timekeeper_seq);
1665 1666
1666 tai = tk->tai_offset; 1667 orig_tai = tai = tk->tai_offset;
1667 ret = __do_adjtimex(txc, &ts, &tai); 1668 ret = __do_adjtimex(txc, &ts, &tai);
1668 1669
1669 __timekeeping_set_tai_offset(tk, tai); 1670 if (tai != orig_tai) {
1671 __timekeeping_set_tai_offset(tk, tai);
1672 clock_was_set_delayed();
1673 }
1670 write_seqcount_end(&timekeeper_seq); 1674 write_seqcount_end(&timekeeper_seq);
1671 raw_spin_unlock_irqrestore(&timekeeper_lock, flags); 1675 raw_spin_unlock_irqrestore(&timekeeper_lock, flags);
1672 1676