]> www.infradead.org Git - users/dwmw2/linux.git/commit
utimes: Clamp the timestamps in notify_change()
authorAmir Goldstein <amir73il@gmail.com>
Sun, 24 Nov 2019 19:31:45 +0000 (21:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:36:43 +0000 (04:36 -0800)
commit31cc485e2e15bf4857e38bf02c552bb0c5c8f611
tree1ec83d2d472de54597e2942ababbaaa3e0288aec
parentd9bcf068b491cf0d517c6f80a9428120771ba79b
utimes: Clamp the timestamps in notify_change()

commit eb31e2f63d85d1bec4f7b136f317e03c03db5503 upstream.

Push clamping timestamps into notify_change(), so in-kernel
callers like nfsd and overlayfs will get similar timestamp
set behavior as utimes.

AV: get rid of clamping in ->setattr() instances; we don't need
to bother with that there, with notify_change() doing normalization
in all cases now (it already did for implicit case, since current_time()
clamps).

Suggested-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: 42e729b9ddbb ("utimes: Clamp the timestamps before update")
Cc: stable@vger.kernel.org # v5.4
Cc: Deepa Dinamani <deepa.kernel@gmail.com>
Cc: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/attr.c
fs/configfs/inode.c
fs/f2fs/file.c
fs/ntfs/inode.c
fs/ubifs/file.c
fs/utimes.c