Lines Matching defs:times

19 int vfs_utimes(const struct path *path, struct timespec64 *times)
26 if (times) {
27 if (!nsec_valid(times[0].tv_nsec) ||
28 !nsec_valid(times[1].tv_nsec))
30 if (times[0].tv_nsec == UTIME_NOW &&
31 times[1].tv_nsec == UTIME_NOW)
32 times = NULL;
40 if (times) {
41 if (times[0].tv_nsec == UTIME_OMIT)
43 else if (times[0].tv_nsec != UTIME_NOW) {
44 newattrs.ia_atime = times[0];
48 if (times[1].tv_nsec == UTIME_OMIT)
50 else if (times[1].tv_nsec != UTIME_NOW) {
51 newattrs.ia_mtime = times[1];
79 struct timespec64 *times, int flags)
97 error = vfs_utimes(&path, times);
107 static int do_utimes_fd(int fd, struct timespec64 *times, int flags)
118 error = vfs_utimes(&f.file->f_path, times);
124 * do_utimes - change times on filename or file descriptor
127 * @times: new times or NULL
134 * If times==NULL, set access and modification to current time,
136 * Else, update from *times, must be owner or super user.
138 long do_utimes(int dfd, const char __user *filename, struct timespec64 *times,
142 return do_utimes_fd(dfd, times, flags);
143 return do_utimes_path(dfd, filename, times, flags);
175 struct __kernel_old_timeval times[2];
179 if (copy_from_user(&times, utimes, sizeof(times)))
187 if (times[0].tv_usec >= 1000000 || times[0].tv_usec < 0 ||
188 times[1].tv_usec >= 1000000 || times[1].tv_usec < 0)
191 tstimes[0].tv_sec = times[0].tv_sec;
192 tstimes[0].tv_nsec = 1000 * times[0].tv_usec;
193 tstimes[1].tv_sec = times[1].tv_sec;
194 tstimes[1].tv_nsec = 1000 * times[1].tv_usec;
213 SYSCALL_DEFINE2(utime, char __user *, filename, struct utimbuf __user *, times)
217 if (times) {
218 if (get_user(tv[0].tv_sec, &times->actime) ||
219 get_user(tv[1].tv_sec, &times->modtime))
224 return do_utimes(AT_FDCWD, filename, times ? tv : NULL, 0);