提交 4eb1bca1 编写于 作者: A Arnd Bergmann 提交者: Thomas Gleixner

time: Use do_settimeofday64() internally

do_settimeofday() is a wrapper around do_settimeofday64(), so that function
can be called directly. The wrapper can be removed once the last user is
gone.
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
Cc: y2038@lists.linaro.org
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: John Stultz <john.stultz@linaro.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Deepa Dinamani <deepa.kernel@gmail.com>
Link: https://lkml.kernel.org/r/20171013183452.3635956-1-arnd@arndb.de
上级 fe460423
...@@ -82,7 +82,7 @@ SYSCALL_DEFINE1(time, time_t __user *, tloc) ...@@ -82,7 +82,7 @@ SYSCALL_DEFINE1(time, time_t __user *, tloc)
SYSCALL_DEFINE1(stime, time_t __user *, tptr) SYSCALL_DEFINE1(stime, time_t __user *, tptr)
{ {
struct timespec tv; struct timespec64 tv;
int err; int err;
if (get_user(tv.tv_sec, tptr)) if (get_user(tv.tv_sec, tptr))
...@@ -90,11 +90,11 @@ SYSCALL_DEFINE1(stime, time_t __user *, tptr) ...@@ -90,11 +90,11 @@ SYSCALL_DEFINE1(stime, time_t __user *, tptr)
tv.tv_nsec = 0; tv.tv_nsec = 0;
err = security_settime(&tv, NULL); err = security_settime64(&tv, NULL);
if (err) if (err)
return err; return err;
do_settimeofday(&tv); do_settimeofday64(&tv);
return 0; return 0;
} }
...@@ -122,7 +122,7 @@ COMPAT_SYSCALL_DEFINE1(time, compat_time_t __user *, tloc) ...@@ -122,7 +122,7 @@ COMPAT_SYSCALL_DEFINE1(time, compat_time_t __user *, tloc)
COMPAT_SYSCALL_DEFINE1(stime, compat_time_t __user *, tptr) COMPAT_SYSCALL_DEFINE1(stime, compat_time_t __user *, tptr)
{ {
struct timespec tv; struct timespec64 tv;
int err; int err;
if (get_user(tv.tv_sec, tptr)) if (get_user(tv.tv_sec, tptr))
...@@ -130,11 +130,11 @@ COMPAT_SYSCALL_DEFINE1(stime, compat_time_t __user *, tptr) ...@@ -130,11 +130,11 @@ COMPAT_SYSCALL_DEFINE1(stime, compat_time_t __user *, tptr)
tv.tv_nsec = 0; tv.tv_nsec = 0;
err = security_settime(&tv, NULL); err = security_settime64(&tv, NULL);
if (err) if (err)
return err; return err;
do_settimeofday(&tv); do_settimeofday64(&tv);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册