diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2018-03-20 14:39:44 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2018-04-02 14:15:44 -0400 |
commit | ab641afa73fbcdee962c4ec9641dd561fdae9944 (patch) | |
tree | d593ce59cbbc3acf035116b9f1f29b7208176e1b | |
parent | 570484bfe813fa67da003077898a7046767cb4d1 (diff) |
fs: add do_compat_futimesat() helper; remove in-kernel call to compat syscall
Using the fs-internal do_compat_futimesat() helper allows us to get rid of
the fs-internal call to the compat_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: Al Viro <viro@zeniv.linux.org.uk>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r-- | fs/utimes.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/fs/utimes.c b/fs/utimes.c index 5be035ed26c0..69d4b6ba1bfb 100644 --- a/fs/utimes.c +++ b/fs/utimes.c | |||
@@ -260,7 +260,8 @@ COMPAT_SYSCALL_DEFINE4(utimensat, unsigned int, dfd, const char __user *, filena | |||
260 | return do_utimes(dfd, filename, t ? tv : NULL, flags); | 260 | return do_utimes(dfd, filename, t ? tv : NULL, flags); |
261 | } | 261 | } |
262 | 262 | ||
263 | COMPAT_SYSCALL_DEFINE3(futimesat, unsigned int, dfd, const char __user *, filename, struct compat_timeval __user *, t) | 263 | static long do_compat_futimesat(unsigned int dfd, const char __user *filename, |
264 | struct compat_timeval __user *t) | ||
264 | { | 265 | { |
265 | struct timespec64 tv[2]; | 266 | struct timespec64 tv[2]; |
266 | 267 | ||
@@ -279,8 +280,15 @@ COMPAT_SYSCALL_DEFINE3(futimesat, unsigned int, dfd, const char __user *, filena | |||
279 | return do_utimes(dfd, filename, t ? tv : NULL, 0); | 280 | return do_utimes(dfd, filename, t ? tv : NULL, 0); |
280 | } | 281 | } |
281 | 282 | ||
283 | COMPAT_SYSCALL_DEFINE3(futimesat, unsigned int, dfd, | ||
284 | const char __user *, filename, | ||
285 | struct compat_timeval __user *, t) | ||
286 | { | ||
287 | return do_compat_futimesat(dfd, filename, t); | ||
288 | } | ||
289 | |||
282 | COMPAT_SYSCALL_DEFINE2(utimes, const char __user *, filename, struct compat_timeval __user *, t) | 290 | COMPAT_SYSCALL_DEFINE2(utimes, const char __user *, filename, struct compat_timeval __user *, t) |
283 | { | 291 | { |
284 | return compat_sys_futimesat(AT_FDCWD, filename, t); | 292 | return do_compat_futimesat(AT_FDCWD, filename, t); |
285 | } | 293 | } |
286 | #endif | 294 | #endif |