kernel/sys.c:do_sysinfo(): use get_monotonic_boottime()
authorOleg Nesterov <oleg@redhat.com>
Wed, 3 Jul 2013 22:05:01 +0000 (15:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:42 +0000 (16:07 -0700)
Change do_sysinfo() to use get_monotonic_boottime() instead of
do_posix_clock_monotonic_gettime() + monotonic_to_bootbased().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Tomas Janousek <tjanouse@redhat.com>
Cc: Tomas Smetana <tsmetana@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/sys.c

index c1da757a97b0da35c623f0fff911c12b0e43ea54..7bf50dcc6d5345d0a2919287f2b5e51577301132 100644 (file)
@@ -2355,8 +2355,7 @@ static int do_sysinfo(struct sysinfo *info)
 
        memset(info, 0, sizeof(struct sysinfo));
 
-       ktime_get_ts(&tp);
-       monotonic_to_bootbased(&tp);
+       get_monotonic_boottime(&tp);
        info->uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0);
 
        get_avenrun(info->loads, 0, SI_LOAD_SHIFT - FSHIFT);