diff options
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/kernel/vsyscall.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c index d14cbb3e0ebe..ba330f870679 100644 --- a/arch/x86_64/kernel/vsyscall.c +++ b/arch/x86_64/kernel/vsyscall.c | |||
@@ -156,11 +156,13 @@ int __vsyscall(0) vgettimeofday(struct timeval * tv, struct timezone * tz) | |||
156 | * unlikely */ | 156 | * unlikely */ |
157 | time_t __vsyscall(1) vtime(time_t *t) | 157 | time_t __vsyscall(1) vtime(time_t *t) |
158 | { | 158 | { |
159 | time_t result; | ||
159 | if (unlikely(!__vsyscall_gtod_data.sysctl_enabled)) | 160 | if (unlikely(!__vsyscall_gtod_data.sysctl_enabled)) |
160 | return time_syscall(t); | 161 | return time_syscall(t); |
161 | else if (t) | 162 | result = __vsyscall_gtod_data.wall_time_tv.tv_sec; |
162 | *t = __vsyscall_gtod_data.wall_time_tv.tv_sec; | 163 | if (t) |
163 | return __vsyscall_gtod_data.wall_time_tv.tv_sec; | 164 | *t = result; |
165 | return result; | ||
164 | } | 166 | } |
165 | 167 | ||
166 | /* Fast way to get current CPU and node. | 168 | /* Fast way to get current CPU and node. |