Lines Matching full:times

20 int vfs_utimes(const struct path *path, struct timespec64 *times)  in vfs_utimes()  argument
27 if (times) { in vfs_utimes()
28 if (!nsec_valid(times[0].tv_nsec) || in vfs_utimes()
29 !nsec_valid(times[1].tv_nsec)) in vfs_utimes()
31 if (times[0].tv_nsec == UTIME_NOW && in vfs_utimes()
32 times[1].tv_nsec == UTIME_NOW) in vfs_utimes()
33 times = NULL; in vfs_utimes()
41 if (times) { in vfs_utimes()
42 if (times[0].tv_nsec == UTIME_OMIT) in vfs_utimes()
44 else if (times[0].tv_nsec != UTIME_NOW) { in vfs_utimes()
45 newattrs.ia_atime = times[0]; in vfs_utimes()
49 if (times[1].tv_nsec == UTIME_OMIT) in vfs_utimes()
51 else if (times[1].tv_nsec != UTIME_NOW) { in vfs_utimes()
52 newattrs.ia_mtime = times[1]; in vfs_utimes()
81 struct timespec64 *times, int flags) in do_utimes_path() argument
99 error = vfs_utimes(&path, times); in do_utimes_path()
109 static int do_utimes_fd(int fd, struct timespec64 *times, int flags) in do_utimes_fd() argument
120 error = vfs_utimes(&fd_file(f)->f_path, times); in do_utimes_fd()
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, in do_utimes() argument
144 return do_utimes_fd(dfd, times, flags); in do_utimes()
145 return do_utimes_path(dfd, filename, times, flags); in do_utimes()
177 struct __kernel_old_timeval times[2]; in do_futimesat() local
181 if (copy_from_user(&times, utimes, sizeof(times))) in do_futimesat()
189 if (times[0].tv_usec >= 1000000 || times[0].tv_usec < 0 || in do_futimesat()
190 times[1].tv_usec >= 1000000 || times[1].tv_usec < 0) in do_futimesat()
193 tstimes[0].tv_sec = times[0].tv_sec; in do_futimesat()
194 tstimes[0].tv_nsec = 1000 * times[0].tv_usec; in do_futimesat()
195 tstimes[1].tv_sec = times[1].tv_sec; in do_futimesat()
196 tstimes[1].tv_nsec = 1000 * times[1].tv_usec; in do_futimesat()
215 SYSCALL_DEFINE2(utime, char __user *, filename, struct utimbuf __user *, times) in SYSCALL_DEFINE2() argument
219 if (times) { in SYSCALL_DEFINE2()
220 if (get_user(tv[0].tv_sec, &times->actime) || in SYSCALL_DEFINE2()
221 get_user(tv[1].tv_sec, &times->modtime)) in SYSCALL_DEFINE2()
226 return do_utimes(AT_FDCWD, filename, times ? tv : NULL, 0); in SYSCALL_DEFINE2()