diff options
Diffstat (limited to 'kernel/time/timekeeping.c')
-rw-r--r-- | kernel/time/timekeeping.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index d20ffdad62e8..c4d2a8751f3e 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c | |||
@@ -1341,7 +1341,6 @@ static void update_wall_time(void) | |||
1341 | unsigned long flags; | 1341 | unsigned long flags; |
1342 | 1342 | ||
1343 | raw_spin_lock_irqsave(&timekeeper_lock, flags); | 1343 | raw_spin_lock_irqsave(&timekeeper_lock, flags); |
1344 | write_seqcount_begin(&timekeeper_seq); | ||
1345 | 1344 | ||
1346 | /* Make sure we're fully resumed: */ | 1345 | /* Make sure we're fully resumed: */ |
1347 | if (unlikely(timekeeping_suspended)) | 1346 | if (unlikely(timekeeping_suspended)) |
@@ -1393,6 +1392,7 @@ static void update_wall_time(void) | |||
1393 | */ | 1392 | */ |
1394 | accumulate_nsecs_to_secs(tk); | 1393 | accumulate_nsecs_to_secs(tk); |
1395 | 1394 | ||
1395 | write_seqcount_begin(&timekeeper_seq); | ||
1396 | /* Update clock->cycle_last with the new value */ | 1396 | /* Update clock->cycle_last with the new value */ |
1397 | clock->cycle_last = tk->cycle_last; | 1397 | clock->cycle_last = tk->cycle_last; |
1398 | /* | 1398 | /* |
@@ -1407,9 +1407,8 @@ static void update_wall_time(void) | |||
1407 | */ | 1407 | */ |
1408 | memcpy(real_tk, tk, sizeof(*tk)); | 1408 | memcpy(real_tk, tk, sizeof(*tk)); |
1409 | timekeeping_update(real_tk, false, false); | 1409 | timekeeping_update(real_tk, false, false); |
1410 | |||
1411 | out: | ||
1412 | write_seqcount_end(&timekeeper_seq); | 1410 | write_seqcount_end(&timekeeper_seq); |
1411 | out: | ||
1413 | raw_spin_unlock_irqrestore(&timekeeper_lock, flags); | 1412 | raw_spin_unlock_irqrestore(&timekeeper_lock, flags); |
1414 | } | 1413 | } |
1415 | 1414 | ||