• Deepa Dinamani's avatar
    vfs: Add timestamp_truncate() api · 50e17c00
    Deepa Dinamani authored
    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: default avatarDeepa Dinamani <deepa.kernel@gmail.com>
    Acked-by: default avatarJeff Layton <jlayton@kernel.org>
    50e17c00
inode.c 60.6 KB