Lines Matching refs:times

20 int vfs_utimes(const struct path *path, struct timespec64 *times)
27 if (times) {
28 if (!nsec_valid(times[0].tv_nsec) ||
29 !nsec_valid(times[1].tv_nsec))
31 if (times[0].tv_nsec == UTIME_NOW &&
32 times[1].tv_nsec == UTIME_NOW)
33 times = NULL;
41 if (times) {
42 if (times[0].tv_nsec == UTIME_OMIT)
44 else if (times[0].tv_nsec != UTIME_NOW) {
45 newattrs.ia_atime = times[0];
49 if (times[1].tv_nsec == UTIME_OMIT)
51 else if (times[1].tv_nsec != UTIME_NOW) {
52 newattrs.ia_mtime = times[1];
81 struct timespec64 *times, int flags)
99 error = vfs_utimes(&path, times);
109 static int do_utimes_fd(int fd, struct timespec64 *times, int flags)
120 error = vfs_utimes(&f.file->f_path, times);
126 * do_utimes - change times on filename or file descriptor
129 * @times: new times or NULL
136 * If times==NULL, set access and modification to current time,
138 * Else, update from *times, must be owner or super user.
140 long do_utimes(int dfd, const char __user *filename, struct timespec64 *times,
144 return do_utimes_fd(dfd, times, flags);
145 return do_utimes_path(dfd, filename, times, flags);
177 struct __kernel_old_timeval times[2];
181 if (copy_from_user(&times, utimes, sizeof(times)))
189 if (times[0].tv_usec >= 1000000 || times[0].tv_usec < 0 ||
190 times[1].tv_usec >= 1000000 || times[1].tv_usec < 0)
193 tstimes[0].tv_sec = times[0].tv_sec;
194 tstimes[0].tv_nsec = 1000 * times[0].tv_usec;
195 tstimes[1].tv_sec = times[1].tv_sec;
196 tstimes[1].tv_nsec = 1000 * times[1].tv_usec;
215 SYSCALL_DEFINE2(utime, char __user *, filename, struct utimbuf __user *, times)
219 if (times) {
220 if (get_user(tv[0].tv_sec, &times->actime) ||
221 get_user(tv[1].tv_sec, &times->modtime))
226 return do_utimes(AT_FDCWD, filename, times ? tv : NULL, 0);