Lines Matching full:times
19 int vfs_utimes(const struct path *path, struct timespec64 *times) in vfs_utimes() argument
26 if (times) { in vfs_utimes()
27 if (!nsec_valid(times[0].tv_nsec) || in vfs_utimes()
28 !nsec_valid(times[1].tv_nsec)) in vfs_utimes()
30 if (times[0].tv_nsec == UTIME_NOW && in vfs_utimes()
31 times[1].tv_nsec == UTIME_NOW) in vfs_utimes()
32 times = NULL; in vfs_utimes()
40 if (times) { in vfs_utimes()
41 if (times[0].tv_nsec == UTIME_OMIT) in vfs_utimes()
43 else if (times[0].tv_nsec != UTIME_NOW) { in vfs_utimes()
44 newattrs.ia_atime = times[0]; in vfs_utimes()
48 if (times[1].tv_nsec == UTIME_OMIT) in vfs_utimes()
50 else if (times[1].tv_nsec != UTIME_NOW) { in vfs_utimes()
51 newattrs.ia_mtime = times[1]; in vfs_utimes()
79 struct timespec64 *times, int flags) in do_utimes_path() argument
97 error = vfs_utimes(&path, times); in do_utimes_path()
107 static int do_utimes_fd(int fd, struct timespec64 *times, int flags) in do_utimes_fd() argument
118 error = vfs_utimes(&f.file->f_path, times); in do_utimes_fd()
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, in do_utimes() argument
142 return do_utimes_fd(dfd, times, flags); in do_utimes()
143 return do_utimes_path(dfd, filename, times, flags); in do_utimes()
175 struct __kernel_old_timeval times[2]; in do_futimesat() local
179 if (copy_from_user(×, utimes, sizeof(times))) in do_futimesat()
187 if (times[0].tv_usec >= 1000000 || times[0].tv_usec < 0 || in do_futimesat()
188 times[1].tv_usec >= 1000000 || times[1].tv_usec < 0) in do_futimesat()
191 tstimes[0].tv_sec = times[0].tv_sec; in do_futimesat()
192 tstimes[0].tv_nsec = 1000 * times[0].tv_usec; in do_futimesat()
193 tstimes[1].tv_sec = times[1].tv_sec; in do_futimesat()
194 tstimes[1].tv_nsec = 1000 * times[1].tv_usec; in do_futimesat()
213 SYSCALL_DEFINE2(utime, char __user *, filename, struct utimbuf __user *, times) in SYSCALL_DEFINE2() argument
217 if (times) { in SYSCALL_DEFINE2()
218 if (get_user(tv[0].tv_sec, ×->actime) || in SYSCALL_DEFINE2()
219 get_user(tv[1].tv_sec, ×->modtime)) in SYSCALL_DEFINE2()
224 return do_utimes(AT_FDCWD, filename, times ? tv : NULL, 0); in SYSCALL_DEFINE2()