提交 f1390358 编写于 作者: D Dominik Brodowski

fs: add do_futimesat() helper; remove internal call to sys_futimesat()

Using this helper removes the in-kernel call to the sys_futimesat()
syscall.

This patch is part of a series which removes in-kernel calls to syscalls.
On this basis, the syscall entry path can be streamlined. For details, see
http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net

Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NDominik Brodowski <linux@dominikbrodowski.net>
上级 ee81feb6
...@@ -184,8 +184,8 @@ SYSCALL_DEFINE4(utimensat, int, dfd, const char __user *, filename, ...@@ -184,8 +184,8 @@ SYSCALL_DEFINE4(utimensat, int, dfd, const char __user *, filename,
return do_utimes(dfd, filename, utimes ? tstimes : NULL, flags); return do_utimes(dfd, filename, utimes ? tstimes : NULL, flags);
} }
SYSCALL_DEFINE3(futimesat, int, dfd, const char __user *, filename, static long do_futimesat(int dfd, const char __user *filename,
struct timeval __user *, utimes) struct timeval __user *utimes)
{ {
struct timeval times[2]; struct timeval times[2];
struct timespec64 tstimes[2]; struct timespec64 tstimes[2];
...@@ -212,10 +212,17 @@ SYSCALL_DEFINE3(futimesat, int, dfd, const char __user *, filename, ...@@ -212,10 +212,17 @@ SYSCALL_DEFINE3(futimesat, int, dfd, const char __user *, filename,
return do_utimes(dfd, filename, utimes ? tstimes : NULL, 0); return do_utimes(dfd, filename, utimes ? tstimes : NULL, 0);
} }
SYSCALL_DEFINE3(futimesat, int, dfd, const char __user *, filename,
struct timeval __user *, utimes)
{
return do_futimesat(dfd, filename, utimes);
}
SYSCALL_DEFINE2(utimes, char __user *, filename, SYSCALL_DEFINE2(utimes, char __user *, filename,
struct timeval __user *, utimes) struct timeval __user *, utimes)
{ {
return sys_futimesat(AT_FDCWD, filename, utimes); return do_futimesat(AT_FDCWD, filename, utimes);
} }
#ifdef CONFIG_COMPAT #ifdef CONFIG_COMPAT
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册