1 #include <linux/compiler.h>
4 #include <linux/linkage.h>
7 #include <linux/sched.h>
8 #include <linux/stat.h>
11 #include <asm/uaccess.h>
12 #include <asm/unistd.h>
14 #ifdef __ARCH_WANT_SYS_UTIME
43 static bool nsec_valid(
long nsec)
48 return nsec >= 0 && nsec <= 999999999;
54 struct iattr newattrs;
70 newattrs.ia_atime.tv_sec = times[0].
tv_sec;
71 newattrs.ia_atime.tv_nsec = times[0].
tv_nsec;
78 newattrs.ia_mtime.tv_sec = times[1].
tv_sec;
79 newattrs.ia_mtime.tv_nsec = times[1].
tv_nsec;
96 goto mnt_drop_write_and_out;
101 goto mnt_drop_write_and_out;
108 mnt_drop_write_and_out:
134 if (times && (!nsec_valid(times[0].
tv_nsec) ||
135 !nsec_valid(times[1].tv_nsec))) {
153 error = utimes_common(&f.
file->f_path, times);
157 int lookup_flags = 0;
162 error =
user_path_at(dfd, filename, lookup_flags, &path);
166 error = utimes_common(&path, times);
193 struct timeval __user *, utimes)
221 struct timeval __user *, utimes)