Lines Matching refs:times

19 static int utimes_common(const struct path *path, struct timespec64 *times)  in utimes_common()  argument
30 if (times && times[0].tv_nsec == UTIME_NOW && in utimes_common()
31 times[1].tv_nsec == UTIME_NOW) in utimes_common()
32 times = NULL; in utimes_common()
35 if (times) { in utimes_common()
36 if (times[0].tv_nsec == UTIME_OMIT) in utimes_common()
38 else if (times[0].tv_nsec != UTIME_NOW) { in utimes_common()
39 newattrs.ia_atime = timestamp_truncate(times[0], inode); in utimes_common()
43 if (times[1].tv_nsec == UTIME_OMIT) in utimes_common()
45 else if (times[1].tv_nsec != UTIME_NOW) { in utimes_common()
46 newattrs.ia_mtime = timestamp_truncate(times[1], inode); in utimes_common()
88 long do_utimes(int dfd, const char __user *filename, struct timespec64 *times, in do_utimes() argument
93 if (times && (!nsec_valid(times[0].tv_nsec) || in do_utimes()
94 !nsec_valid(times[1].tv_nsec))) { in do_utimes()
112 error = utimes_common(&f.file->f_path, times); in do_utimes()
125 error = utimes_common(&path, times); in do_utimes()
166 struct timeval times[2]; in do_futimesat() local
170 if (copy_from_user(&times, utimes, sizeof(times))) in do_futimesat()
178 if (times[0].tv_usec >= 1000000 || times[0].tv_usec < 0 || in do_futimesat()
179 times[1].tv_usec >= 1000000 || times[1].tv_usec < 0) in do_futimesat()
182 tstimes[0].tv_sec = times[0].tv_sec; in do_futimesat()
183 tstimes[0].tv_nsec = 1000 * times[0].tv_usec; in do_futimesat()
184 tstimes[1].tv_sec = times[1].tv_sec; in do_futimesat()
185 tstimes[1].tv_nsec = 1000 * times[1].tv_usec; in do_futimesat()
204 SYSCALL_DEFINE2(utime, char __user *, filename, struct utimbuf __user *, times) in SYSCALL_DEFINE2() argument
208 if (times) { in SYSCALL_DEFINE2()
209 if (get_user(tv[0].tv_sec, &times->actime) || in SYSCALL_DEFINE2()
210 get_user(tv[1].tv_sec, &times->modtime)) in SYSCALL_DEFINE2()
215 return do_utimes(AT_FDCWD, filename, times ? tv : NULL, 0); in SYSCALL_DEFINE2()