Lines Matching +full:tv +full:- +full:set

1 // SPDX-License-Identifier: GPL-2.0
24 struct inode *inode = path->dentry->d_inode; in vfs_utimes()
30 return -EINVAL; in vfs_utimes()
36 error = mnt_want_write(path->mnt); in vfs_utimes()
66 error = notify_change(mnt_idmap(path->mnt), path->dentry, &newattrs, in vfs_utimes()
75 mnt_drop_write(path->mnt); in vfs_utimes()
87 return -EINVAL; in do_utimes_path()
115 return -EINVAL; in do_utimes_fd()
119 return -EBADF; in do_utimes_fd()
120 error = vfs_utimes(&f.file->f_path, times); in do_utimes_fd()
126 * do_utimes - change times on filename or file descriptor
127 * @dfd: open file descriptor, -1 or AT_FDCWD
136 * If times==NULL, set access and modification to current time,
156 return -EFAULT; in SYSCALL_DEFINE4()
182 return -EFAULT; in do_futimesat()
191 return -EINVAL; in do_futimesat()
217 struct timespec64 tv[2]; in SYSCALL_DEFINE2() local
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()
222 return -EFAULT; in SYSCALL_DEFINE2()
223 tv[0].tv_nsec = 0; in SYSCALL_DEFINE2()
224 tv[1].tv_nsec = 0; in SYSCALL_DEFINE2()
226 return do_utimes(AT_FDCWD, filename, times ? tv : NULL, 0); in SYSCALL_DEFINE2()
239 struct timespec64 tv[2]; in SYSCALL_DEFINE2() local
242 if (get_user(tv[0].tv_sec, &t->actime) || in SYSCALL_DEFINE2()
243 get_user(tv[1].tv_sec, &t->modtime)) in SYSCALL_DEFINE2()
244 return -EFAULT; in SYSCALL_DEFINE2()
245 tv[0].tv_nsec = 0; in SYSCALL_DEFINE2()
246 tv[1].tv_nsec = 0; in SYSCALL_DEFINE2()
248 return do_utimes(AT_FDCWD, filename, t ? tv : NULL, 0); in SYSCALL_DEFINE2()
254 struct timespec64 tv[2]; in SYSCALL_DEFINE4() local
257 if (get_old_timespec32(&tv[0], &t[0]) || in SYSCALL_DEFINE4()
258 get_old_timespec32(&tv[1], &t[1])) in SYSCALL_DEFINE4()
259 return -EFAULT; in SYSCALL_DEFINE4()
261 if (tv[0].tv_nsec == UTIME_OMIT && tv[1].tv_nsec == UTIME_OMIT) in SYSCALL_DEFINE4()
264 return do_utimes(dfd, filename, t ? tv : NULL, flags); in SYSCALL_DEFINE4()
271 struct timespec64 tv[2]; in do_compat_futimesat() local
274 if (get_user(tv[0].tv_sec, &t[0].tv_sec) || in do_compat_futimesat()
275 get_user(tv[0].tv_nsec, &t[0].tv_usec) || in do_compat_futimesat()
276 get_user(tv[1].tv_sec, &t[1].tv_sec) || in do_compat_futimesat()
277 get_user(tv[1].tv_nsec, &t[1].tv_usec)) in do_compat_futimesat()
278 return -EFAULT; in do_compat_futimesat()
279 if (tv[0].tv_nsec >= 1000000 || tv[0].tv_nsec < 0 || in do_compat_futimesat()
280 tv[1].tv_nsec >= 1000000 || tv[1].tv_nsec < 0) in do_compat_futimesat()
281 return -EINVAL; in do_compat_futimesat()
282 tv[0].tv_nsec *= 1000; in do_compat_futimesat()
283 tv[1].tv_nsec *= 1000; in do_compat_futimesat()
285 return do_utimes(dfd, filename, t ? tv : NULL, 0); in do_compat_futimesat()