utimes: Clamp the timestamps in notify_change()
authorAmir Goldstein <amir73il@gmail.com>
Sun, 24 Nov 2019 19:31:45 +0000 (21:31 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 Dec 2019 00:10:50 +0000 (19:10 -0500)
commiteb31e2f63d85d1bec4f7b136f317e03c03db5503
treeae039e9f08313d4cad16ece3fba33987940583d7
parente42617b825f8073569da76dc4510bfa019b1c35a
utimes: Clamp the timestamps in notify_change()

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>
fs/attr.c
fs/configfs/inode.c
fs/f2fs/file.c
fs/ntfs/inode.c
fs/ubifs/file.c
fs/utimes.c