Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366191
b: refs/heads/master
c: 0b5154f
h: refs/heads/master
i:
  366189: 507d60d
  366187: 48f1be8
  366183: 556d810
  366175: f8735b9
v: v3
  • Loading branch information
John Stultz committed Apr 4, 2013
1 parent c947323 commit 2e0c2b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 06c017fdd4dc48451a29ac37fc1db4a3f86b7f40
refs/heads/master: 0b5154fb9040cca94e7d9893384c0e78bfe2d296
9 changes: 4 additions & 5 deletions trunk/kernel/time/timekeeping.c
Original file line number Diff line number Diff line change
Expand Up @@ -1618,9 +1618,10 @@ EXPORT_SYMBOL_GPL(ktime_get_monotonic_offset);
*/
int do_adjtimex(struct timex *txc)
{
struct timekeeper *tk = &timekeeper;
unsigned long flags;
struct timespec ts;
s32 tai, orig_tai;
s32 tai;
int ret;

/* Validate the data before disabling interrupts */
Expand All @@ -1640,19 +1641,17 @@ int do_adjtimex(struct timex *txc)
}

getnstimeofday(&ts);
orig_tai = tai = timekeeping_get_tai_offset();

raw_spin_lock_irqsave(&timekeeper_lock, flags);
write_seqcount_begin(&timekeeper_seq);

tai = tk->tai_offset;
ret = __do_adjtimex(txc, &ts, &tai);

__timekeeping_set_tai_offset(tk, tai);
write_seqcount_end(&timekeeper_seq);
raw_spin_unlock_irqrestore(&timekeeper_lock, flags);

if (tai != orig_tai)
timekeeping_set_tai_offset(tai);

return ret;
}

Expand Down

0 comments on commit 2e0c2b2

Please sign in to comment.