]> asedeno.scripts.mit.edu Git - linux.git/commit
vfs: Add timestamp_truncate() api
authorDeepa Dinamani <deepa.kernel@gmail.com>
Mon, 22 Jan 2018 02:04:25 +0000 (18:04 -0800)
committerDeepa Dinamani <deepa.kernel@gmail.com>
Fri, 30 Aug 2019 14:27:17 +0000 (07:27 -0700)
commit50e17c000c467fbc927fc001df99beb4027a5323
treefd820b8e8992477f3fa474f152358ed8c09247fd
parent188d20bcd1ebd8277d9b8a79525bd66b66d40a2a
vfs: Add timestamp_truncate() api

timespec_trunc() function is used to truncate a
filesystem timestamp to the right granularity.
But, the function does not clamp tv_sec part of the
timestamps according to the filesystem timestamp limits.

The replacement api: timestamp_truncate() also alters the
signature of the function to accommodate filesystem
timestamp clamping according to flesystem limits.

Note that the tv_nsec part is set to 0 if tv_sec is not within
the range supported for the filesystem.

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Jeff Layton <jlayton@kernel.org>
fs/inode.c
include/linux/fs.h