fs: Replace CURRENT_TIME with current_time() for inode timestamps
authorDeepa Dinamani <deepa.kernel@gmail.com>
Wed, 14 Sep 2016 14:48:04 +0000 (07:48 -0700)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 28 Sep 2016 01:06:21 +0000 (21:06 -0400)
commit078cd8279e659989b103359bb22373cc79445bde
tree923e3fe84d232cc9ba31481852ea1faf46f56fb6
parent2554c72edb81c97ae5307613dd0aee1ef8dd13ca
fs: Replace CURRENT_TIME with current_time() for inode timestamps

CURRENT_TIME macro is not appropriate for filesystems as it
doesn't use the right granularity for filesystem timestamps.
Use current_time() instead.

CURRENT_TIME is also not y2038 safe.

This is also in preparation for the patch that transitions
vfs timestamps to use 64 bit time and hence make them
y2038 safe. As part of the effort current_time() will be
extended to do range checks. Hence, it is necessary for all
file system timestamps to use current_time(). Also,
current_time() will be transitioned along with vfs to be
y2038 safe.

Note that whenever a single call to current_time() is used
to change timestamps in different inodes, it is because they
share the same time granularity.

Signed-off-by: Deepa Dinamani <deepa.kernel@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Felipe Balbi <balbi@kernel.org>
Acked-by: Steven Whitehouse <swhiteho@redhat.com>
Acked-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Acked-by: David Sterba <dsterba@suse.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
76 files changed:
arch/powerpc/platforms/cell/spufs/inode.c
arch/s390/hypfs/inode.c
drivers/infiniband/hw/qib/qib_fs.c
drivers/misc/ibmasm/ibmasmfs.c
drivers/oprofile/oprofilefs.c
drivers/usb/core/devio.c
drivers/usb/gadget/function/f_fs.c
drivers/usb/gadget/legacy/inode.c
fs/9p/vfs_inode.c
fs/adfs/inode.c
fs/autofs4/inode.c
fs/autofs4/root.c
fs/devpts/inode.c
fs/efivarfs/inode.c
fs/exofs/dir.c
fs/exofs/inode.c
fs/exofs/namei.c
fs/ext2/super.c
fs/f2fs/dir.c
fs/f2fs/file.c
fs/f2fs/inline.c
fs/f2fs/namei.c
fs/fuse/control.c
fs/gfs2/bmap.c
fs/gfs2/dir.c
fs/gfs2/inode.c
fs/gfs2/quota.c
fs/gfs2/xattr.c
fs/hugetlbfs/inode.c
fs/jfs/acl.c
fs/jfs/inode.c
fs/jfs/jfs_inode.c
fs/jfs/namei.c
fs/jfs/super.c
fs/jfs/xattr.c
fs/libfs.c
fs/logfs/dir.c
fs/logfs/file.c
fs/logfs/inode.c
fs/logfs/readwrite.c
fs/nilfs2/dir.c
fs/nilfs2/inode.c
fs/nilfs2/ioctl.c
fs/nilfs2/namei.c
fs/nsfs.c
fs/ocfs2/acl.c
fs/ocfs2/alloc.c
fs/ocfs2/aops.c
fs/ocfs2/dir.c
fs/ocfs2/dlmfs/dlmfs.c
fs/ocfs2/file.c
fs/ocfs2/move_extents.c
fs/ocfs2/namei.c
fs/ocfs2/refcounttree.c
fs/ocfs2/xattr.c
fs/omfs/inode.c
fs/openpromfs/inode.c
fs/orangefs/file.c
fs/orangefs/inode.c
fs/pipe.c
fs/posix_acl.c
fs/proc/base.c
fs/proc/inode.c
fs/proc/proc_sysctl.c
fs/proc/self.c
fs/proc/thread_self.c
fs/pstore/inode.c
fs/ramfs/inode.c
fs/tracefs/inode.c
ipc/mqueue.c
kernel/bpf/inode.c
mm/shmem.c
net/sunrpc/rpc_pipe.c
security/apparmor/apparmorfs.c
security/inode.c
security/selinux/selinuxfs.c