mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-11-30 07:29:42 -05:00
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/[email protected] Cc: Al Viro <[email protected]> Cc: Andrew Morton <[email protected]> Signed-off-by: Dominik Brodowski <[email protected]>
This commit is contained in:
parent
570484bfe8
commit
ab641afa73
1 changed files with 10 additions and 2 deletions
12
fs/utimes.c
12
fs/utimes.c
|
|
@ -260,7 +260,8 @@ COMPAT_SYSCALL_DEFINE4(utimensat, unsigned int, dfd, const char __user *, filena
|
|||
return do_utimes(dfd, filename, t ? tv : NULL, flags);
|
||||
}
|
||||
|
||||
COMPAT_SYSCALL_DEFINE3(futimesat, unsigned int, dfd, const char __user *, filename, struct compat_timeval __user *, t)
|
||||
static long do_compat_futimesat(unsigned int dfd, const char __user *filename,
|
||||
struct compat_timeval __user *t)
|
||||
{
|
||||
struct timespec64 tv[2];
|
||||
|
||||
|
|
@ -279,8 +280,15 @@ COMPAT_SYSCALL_DEFINE3(futimesat, unsigned int, dfd, const char __user *, filena
|
|||
return do_utimes(dfd, filename, t ? tv : NULL, 0);
|
||||
}
|
||||
|
||||
COMPAT_SYSCALL_DEFINE3(futimesat, unsigned int, dfd,
|
||||
const char __user *, filename,
|
||||
struct compat_timeval __user *, t)
|
||||
{
|
||||
return do_compat_futimesat(dfd, filename, t);
|
||||
}
|
||||
|
||||
COMPAT_SYSCALL_DEFINE2(utimes, const char __user *, filename, struct compat_timeval __user *, t)
|
||||
{
|
||||
return compat_sys_futimesat(AT_FDCWD, filename, t);
|
||||
return do_compat_futimesat(AT_FDCWD, filename, t);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue