summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDeepa Dinamani <deepa.kernel@gmail.com>2016-09-14 10:48:04 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-09-27 21:06:21 -0400
commit078cd8279e659989b103359bb22373cc79445bde (patch)
tree923e3fe84d232cc9ba31481852ea1faf46f56fb6
parent2554c72edb81c97ae5307613dd0aee1ef8dd13ca (diff)
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>
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c2
-rw-r--r--arch/s390/hypfs/inode.c4
-rw-r--r--drivers/infiniband/hw/qib/qib_fs.c2
-rw-r--r--drivers/misc/ibmasm/ibmasmfs.c2
-rw-r--r--drivers/oprofile/oprofilefs.c2
-rw-r--r--drivers/usb/core/devio.c18
-rw-r--r--drivers/usb/gadget/function/f_fs.c8
-rw-r--r--drivers/usb/gadget/legacy/inode.c2
-rw-r--r--fs/9p/vfs_inode.c2
-rw-r--r--fs/adfs/inode.c2
-rw-r--r--fs/autofs4/inode.c2
-rw-r--r--fs/autofs4/root.c6
-rw-r--r--fs/devpts/inode.c6
-rw-r--r--fs/efivarfs/inode.c2
-rw-r--r--fs/exofs/dir.c6
-rw-r--r--fs/exofs/inode.c4
-rw-r--r--fs/exofs/namei.c6
-rw-r--r--fs/ext2/super.c2
-rw-r--r--fs/f2fs/dir.c8
-rw-r--r--fs/f2fs/file.c8
-rw-r--r--fs/f2fs/inline.c2
-rw-r--r--fs/f2fs/namei.c12
-rw-r--r--fs/fuse/control.c2
-rw-r--r--fs/gfs2/bmap.c8
-rw-r--r--fs/gfs2/dir.c12
-rw-r--r--fs/gfs2/inode.c8
-rw-r--r--fs/gfs2/quota.c2
-rw-r--r--fs/gfs2/xattr.c8
-rw-r--r--fs/hugetlbfs/inode.c10
-rw-r--r--fs/jfs/acl.c2
-rw-r--r--fs/jfs/inode.c2
-rw-r--r--fs/jfs/jfs_inode.c2
-rw-r--r--fs/jfs/namei.c22
-rw-r--r--fs/jfs/super.c2
-rw-r--r--fs/jfs/xattr.c2
-rw-r--r--fs/libfs.c14
-rw-r--r--fs/logfs/dir.c6
-rw-r--r--fs/logfs/file.c2
-rw-r--r--fs/logfs/inode.c4
-rw-r--r--fs/logfs/readwrite.c4
-rw-r--r--fs/nilfs2/dir.c6
-rw-r--r--fs/nilfs2/inode.c4
-rw-r--r--fs/nilfs2/ioctl.c2
-rw-r--r--fs/nilfs2/namei.c6
-rw-r--r--fs/nsfs.c2
-rw-r--r--fs/ocfs2/acl.c2
-rw-r--r--fs/ocfs2/alloc.c2
-rw-r--r--fs/ocfs2/aops.c2
-rw-r--r--fs/ocfs2/dir.c4
-rw-r--r--fs/ocfs2/dlmfs/dlmfs.c4
-rw-r--r--fs/ocfs2/file.c12
-rw-r--r--fs/ocfs2/move_extents.c2
-rw-r--r--fs/ocfs2/namei.c10
-rw-r--r--fs/ocfs2/refcounttree.c4
-rw-r--r--fs/ocfs2/xattr.c2
-rw-r--r--fs/omfs/inode.c2
-rw-r--r--fs/openpromfs/inode.c2
-rw-r--r--fs/orangefs/file.c2
-rw-r--r--fs/orangefs/inode.c2
-rw-r--r--fs/pipe.c2
-rw-r--r--fs/posix_acl.c2
-rw-r--r--fs/proc/base.c2
-rw-r--r--fs/proc/inode.c2
-rw-r--r--fs/proc/proc_sysctl.c2
-rw-r--r--fs/proc/self.c2
-rw-r--r--fs/proc/thread_self.c2
-rw-r--r--fs/pstore/inode.c2
-rw-r--r--fs/ramfs/inode.c6
-rw-r--r--fs/tracefs/inode.c2
-rw-r--r--ipc/mqueue.c18
-rw-r--r--kernel/bpf/inode.c2
-rw-r--r--mm/shmem.c20
-rw-r--r--net/sunrpc/rpc_pipe.c2
-rw-r--r--security/apparmor/apparmorfs.c2
-rw-r--r--security/inode.c2
-rw-r--r--security/selinux/selinuxfs.c2
76 files changed, 182 insertions, 182 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 2975754c65ea..5364d4a54249 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -103,7 +103,7 @@ spufs_new_inode(struct super_block *sb, umode_t mode)
103 inode->i_mode = mode; 103 inode->i_mode = mode;
104 inode->i_uid = current_fsuid(); 104 inode->i_uid = current_fsuid();
105 inode->i_gid = current_fsgid(); 105 inode->i_gid = current_fsgid();
106 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 106 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
107out: 107out:
108 return inode; 108 return inode;
109} 109}
diff --git a/arch/s390/hypfs/inode.c b/arch/s390/hypfs/inode.c
index 255c7eec4481..09bccb224d03 100644
--- a/arch/s390/hypfs/inode.c
+++ b/arch/s390/hypfs/inode.c
@@ -51,7 +51,7 @@ static void hypfs_update_update(struct super_block *sb)
51 struct inode *inode = d_inode(sb_info->update_file); 51 struct inode *inode = d_inode(sb_info->update_file);
52 52
53 sb_info->last_update = get_seconds(); 53 sb_info->last_update = get_seconds();
54 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 54 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
55} 55}
56 56
57/* directory tree removal functions */ 57/* directory tree removal functions */
@@ -99,7 +99,7 @@ static struct inode *hypfs_make_inode(struct super_block *sb, umode_t mode)
99 ret->i_mode = mode; 99 ret->i_mode = mode;
100 ret->i_uid = hypfs_info->uid; 100 ret->i_uid = hypfs_info->uid;
101 ret->i_gid = hypfs_info->gid; 101 ret->i_gid = hypfs_info->gid;
102 ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; 102 ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
103 if (S_ISDIR(mode)) 103 if (S_ISDIR(mode))
104 set_nlink(ret, 2); 104 set_nlink(ret, 2);
105 } 105 }
diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c
index c3edc033f7c4..f1e66efea98a 100644
--- a/drivers/infiniband/hw/qib/qib_fs.c
+++ b/drivers/infiniband/hw/qib/qib_fs.c
@@ -64,7 +64,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry,
64 inode->i_uid = GLOBAL_ROOT_UID; 64 inode->i_uid = GLOBAL_ROOT_UID;
65 inode->i_gid = GLOBAL_ROOT_GID; 65 inode->i_gid = GLOBAL_ROOT_GID;
66 inode->i_blocks = 0; 66 inode->i_blocks = 0;
67 inode->i_atime = CURRENT_TIME; 67 inode->i_atime = current_time(inode);
68 inode->i_mtime = inode->i_atime; 68 inode->i_mtime = inode->i_atime;
69 inode->i_ctime = inode->i_atime; 69 inode->i_ctime = inode->i_atime;
70 inode->i_private = data; 70 inode->i_private = data;
diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c
index 9c677f3f3c26..520f58439080 100644
--- a/drivers/misc/ibmasm/ibmasmfs.c
+++ b/drivers/misc/ibmasm/ibmasmfs.c
@@ -144,7 +144,7 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode)
144 if (ret) { 144 if (ret) {
145 ret->i_ino = get_next_ino(); 145 ret->i_ino = get_next_ino();
146 ret->i_mode = mode; 146 ret->i_mode = mode;
147 ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; 147 ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
148 } 148 }
149 return ret; 149 return ret;
150} 150}
diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c
index a0e5260bd006..134398e0231b 100644
--- a/drivers/oprofile/oprofilefs.c
+++ b/drivers/oprofile/oprofilefs.c
@@ -30,7 +30,7 @@ static struct inode *oprofilefs_get_inode(struct super_block *sb, int mode)
30 if (inode) { 30 if (inode) {
31 inode->i_ino = get_next_ino(); 31 inode->i_ino = get_next_ino();
32 inode->i_mode = mode; 32 inode->i_mode = mode;
33 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 33 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
34 } 34 }
35 return inode; 35 return inode;
36} 36}
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 09c8d9ca61ae..4016dae7433b 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -2409,21 +2409,21 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
2409 snoop(&dev->dev, "%s: CONTROL\n", __func__); 2409 snoop(&dev->dev, "%s: CONTROL\n", __func__);
2410 ret = proc_control(ps, p); 2410 ret = proc_control(ps, p);
2411 if (ret >= 0) 2411 if (ret >= 0)
2412 inode->i_mtime = CURRENT_TIME; 2412 inode->i_mtime = current_time(inode);
2413 break; 2413 break;
2414 2414
2415 case USBDEVFS_BULK: 2415 case USBDEVFS_BULK:
2416 snoop(&dev->dev, "%s: BULK\n", __func__); 2416 snoop(&dev->dev, "%s: BULK\n", __func__);
2417 ret = proc_bulk(ps, p); 2417 ret = proc_bulk(ps, p);
2418 if (ret >= 0) 2418 if (ret >= 0)
2419 inode->i_mtime = CURRENT_TIME; 2419 inode->i_mtime = current_time(inode);
2420 break; 2420 break;
2421 2421
2422 case USBDEVFS_RESETEP: 2422 case USBDEVFS_RESETEP:
2423 snoop(&dev->dev, "%s: RESETEP\n", __func__); 2423 snoop(&dev->dev, "%s: RESETEP\n", __func__);
2424 ret = proc_resetep(ps, p); 2424 ret = proc_resetep(ps, p);
2425 if (ret >= 0) 2425 if (ret >= 0)
2426 inode->i_mtime = CURRENT_TIME; 2426 inode->i_mtime = current_time(inode);
2427 break; 2427 break;
2428 2428
2429 case USBDEVFS_RESET: 2429 case USBDEVFS_RESET:
@@ -2435,7 +2435,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
2435 snoop(&dev->dev, "%s: CLEAR_HALT\n", __func__); 2435 snoop(&dev->dev, "%s: CLEAR_HALT\n", __func__);
2436 ret = proc_clearhalt(ps, p); 2436 ret = proc_clearhalt(ps, p);
2437 if (ret >= 0) 2437 if (ret >= 0)
2438 inode->i_mtime = CURRENT_TIME; 2438 inode->i_mtime = current_time(inode);
2439 break; 2439 break;
2440 2440
2441 case USBDEVFS_GETDRIVER: 2441 case USBDEVFS_GETDRIVER:
@@ -2462,7 +2462,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
2462 snoop(&dev->dev, "%s: SUBMITURB\n", __func__); 2462 snoop(&dev->dev, "%s: SUBMITURB\n", __func__);
2463 ret = proc_submiturb(ps, p); 2463 ret = proc_submiturb(ps, p);
2464 if (ret >= 0) 2464 if (ret >= 0)
2465 inode->i_mtime = CURRENT_TIME; 2465 inode->i_mtime = current_time(inode);
2466 break; 2466 break;
2467 2467
2468#ifdef CONFIG_COMPAT 2468#ifdef CONFIG_COMPAT
@@ -2470,14 +2470,14 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
2470 snoop(&dev->dev, "%s: CONTROL32\n", __func__); 2470 snoop(&dev->dev, "%s: CONTROL32\n", __func__);
2471 ret = proc_control_compat(ps, p); 2471 ret = proc_control_compat(ps, p);
2472 if (ret >= 0) 2472 if (ret >= 0)
2473 inode->i_mtime = CURRENT_TIME; 2473 inode->i_mtime = current_time(inode);
2474 break; 2474 break;
2475 2475
2476 case USBDEVFS_BULK32: 2476 case USBDEVFS_BULK32:
2477 snoop(&dev->dev, "%s: BULK32\n", __func__); 2477 snoop(&dev->dev, "%s: BULK32\n", __func__);
2478 ret = proc_bulk_compat(ps, p); 2478 ret = proc_bulk_compat(ps, p);
2479 if (ret >= 0) 2479 if (ret >= 0)
2480 inode->i_mtime = CURRENT_TIME; 2480 inode->i_mtime = current_time(inode);
2481 break; 2481 break;
2482 2482
2483 case USBDEVFS_DISCSIGNAL32: 2483 case USBDEVFS_DISCSIGNAL32:
@@ -2489,7 +2489,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
2489 snoop(&dev->dev, "%s: SUBMITURB32\n", __func__); 2489 snoop(&dev->dev, "%s: SUBMITURB32\n", __func__);
2490 ret = proc_submiturb_compat(ps, p); 2490 ret = proc_submiturb_compat(ps, p);
2491 if (ret >= 0) 2491 if (ret >= 0)
2492 inode->i_mtime = CURRENT_TIME; 2492 inode->i_mtime = current_time(inode);
2493 break; 2493 break;
2494 2494
2495 case USBDEVFS_IOCTL32: 2495 case USBDEVFS_IOCTL32:
@@ -2552,7 +2552,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
2552 done: 2552 done:
2553 usb_unlock_device(dev); 2553 usb_unlock_device(dev);
2554 if (ret >= 0) 2554 if (ret >= 0)
2555 inode->i_atime = CURRENT_TIME; 2555 inode->i_atime = current_time(inode);
2556 return ret; 2556 return ret;
2557} 2557}
2558 2558
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index 5c8429f23a89..2f3fa4dde695 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -1193,15 +1193,15 @@ ffs_sb_make_inode(struct super_block *sb, void *data,
1193 inode = new_inode(sb); 1193 inode = new_inode(sb);
1194 1194
1195 if (likely(inode)) { 1195 if (likely(inode)) {
1196 struct timespec current_time = CURRENT_TIME; 1196 struct timespec ts = current_time(inode);
1197 1197
1198 inode->i_ino = get_next_ino(); 1198 inode->i_ino = get_next_ino();
1199 inode->i_mode = perms->mode; 1199 inode->i_mode = perms->mode;
1200 inode->i_uid = perms->uid; 1200 inode->i_uid = perms->uid;
1201 inode->i_gid = perms->gid; 1201 inode->i_gid = perms->gid;
1202 inode->i_atime = current_time; 1202 inode->i_atime = ts;
1203 inode->i_mtime = current_time; 1203 inode->i_mtime = ts;
1204 inode->i_ctime = current_time; 1204 inode->i_ctime = ts;
1205 inode->i_private = data; 1205 inode->i_private = data;
1206 if (fops) 1206 if (fops)
1207 inode->i_fop = fops; 1207 inode->i_fop = fops;
diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c
index 16104b5ebdcb..bd82dd12deff 100644
--- a/drivers/usb/gadget/legacy/inode.c
+++ b/drivers/usb/gadget/legacy/inode.c
@@ -1913,7 +1913,7 @@ gadgetfs_make_inode (struct super_block *sb,
1913 inode->i_uid = make_kuid(&init_user_ns, default_uid); 1913 inode->i_uid = make_kuid(&init_user_ns, default_uid);
1914 inode->i_gid = make_kgid(&init_user_ns, default_gid); 1914 inode->i_gid = make_kgid(&init_user_ns, default_gid);
1915 inode->i_atime = inode->i_mtime = inode->i_ctime 1915 inode->i_atime = inode->i_mtime = inode->i_ctime
1916 = CURRENT_TIME; 1916 = current_time(inode);
1917 inode->i_private = data; 1917 inode->i_private = data;
1918 inode->i_fop = fops; 1918 inode->i_fop = fops;
1919 } 1919 }
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 8b1999b528e9..44fa598e6349 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -276,7 +276,7 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses,
276 inode_init_owner(inode, NULL, mode); 276 inode_init_owner(inode, NULL, mode);
277 inode->i_blocks = 0; 277 inode->i_blocks = 0;
278 inode->i_rdev = rdev; 278 inode->i_rdev = rdev;
279 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 279 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
280 inode->i_mapping->a_ops = &v9fs_addr_operations; 280 inode->i_mapping->a_ops = &v9fs_addr_operations;
281 281
282 switch (mode & S_IFMT) { 282 switch (mode & S_IFMT) {
diff --git a/fs/adfs/inode.c b/fs/adfs/inode.c
index 335055d828e4..860f3ec90c22 100644
--- a/fs/adfs/inode.c
+++ b/fs/adfs/inode.c
@@ -199,7 +199,7 @@ adfs_adfs2unix_time(struct timespec *tv, struct inode *inode)
199 return; 199 return;
200 200
201 cur_time: 201 cur_time:
202 *tv = CURRENT_TIME; 202 *tv = current_time(inode);
203 return; 203 return;
204 204
205 too_early: 205 too_early:
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index 61b21051bd5a..ca9cbd6362e0 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -359,7 +359,7 @@ struct inode *autofs4_get_inode(struct super_block *sb, umode_t mode)
359 inode->i_uid = d_inode(sb->s_root)->i_uid; 359 inode->i_uid = d_inode(sb->s_root)->i_uid;
360 inode->i_gid = d_inode(sb->s_root)->i_gid; 360 inode->i_gid = d_inode(sb->s_root)->i_gid;
361 } 361 }
362 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 362 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
363 inode->i_ino = get_next_ino(); 363 inode->i_ino = get_next_ino();
364 364
365 if (S_ISDIR(mode)) { 365 if (S_ISDIR(mode)) {
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index fa84bb8832e0..623510e84c96 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -591,7 +591,7 @@ static int autofs4_dir_symlink(struct inode *dir,
591 if (p_ino && !IS_ROOT(dentry)) 591 if (p_ino && !IS_ROOT(dentry))
592 atomic_inc(&p_ino->count); 592 atomic_inc(&p_ino->count);
593 593
594 dir->i_mtime = CURRENT_TIME; 594 dir->i_mtime = current_time(dir);
595 595
596 return 0; 596 return 0;
597} 597}
@@ -631,7 +631,7 @@ static int autofs4_dir_unlink(struct inode *dir, struct dentry *dentry)
631 d_inode(dentry)->i_size = 0; 631 d_inode(dentry)->i_size = 0;
632 clear_nlink(d_inode(dentry)); 632 clear_nlink(d_inode(dentry));
633 633
634 dir->i_mtime = CURRENT_TIME; 634 dir->i_mtime = current_time(dir);
635 635
636 spin_lock(&sbi->lookup_lock); 636 spin_lock(&sbi->lookup_lock);
637 __autofs4_add_expiring(dentry); 637 __autofs4_add_expiring(dentry);
@@ -762,7 +762,7 @@ static int autofs4_dir_mkdir(struct inode *dir,
762 if (p_ino && !IS_ROOT(dentry)) 762 if (p_ino && !IS_ROOT(dentry))
763 atomic_inc(&p_ino->count); 763 atomic_inc(&p_ino->count);
764 inc_nlink(dir); 764 inc_nlink(dir);
765 dir->i_mtime = CURRENT_TIME; 765 dir->i_mtime = current_time(dir);
766 766
767 return 0; 767 return 0;
768} 768}
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 79a5941c2474..9156c91def48 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -305,7 +305,7 @@ static int mknod_ptmx(struct super_block *sb)
305 } 305 }
306 306
307 inode->i_ino = 2; 307 inode->i_ino = 2;
308 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 308 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
309 309
310 mode = S_IFCHR|opts->ptmxmode; 310 mode = S_IFCHR|opts->ptmxmode;
311 init_special_inode(inode, mode, MKDEV(TTYAUX_MAJOR, 2)); 311 init_special_inode(inode, mode, MKDEV(TTYAUX_MAJOR, 2));
@@ -411,7 +411,7 @@ devpts_fill_super(struct super_block *s, void *data, int silent)
411 if (!inode) 411 if (!inode)
412 goto fail; 412 goto fail;
413 inode->i_ino = 1; 413 inode->i_ino = 1;
414 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 414 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
415 inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR; 415 inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
416 inode->i_op = &simple_dir_inode_operations; 416 inode->i_op = &simple_dir_inode_operations;
417 inode->i_fop = &simple_dir_operations; 417 inode->i_fop = &simple_dir_operations;
@@ -559,7 +559,7 @@ struct dentry *devpts_pty_new(struct pts_fs_info *fsi, int index, void *priv)
559 inode->i_ino = index + 3; 559 inode->i_ino = index + 3;
560 inode->i_uid = opts->setuid ? opts->uid : current_fsuid(); 560 inode->i_uid = opts->setuid ? opts->uid : current_fsuid();
561 inode->i_gid = opts->setgid ? opts->gid : current_fsgid(); 561 inode->i_gid = opts->setgid ? opts->gid : current_fsgid();
562 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 562 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
563 init_special_inode(inode, S_IFCHR|opts->mode, MKDEV(UNIX98_PTY_SLAVE_MAJOR, index)); 563 init_special_inode(inode, S_IFCHR|opts->mode, MKDEV(UNIX98_PTY_SLAVE_MAJOR, index));
564 564
565 sprintf(s, "%d", index); 565 sprintf(s, "%d", index);
diff --git a/fs/efivarfs/inode.c b/fs/efivarfs/inode.c
index 1d73fc6dba13..be5a33691f69 100644
--- a/fs/efivarfs/inode.c
+++ b/fs/efivarfs/inode.c
@@ -24,7 +24,7 @@ struct inode *efivarfs_get_inode(struct super_block *sb,
24 if (inode) { 24 if (inode) {
25 inode->i_ino = get_next_ino(); 25 inode->i_ino = get_next_ino();
26 inode->i_mode = mode; 26 inode->i_mode = mode;
27 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 27 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
28 inode->i_flags = is_removable ? 0 : S_IMMUTABLE; 28 inode->i_flags = is_removable ? 0 : S_IMMUTABLE;
29 switch (mode & S_IFMT) { 29 switch (mode & S_IFMT) {
30 case S_IFREG: 30 case S_IFREG:
diff --git a/fs/exofs/dir.c b/fs/exofs/dir.c
index f69a1b5826a5..79101651fe9e 100644
--- a/fs/exofs/dir.c
+++ b/fs/exofs/dir.c
@@ -416,7 +416,7 @@ int exofs_set_link(struct inode *dir, struct exofs_dir_entry *de,
416 if (likely(!err)) 416 if (likely(!err))
417 err = exofs_commit_chunk(page, pos, len); 417 err = exofs_commit_chunk(page, pos, len);
418 exofs_put_page(page); 418 exofs_put_page(page);
419 dir->i_mtime = dir->i_ctime = CURRENT_TIME; 419 dir->i_mtime = dir->i_ctime = current_time(dir);
420 mark_inode_dirty(dir); 420 mark_inode_dirty(dir);
421 return err; 421 return err;
422} 422}
@@ -503,7 +503,7 @@ got_it:
503 de->inode_no = cpu_to_le64(inode->i_ino); 503 de->inode_no = cpu_to_le64(inode->i_ino);
504 exofs_set_de_type(de, inode); 504 exofs_set_de_type(de, inode);
505 err = exofs_commit_chunk(page, pos, rec_len); 505 err = exofs_commit_chunk(page, pos, rec_len);
506 dir->i_mtime = dir->i_ctime = CURRENT_TIME; 506 dir->i_mtime = dir->i_ctime = current_time(dir);
507 mark_inode_dirty(dir); 507 mark_inode_dirty(dir);
508 sbi->s_numfiles++; 508 sbi->s_numfiles++;
509 509
@@ -554,7 +554,7 @@ int exofs_delete_entry(struct exofs_dir_entry *dir, struct page *page)
554 dir->inode_no = 0; 554 dir->inode_no = 0;
555 if (likely(!err)) 555 if (likely(!err))
556 err = exofs_commit_chunk(page, pos, to - from); 556 err = exofs_commit_chunk(page, pos, to - from);
557 inode->i_ctime = inode->i_mtime = CURRENT_TIME; 557 inode->i_ctime = inode->i_mtime = current_time(inode);
558 mark_inode_dirty(inode); 558 mark_inode_dirty(inode);
559 sbi->s_numfiles--; 559 sbi->s_numfiles--;
560out: 560out:
diff --git a/fs/exofs/inode.c b/fs/exofs/inode.c
index 9dc4c6dbf3c9..4327f71d302d 100644
--- a/fs/exofs/inode.c
+++ b/fs/exofs/inode.c
@@ -1007,7 +1007,7 @@ static int _do_truncate(struct inode *inode, loff_t newsize)
1007 struct exofs_sb_info *sbi = inode->i_sb->s_fs_info; 1007 struct exofs_sb_info *sbi = inode->i_sb->s_fs_info;
1008 int ret; 1008 int ret;
1009 1009
1010 inode->i_mtime = inode->i_ctime = CURRENT_TIME; 1010 inode->i_mtime = inode->i_ctime = current_time(inode);
1011 1011
1012 ret = ore_truncate(&sbi->layout, &oi->oc, (u64)newsize); 1012 ret = ore_truncate(&sbi->layout, &oi->oc, (u64)newsize);
1013 if (likely(!ret)) 1013 if (likely(!ret))
@@ -1313,7 +1313,7 @@ struct inode *exofs_new_inode(struct inode *dir, umode_t mode)
1313 inode_init_owner(inode, dir, mode); 1313 inode_init_owner(inode, dir, mode);
1314 inode->i_ino = sbi->s_nextid++; 1314 inode->i_ino = sbi->s_nextid++;
1315 inode->i_blkbits = EXOFS_BLKSHIFT; 1315 inode->i_blkbits = EXOFS_BLKSHIFT;
1316 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 1316 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
1317 oi->i_commit_size = inode->i_size = 0; 1317 oi->i_commit_size = inode->i_size = 0;
1318 spin_lock(&sbi->s_next_gen_lock); 1318 spin_lock(&sbi->s_next_gen_lock);
1319 inode->i_generation = sbi->s_next_generation++; 1319 inode->i_generation = sbi->s_next_generation++;
diff --git a/fs/exofs/namei.c b/fs/exofs/namei.c
index 622a686bb08b..80c8114d76a6 100644
--- a/fs/exofs/namei.c
+++ b/fs/exofs/namei.c
@@ -142,7 +142,7 @@ static int exofs_link(struct dentry *old_dentry, struct inode *dir,
142{ 142{
143 struct inode *inode = d_inode(old_dentry); 143 struct inode *inode = d_inode(old_dentry);
144 144
145 inode->i_ctime = CURRENT_TIME; 145 inode->i_ctime = current_time(inode);
146 inode_inc_link_count(inode); 146 inode_inc_link_count(inode);
147 ihold(inode); 147 ihold(inode);
148 148
@@ -261,7 +261,7 @@ static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry,
261 if (!new_de) 261 if (!new_de)
262 goto out_dir; 262 goto out_dir;
263 err = exofs_set_link(new_dir, new_de, new_page, old_inode); 263 err = exofs_set_link(new_dir, new_de, new_page, old_inode);
264 new_inode->i_ctime = CURRENT_TIME; 264 new_inode->i_ctime = current_time(new_inode);
265 if (dir_de) 265 if (dir_de)
266 drop_nlink(new_inode); 266 drop_nlink(new_inode);
267 inode_dec_link_count(new_inode); 267 inode_dec_link_count(new_inode);
@@ -275,7 +275,7 @@ static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry,
275 inode_inc_link_count(new_dir); 275 inode_inc_link_count(new_dir);
276 } 276 }
277 277
278 old_inode->i_ctime = CURRENT_TIME; 278 old_inode->i_ctime = current_time(old_inode);
279 279
280 exofs_delete_entry(old_de, old_page); 280 exofs_delete_entry(old_de, old_page);
281 mark_inode_dirty(old_inode); 281 mark_inode_dirty(old_inode);
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 1d9379568aa8..6cb042b53b5b 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -1543,7 +1543,7 @@ out:
1543 if (inode->i_size < off+len-towrite) 1543 if (inode->i_size < off+len-towrite)
1544 i_size_write(inode, off+len-towrite); 1544 i_size_write(inode, off+len-towrite);
1545 inode->i_version++; 1545 inode->i_version++;
1546 inode->i_mtime = inode->i_ctime = CURRENT_TIME; 1546 inode->i_mtime = inode->i_ctime = current_time(inode);
1547 mark_inode_dirty(inode); 1547 mark_inode_dirty(inode);
1548 return len - towrite; 1548 return len - towrite;
1549} 1549}
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index 9054aeac8015..8e5309c532df 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -299,7 +299,7 @@ void f2fs_set_link(struct inode *dir, struct f2fs_dir_entry *de,
299 f2fs_dentry_kunmap(dir, page); 299 f2fs_dentry_kunmap(dir, page);
300 set_page_dirty(page); 300 set_page_dirty(page);
301 301
302 dir->i_mtime = dir->i_ctime = CURRENT_TIME; 302 dir->i_mtime = dir->i_ctime = current_time(dir);
303 f2fs_mark_inode_dirty_sync(dir); 303 f2fs_mark_inode_dirty_sync(dir);
304 f2fs_put_page(page, 1); 304 f2fs_put_page(page, 1);
305} 305}
@@ -451,7 +451,7 @@ void update_parent_metadata(struct inode *dir, struct inode *inode,
451 f2fs_i_links_write(dir, true); 451 f2fs_i_links_write(dir, true);
452 clear_inode_flag(inode, FI_NEW_INODE); 452 clear_inode_flag(inode, FI_NEW_INODE);
453 } 453 }
454 dir->i_mtime = dir->i_ctime = CURRENT_TIME; 454 dir->i_mtime = dir->i_ctime = current_time(dir);
455 f2fs_mark_inode_dirty_sync(dir); 455 f2fs_mark_inode_dirty_sync(dir);
456 456
457 if (F2FS_I(dir)->i_current_depth != current_depth) 457 if (F2FS_I(dir)->i_current_depth != current_depth)
@@ -656,7 +656,7 @@ void f2fs_drop_nlink(struct inode *dir, struct inode *inode)
656 656
657 if (S_ISDIR(inode->i_mode)) 657 if (S_ISDIR(inode->i_mode))
658 f2fs_i_links_write(dir, false); 658 f2fs_i_links_write(dir, false);
659 inode->i_ctime = CURRENT_TIME; 659 inode->i_ctime = current_time(inode);
660 660
661 f2fs_i_links_write(inode, false); 661 f2fs_i_links_write(inode, false);
662 if (S_ISDIR(inode->i_mode)) { 662 if (S_ISDIR(inode->i_mode)) {
@@ -703,7 +703,7 @@ void f2fs_delete_entry(struct f2fs_dir_entry *dentry, struct page *page,
703 kunmap(page); /* kunmap - pair of f2fs_find_entry */ 703 kunmap(page); /* kunmap - pair of f2fs_find_entry */
704 set_page_dirty(page); 704 set_page_dirty(page);
705 705
706 dir->i_ctime = dir->i_mtime = CURRENT_TIME; 706 dir->i_ctime = dir->i_mtime = current_time(dir);
707 f2fs_mark_inode_dirty_sync(dir); 707 f2fs_mark_inode_dirty_sync(dir);
708 708
709 if (inode) 709 if (inode)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index 28f4f4cbb8d8..b831d7662005 100644
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@ -631,7 +631,7 @@ int f2fs_truncate(struct inode *inode)
631 if (err) 631 if (err)
632 return err; 632 return err;
633 633
634 inode->i_mtime = inode->i_ctime = CURRENT_TIME; 634 inode->i_mtime = inode->i_ctime = current_time(inode);
635 f2fs_mark_inode_dirty_sync(inode); 635 f2fs_mark_inode_dirty_sync(inode);
636 return 0; 636 return 0;
637} 637}
@@ -708,7 +708,7 @@ int f2fs_setattr(struct dentry *dentry, struct iattr *attr)
708 if (err) 708 if (err)
709 return err; 709 return err;
710 } 710 }
711 inode->i_mtime = inode->i_ctime = CURRENT_TIME; 711 inode->i_mtime = inode->i_ctime = current_time(inode);
712 } 712 }
713 } 713 }
714 714
@@ -1395,7 +1395,7 @@ static long f2fs_fallocate(struct file *file, int mode,
1395 } 1395 }
1396 1396
1397 if (!ret) { 1397 if (!ret) {
1398 inode->i_mtime = inode->i_ctime = CURRENT_TIME; 1398 inode->i_mtime = inode->i_ctime = current_time(inode);
1399 f2fs_mark_inode_dirty_sync(inode); 1399 f2fs_mark_inode_dirty_sync(inode);
1400 f2fs_update_time(F2FS_I_SB(inode), REQ_TIME); 1400 f2fs_update_time(F2FS_I_SB(inode), REQ_TIME);
1401 } 1401 }
@@ -1487,7 +1487,7 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg)
1487 fi->i_flags = flags; 1487 fi->i_flags = flags;
1488 inode_unlock(inode); 1488 inode_unlock(inode);
1489 1489
1490 inode->i_ctime = CURRENT_TIME; 1490 inode->i_ctime = current_time(inode);
1491 f2fs_set_inode_flags(inode); 1491 f2fs_set_inode_flags(inode);
1492out: 1492out:
1493 mnt_drop_write_file(filp); 1493 mnt_drop_write_file(filp);
diff --git a/fs/f2fs/inline.c b/fs/f2fs/inline.c
index ccea8735de59..b4af15b26a12 100644
--- a/fs/f2fs/inline.c
+++ b/fs/f2fs/inline.c
@@ -569,7 +569,7 @@ void f2fs_delete_inline_entry(struct f2fs_dir_entry *dentry, struct page *page,
569 set_page_dirty(page); 569 set_page_dirty(page);
570 f2fs_put_page(page, 1); 570 f2fs_put_page(page, 1);
571 571
572 dir->i_ctime = dir->i_mtime = CURRENT_TIME; 572 dir->i_ctime = dir->i_mtime = current_time(dir);
573 f2fs_mark_inode_dirty_sync(dir); 573 f2fs_mark_inode_dirty_sync(dir);
574 574
575 if (inode) 575 if (inode)
diff --git a/fs/f2fs/namei.c b/fs/f2fs/namei.c
index 73fa356f8fbb..dfb622ad86dc 100644
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@ -46,7 +46,7 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)
46 46
47 inode->i_ino = ino; 47 inode->i_ino = ino;
48 inode->i_blocks = 0; 48 inode->i_blocks = 0;
49 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 49 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
50 inode->i_generation = sbi->s_next_generation++; 50 inode->i_generation = sbi->s_next_generation++;
51 51
52 err = insert_inode_locked(inode); 52 err = insert_inode_locked(inode);
@@ -177,7 +177,7 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir,
177 177
178 f2fs_balance_fs(sbi, true); 178 f2fs_balance_fs(sbi, true);
179 179
180 inode->i_ctime = CURRENT_TIME; 180 inode->i_ctime = current_time(inode);
181 ihold(inode); 181 ihold(inode);
182 182
183 set_inode_flag(inode, FI_INC_LINK); 183 set_inode_flag(inode, FI_INC_LINK);
@@ -718,7 +718,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
718 718
719 f2fs_set_link(new_dir, new_entry, new_page, old_inode); 719 f2fs_set_link(new_dir, new_entry, new_page, old_inode);
720 720
721 new_inode->i_ctime = CURRENT_TIME; 721 new_inode->i_ctime = current_time(new_inode);
722 down_write(&F2FS_I(new_inode)->i_sem); 722 down_write(&F2FS_I(new_inode)->i_sem);
723 if (old_dir_entry) 723 if (old_dir_entry)
724 f2fs_i_links_write(new_inode, false); 724 f2fs_i_links_write(new_inode, false);
@@ -772,7 +772,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
772 file_set_enc_name(old_inode); 772 file_set_enc_name(old_inode);
773 up_write(&F2FS_I(old_inode)->i_sem); 773 up_write(&F2FS_I(old_inode)->i_sem);
774 774
775 old_inode->i_ctime = CURRENT_TIME; 775 old_inode->i_ctime = current_time(old_inode);
776 f2fs_mark_inode_dirty_sync(old_inode); 776 f2fs_mark_inode_dirty_sync(old_inode);
777 777
778 f2fs_delete_entry(old_entry, old_page, old_dir, NULL); 778 f2fs_delete_entry(old_entry, old_page, old_dir, NULL);
@@ -927,7 +927,7 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
927 file_lost_pino(old_inode); 927 file_lost_pino(old_inode);
928 up_write(&F2FS_I(old_inode)->i_sem); 928 up_write(&F2FS_I(old_inode)->i_sem);
929 929
930 old_dir->i_ctime = CURRENT_TIME; 930 old_dir->i_ctime = current_time(old_dir);
931 if (old_nlink) { 931 if (old_nlink) {
932 down_write(&F2FS_I(old_dir)->i_sem); 932 down_write(&F2FS_I(old_dir)->i_sem);
933 f2fs_i_links_write(old_dir, old_nlink > 0); 933 f2fs_i_links_write(old_dir, old_nlink > 0);
@@ -942,7 +942,7 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
942 file_lost_pino(new_inode); 942 file_lost_pino(new_inode);
943 up_write(&F2FS_I(new_inode)->i_sem); 943 up_write(&F2FS_I(new_inode)->i_sem);
944 944
945 new_dir->i_ctime = CURRENT_TIME; 945 new_dir->i_ctime = current_time(new_dir);
946 if (new_nlink) { 946 if (new_nlink) {
947 down_write(&F2FS_I(new_dir)->i_sem); 947 down_write(&F2FS_I(new_dir)->i_sem);
948 f2fs_i_links_write(new_dir, new_nlink > 0); 948 f2fs_i_links_write(new_dir, new_nlink > 0);
diff --git a/fs/fuse/control.c b/fs/fuse/control.c
index f863ac6647ac..6e22748b0704 100644
--- a/fs/fuse/control.c
+++ b/fs/fuse/control.c
@@ -220,7 +220,7 @@ static struct dentry *fuse_ctl_add_dentry(struct dentry *parent,
220 inode->i_mode = mode; 220 inode->i_mode = mode;
221 inode->i_uid = fc->user_id; 221 inode->i_uid = fc->user_id;
222 inode->i_gid = fc->group_id; 222 inode->i_gid = fc->group_id;
223 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 223 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
224 /* setting ->i_op to NULL is not allowed */ 224 /* setting ->i_op to NULL is not allowed */
225 if (iop) 225 if (iop)
226 inode->i_op = iop; 226 inode->i_op = iop;
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 6e2bec1cd289..945342202a5e 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -836,7 +836,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh,
836 gfs2_quota_change(ip, -(s64)btotal, ip->i_inode.i_uid, 836 gfs2_quota_change(ip, -(s64)btotal, ip->i_inode.i_uid,
837 ip->i_inode.i_gid); 837 ip->i_inode.i_gid);
838 838
839 ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; 839 ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
840 840
841 gfs2_dinode_out(ip, dibh->b_data); 841 gfs2_dinode_out(ip, dibh->b_data);
842 842
@@ -1063,7 +1063,7 @@ static int trunc_start(struct inode *inode, u64 oldsize, u64 newsize)
1063 } 1063 }
1064 1064
1065 i_size_write(inode, newsize); 1065 i_size_write(inode, newsize);
1066 ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; 1066 ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
1067 gfs2_dinode_out(ip, dibh->b_data); 1067 gfs2_dinode_out(ip, dibh->b_data);
1068 1068
1069 if (journaled) 1069 if (journaled)
@@ -1142,7 +1142,7 @@ static int trunc_end(struct gfs2_inode *ip)
1142 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); 1142 gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode));
1143 gfs2_ordered_del_inode(ip); 1143 gfs2_ordered_del_inode(ip);
1144 } 1144 }
1145 ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; 1145 ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
1146 ip->i_diskflags &= ~GFS2_DIF_TRUNC_IN_PROG; 1146 ip->i_diskflags &= ~GFS2_DIF_TRUNC_IN_PROG;
1147 1147
1148 gfs2_trans_add_meta(ip->i_gl, dibh); 1148 gfs2_trans_add_meta(ip->i_gl, dibh);
@@ -1252,7 +1252,7 @@ static int do_grow(struct inode *inode, u64 size)
1252 goto do_end_trans; 1252 goto do_end_trans;
1253 1253
1254 i_size_write(inode, size); 1254 i_size_write(inode, size);
1255 ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; 1255 ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
1256 gfs2_trans_add_meta(ip->i_gl, dibh); 1256 gfs2_trans_add_meta(ip->i_gl, dibh);
1257 gfs2_dinode_out(ip, dibh->b_data); 1257 gfs2_dinode_out(ip, dibh->b_data);
1258 brelse(dibh); 1258 brelse(dibh);
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index fcb59b23f1e3..f75c9aef9f94 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -135,7 +135,7 @@ static int gfs2_dir_write_stuffed(struct gfs2_inode *ip, const char *buf,
135 memcpy(dibh->b_data + offset + sizeof(struct gfs2_dinode), buf, size); 135 memcpy(dibh->b_data + offset + sizeof(struct gfs2_dinode), buf, size);
136 if (ip->i_inode.i_size < offset + size) 136 if (ip->i_inode.i_size < offset + size)
137 i_size_write(&ip->i_inode, offset + size); 137 i_size_write(&ip->i_inode, offset + size);
138 ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; 138 ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
139 gfs2_dinode_out(ip, dibh->b_data); 139 gfs2_dinode_out(ip, dibh->b_data);
140 140
141 brelse(dibh); 141 brelse(dibh);
@@ -233,7 +233,7 @@ out:
233 233
234 if (ip->i_inode.i_size < offset + copied) 234 if (ip->i_inode.i_size < offset + copied)
235 i_size_write(&ip->i_inode, offset + copied); 235 i_size_write(&ip->i_inode, offset + copied);
236 ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; 236 ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
237 237
238 gfs2_trans_add_meta(ip->i_gl, dibh); 238 gfs2_trans_add_meta(ip->i_gl, dibh);
239 gfs2_dinode_out(ip, dibh->b_data); 239 gfs2_dinode_out(ip, dibh->b_data);
@@ -872,7 +872,7 @@ static struct gfs2_leaf *new_leaf(struct inode *inode, struct buffer_head **pbh,
872 struct gfs2_leaf *leaf; 872 struct gfs2_leaf *leaf;
873 struct gfs2_dirent *dent; 873 struct gfs2_dirent *dent;
874 struct qstr name = { .name = "" }; 874 struct qstr name = { .name = "" };
875 struct timespec tv = CURRENT_TIME; 875 struct timespec tv = current_time(inode);
876 876
877 error = gfs2_alloc_blocks(ip, &bn, &n, 0, NULL); 877 error = gfs2_alloc_blocks(ip, &bn, &n, 0, NULL);
878 if (error) 878 if (error)
@@ -1816,7 +1816,7 @@ int gfs2_dir_add(struct inode *inode, const struct qstr *name,
1816 gfs2_inum_out(nip, dent); 1816 gfs2_inum_out(nip, dent);
1817 dent->de_type = cpu_to_be16(IF2DT(nip->i_inode.i_mode)); 1817 dent->de_type = cpu_to_be16(IF2DT(nip->i_inode.i_mode));
1818 dent->de_rahead = cpu_to_be16(gfs2_inode_ra_len(nip)); 1818 dent->de_rahead = cpu_to_be16(gfs2_inode_ra_len(nip));
1819 tv = CURRENT_TIME; 1819 tv = current_time(&ip->i_inode);
1820 if (ip->i_diskflags & GFS2_DIF_EXHASH) { 1820 if (ip->i_diskflags & GFS2_DIF_EXHASH) {
1821 leaf = (struct gfs2_leaf *)bh->b_data; 1821 leaf = (struct gfs2_leaf *)bh->b_data;
1822 be16_add_cpu(&leaf->lf_entries, 1); 1822 be16_add_cpu(&leaf->lf_entries, 1);
@@ -1878,7 +1878,7 @@ int gfs2_dir_del(struct gfs2_inode *dip, const struct dentry *dentry)
1878 const struct qstr *name = &dentry->d_name; 1878 const struct qstr *name = &dentry->d_name;
1879 struct gfs2_dirent *dent, *prev = NULL; 1879 struct gfs2_dirent *dent, *prev = NULL;
1880 struct buffer_head *bh; 1880 struct buffer_head *bh;
1881 struct timespec tv = CURRENT_TIME; 1881 struct timespec tv = current_time(&dip->i_inode);
1882 1882
1883 /* Returns _either_ the entry (if its first in block) or the 1883 /* Returns _either_ the entry (if its first in block) or the
1884 previous entry otherwise */ 1884 previous entry otherwise */
@@ -1960,7 +1960,7 @@ int gfs2_dir_mvino(struct gfs2_inode *dip, const struct qstr *filename,
1960 gfs2_trans_add_meta(dip->i_gl, bh); 1960 gfs2_trans_add_meta(dip->i_gl, bh);
1961 } 1961 }
1962 1962
1963 dip->i_inode.i_mtime = dip->i_inode.i_ctime = CURRENT_TIME; 1963 dip->i_inode.i_mtime = dip->i_inode.i_ctime = current_time(&dip->i_inode);
1964 gfs2_dinode_out(dip, bh->b_data); 1964 gfs2_dinode_out(dip, bh->b_data);
1965 brelse(bh); 1965 brelse(bh);
1966 return 0; 1966 return 0;
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c
index e4da0ecd3285..a197a219eed9 100644
--- a/fs/gfs2/inode.c
+++ b/fs/gfs2/inode.c
@@ -652,7 +652,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
652 set_nlink(inode, S_ISDIR(mode) ? 2 : 1); 652 set_nlink(inode, S_ISDIR(mode) ? 2 : 1);
653 inode->i_rdev = dev; 653 inode->i_rdev = dev;
654 inode->i_size = size; 654 inode->i_size = size;
655 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 655 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
656 gfs2_set_inode_blocks(inode, 1); 656 gfs2_set_inode_blocks(inode, 1);
657 munge_mode_uid_gid(dip, inode); 657 munge_mode_uid_gid(dip, inode);
658 check_and_update_goal(dip); 658 check_and_update_goal(dip);
@@ -979,7 +979,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
979 979
980 gfs2_trans_add_meta(ip->i_gl, dibh); 980 gfs2_trans_add_meta(ip->i_gl, dibh);
981 inc_nlink(&ip->i_inode); 981 inc_nlink(&ip->i_inode);
982 ip->i_inode.i_ctime = CURRENT_TIME; 982 ip->i_inode.i_ctime = current_time(&ip->i_inode);
983 ihold(inode); 983 ihold(inode);
984 d_instantiate(dentry, inode); 984 d_instantiate(dentry, inode);
985 mark_inode_dirty(inode); 985 mark_inode_dirty(inode);
@@ -1063,7 +1063,7 @@ static int gfs2_unlink_inode(struct gfs2_inode *dip,
1063 return error; 1063 return error;
1064 1064
1065 ip->i_entries = 0; 1065 ip->i_entries = 0;
1066 inode->i_ctime = CURRENT_TIME; 1066 inode->i_ctime = current_time(inode);
1067 if (S_ISDIR(inode->i_mode)) 1067 if (S_ISDIR(inode->i_mode))
1068 clear_nlink(inode); 1068 clear_nlink(inode);
1069 else 1069 else
@@ -1326,7 +1326,7 @@ static int update_moved_ino(struct gfs2_inode *ip, struct gfs2_inode *ndip,
1326 error = gfs2_meta_inode_buffer(ip, &dibh); 1326 error = gfs2_meta_inode_buffer(ip, &dibh);
1327 if (error) 1327 if (error)
1328 return error; 1328 return error;
1329 ip->i_inode.i_ctime = CURRENT_TIME; 1329 ip->i_inode.i_ctime = current_time(&ip->i_inode);
1330 gfs2_trans_add_meta(ip->i_gl, dibh); 1330 gfs2_trans_add_meta(ip->i_gl, dibh);
1331 gfs2_dinode_out(ip, dibh->b_data); 1331 gfs2_dinode_out(ip, dibh->b_data);
1332 brelse(dibh); 1332 brelse(dibh);
diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 77930ca25303..422e640a5a9d 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -854,7 +854,7 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
854 size = loc + sizeof(struct gfs2_quota); 854 size = loc + sizeof(struct gfs2_quota);
855 if (size > inode->i_size) 855 if (size > inode->i_size)
856 i_size_write(inode, size); 856 i_size_write(inode, size);
857 inode->i_mtime = inode->i_atime = CURRENT_TIME; 857 inode->i_mtime = inode->i_atime = current_time(inode);
858 mark_inode_dirty(inode); 858 mark_inode_dirty(inode);
859 set_bit(QDF_REFRESH, &qd->qd_flags); 859 set_bit(QDF_REFRESH, &qd->qd_flags);
860 } 860 }
diff --git a/fs/gfs2/xattr.c b/fs/gfs2/xattr.c
index 3a2853504084..a4a577088d19 100644
--- a/fs/gfs2/xattr.c
+++ b/fs/gfs2/xattr.c
@@ -309,7 +309,7 @@ static int ea_dealloc_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh,
309 309
310 error = gfs2_meta_inode_buffer(ip, &dibh); 310 error = gfs2_meta_inode_buffer(ip, &dibh);
311 if (!error) { 311 if (!error) {
312 ip->i_inode.i_ctime = CURRENT_TIME; 312 ip->i_inode.i_ctime = current_time(&ip->i_inode);
313 gfs2_trans_add_meta(ip->i_gl, dibh); 313 gfs2_trans_add_meta(ip->i_gl, dibh);
314 gfs2_dinode_out(ip, dibh->b_data); 314 gfs2_dinode_out(ip, dibh->b_data);
315 brelse(dibh); 315 brelse(dibh);
@@ -775,7 +775,7 @@ static int ea_alloc_skeleton(struct gfs2_inode *ip, struct gfs2_ea_request *er,
775 775
776 error = gfs2_meta_inode_buffer(ip, &dibh); 776 error = gfs2_meta_inode_buffer(ip, &dibh);
777 if (!error) { 777 if (!error) {
778 ip->i_inode.i_ctime = CURRENT_TIME; 778 ip->i_inode.i_ctime = current_time(&ip->i_inode);
779 gfs2_trans_add_meta(ip->i_gl, dibh); 779 gfs2_trans_add_meta(ip->i_gl, dibh);
780 gfs2_dinode_out(ip, dibh->b_data); 780 gfs2_dinode_out(ip, dibh->b_data);
781 brelse(dibh); 781 brelse(dibh);
@@ -910,7 +910,7 @@ static int ea_set_simple_noalloc(struct gfs2_inode *ip, struct buffer_head *bh,
910 error = gfs2_meta_inode_buffer(ip, &dibh); 910 error = gfs2_meta_inode_buffer(ip, &dibh);
911 if (error) 911 if (error)
912 goto out; 912 goto out;
913 ip->i_inode.i_ctime = CURRENT_TIME; 913 ip->i_inode.i_ctime = current_time(&ip->i_inode);
914 gfs2_trans_add_meta(ip->i_gl, dibh); 914 gfs2_trans_add_meta(ip->i_gl, dibh);
915 gfs2_dinode_out(ip, dibh->b_data); 915 gfs2_dinode_out(ip, dibh->b_data);
916 brelse(dibh); 916 brelse(dibh);
@@ -1133,7 +1133,7 @@ static int ea_remove_stuffed(struct gfs2_inode *ip, struct gfs2_ea_location *el)
1133 1133
1134 error = gfs2_meta_inode_buffer(ip, &dibh); 1134 error = gfs2_meta_inode_buffer(ip, &dibh);
1135 if (!error) { 1135 if (!error) {
1136 ip->i_inode.i_ctime = CURRENT_TIME; 1136 ip->i_inode.i_ctime = current_time(&ip->i_inode);
1137 gfs2_trans_add_meta(ip->i_gl, dibh); 1137 gfs2_trans_add_meta(ip->i_gl, dibh);
1138 gfs2_dinode_out(ip, dibh->b_data); 1138 gfs2_dinode_out(ip, dibh->b_data);
1139 brelse(dibh); 1139 brelse(dibh);
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 4ea71eba40a5..3053e200ec95 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -657,7 +657,7 @@ static long hugetlbfs_fallocate(struct file *file, int mode, loff_t offset,
657 657
658 if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > inode->i_size) 658 if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > inode->i_size)
659 i_size_write(inode, offset + len); 659 i_size_write(inode, offset + len);
660 inode->i_ctime = CURRENT_TIME; 660 inode->i_ctime = current_time(inode);
661out: 661out:
662 inode_unlock(inode); 662 inode_unlock(inode);
663 return error; 663 return error;
@@ -702,7 +702,7 @@ static struct inode *hugetlbfs_get_root(struct super_block *sb,
702 inode->i_mode = S_IFDIR | config->mode; 702 inode->i_mode = S_IFDIR | config->mode;
703 inode->i_uid = config->uid; 703 inode->i_uid = config->uid;
704 inode->i_gid = config->gid; 704 inode->i_gid = config->gid;
705 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 705 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
706 info = HUGETLBFS_I(inode); 706 info = HUGETLBFS_I(inode);
707 mpol_shared_policy_init(&info->policy, NULL); 707 mpol_shared_policy_init(&info->policy, NULL);
708 inode->i_op = &hugetlbfs_dir_inode_operations; 708 inode->i_op = &hugetlbfs_dir_inode_operations;
@@ -741,7 +741,7 @@ static struct inode *hugetlbfs_get_inode(struct super_block *sb,
741 lockdep_set_class(&inode->i_mapping->i_mmap_rwsem, 741 lockdep_set_class(&inode->i_mapping->i_mmap_rwsem,
742 &hugetlbfs_i_mmap_rwsem_key); 742 &hugetlbfs_i_mmap_rwsem_key);
743 inode->i_mapping->a_ops = &hugetlbfs_aops; 743 inode->i_mapping->a_ops = &hugetlbfs_aops;
744 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 744 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
745 inode->i_mapping->private_data = resv_map; 745 inode->i_mapping->private_data = resv_map;
746 info = HUGETLBFS_I(inode); 746 info = HUGETLBFS_I(inode);
747 /* 747 /*
@@ -790,7 +790,7 @@ static int hugetlbfs_mknod(struct inode *dir,
790 790
791 inode = hugetlbfs_get_inode(dir->i_sb, dir, mode, dev); 791 inode = hugetlbfs_get_inode(dir->i_sb, dir, mode, dev);
792 if (inode) { 792 if (inode) {
793 dir->i_ctime = dir->i_mtime = CURRENT_TIME; 793 dir->i_ctime = dir->i_mtime = current_time(dir);
794 d_instantiate(dentry, inode); 794 d_instantiate(dentry, inode);
795 dget(dentry); /* Extra count - pin the dentry in core */ 795 dget(dentry); /* Extra count - pin the dentry in core */
796 error = 0; 796 error = 0;
@@ -827,7 +827,7 @@ static int hugetlbfs_symlink(struct inode *dir,
827 } else 827 } else
828 iput(inode); 828 iput(inode);
829 } 829 }
830 dir->i_ctime = dir->i_mtime = CURRENT_TIME; 830 dir->i_ctime = dir->i_mtime = current_time(dir);
831 831
832 return error; 832 return error;
833} 833}
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c
index 21fa92ba2c19..4c1a6b5670df 100644
--- a/fs/jfs/acl.c
+++ b/fs/jfs/acl.c
@@ -81,7 +81,7 @@ static int __jfs_set_acl(tid_t tid, struct inode *inode, int type,
81 rc = posix_acl_equiv_mode(acl, &inode->i_mode); 81 rc = posix_acl_equiv_mode(acl, &inode->i_mode);
82 if (rc < 0) 82 if (rc < 0)
83 return rc; 83 return rc;
84 inode->i_ctime = CURRENT_TIME; 84 inode->i_ctime = current_time(inode);
85 mark_inode_dirty(inode); 85 mark_inode_dirty(inode);
86 if (rc == 0) 86 if (rc == 0)
87 acl = NULL; 87 acl = NULL;
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index ad3e7b1effc4..054cc761b426 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -403,7 +403,7 @@ void jfs_truncate_nolock(struct inode *ip, loff_t length)
403 break; 403 break;
404 } 404 }
405 405
406 ip->i_mtime = ip->i_ctime = CURRENT_TIME; 406 ip->i_mtime = ip->i_ctime = current_time(ip);
407 mark_inode_dirty(ip); 407 mark_inode_dirty(ip);
408 408
409 txCommit(tid, 1, &ip, 0); 409 txCommit(tid, 1, &ip, 0);
diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c
index 5e33cb9a190d..375dd257a34f 100644
--- a/fs/jfs/jfs_inode.c
+++ b/fs/jfs/jfs_inode.c
@@ -131,7 +131,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
131 jfs_inode->mode2 |= inode->i_mode; 131 jfs_inode->mode2 |= inode->i_mode;
132 132
133 inode->i_blocks = 0; 133 inode->i_blocks = 0;
134 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 134 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
135 jfs_inode->otime = inode->i_ctime.tv_sec; 135 jfs_inode->otime = inode->i_ctime.tv_sec;
136 inode->i_generation = JFS_SBI(sb)->gengen++; 136 inode->i_generation = JFS_SBI(sb)->gengen++;
137 137
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
index 814b0c58016c..b05d0b4c68f6 100644
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -162,7 +162,7 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, umode_t mode,
162 162
163 mark_inode_dirty(ip); 163 mark_inode_dirty(ip);
164 164
165 dip->i_ctime = dip->i_mtime = CURRENT_TIME; 165 dip->i_ctime = dip->i_mtime = current_time(dip);
166 166
167 mark_inode_dirty(dip); 167 mark_inode_dirty(dip);
168 168
@@ -298,7 +298,7 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, umode_t mode)
298 298
299 /* update parent directory inode */ 299 /* update parent directory inode */
300 inc_nlink(dip); /* for '..' from child directory */ 300 inc_nlink(dip); /* for '..' from child directory */
301 dip->i_ctime = dip->i_mtime = CURRENT_TIME; 301 dip->i_ctime = dip->i_mtime = current_time(dip);
302 mark_inode_dirty(dip); 302 mark_inode_dirty(dip);
303 303
304 rc = txCommit(tid, 2, &iplist[0], 0); 304 rc = txCommit(tid, 2, &iplist[0], 0);
@@ -406,7 +406,7 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
406 /* update parent directory's link count corresponding 406 /* update parent directory's link count corresponding
407 * to ".." entry of the target directory deleted 407 * to ".." entry of the target directory deleted
408 */ 408 */
409 dip->i_ctime = dip->i_mtime = CURRENT_TIME; 409 dip->i_ctime = dip->i_mtime = current_time(dip);
410 inode_dec_link_count(dip); 410 inode_dec_link_count(dip);
411 411
412 /* 412 /*
@@ -528,7 +528,7 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry)
528 528
529 ASSERT(ip->i_nlink); 529 ASSERT(ip->i_nlink);
530 530
531 ip->i_ctime = dip->i_ctime = dip->i_mtime = CURRENT_TIME; 531 ip->i_ctime = dip->i_ctime = dip->i_mtime = current_time(ip);
532 mark_inode_dirty(dip); 532 mark_inode_dirty(dip);
533 533
534 /* update target's inode */ 534 /* update target's inode */
@@ -838,8 +838,8 @@ static int jfs_link(struct dentry *old_dentry,
838 838
839 /* update object inode */ 839 /* update object inode */
840 inc_nlink(ip); /* for new link */ 840 inc_nlink(ip); /* for new link */
841 ip->i_ctime = CURRENT_TIME; 841 ip->i_ctime = current_time(ip);
842 dir->i_ctime = dir->i_mtime = CURRENT_TIME; 842 dir->i_ctime = dir->i_mtime = current_time(dir);
843 mark_inode_dirty(dir); 843 mark_inode_dirty(dir);
844 ihold(ip); 844 ihold(ip);
845 845
@@ -1039,7 +1039,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
1039 1039
1040 mark_inode_dirty(ip); 1040 mark_inode_dirty(ip);
1041 1041
1042 dip->i_ctime = dip->i_mtime = CURRENT_TIME; 1042 dip->i_ctime = dip->i_mtime = current_time(dip);
1043 mark_inode_dirty(dip); 1043 mark_inode_dirty(dip);
1044 /* 1044 /*
1045 * commit update of parent directory and link object 1045 * commit update of parent directory and link object
@@ -1215,7 +1215,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
1215 tblk->xflag |= COMMIT_DELETE; 1215 tblk->xflag |= COMMIT_DELETE;
1216 tblk->u.ip = new_ip; 1216 tblk->u.ip = new_ip;
1217 } else { 1217 } else {
1218 new_ip->i_ctime = CURRENT_TIME; 1218 new_ip->i_ctime = current_time(new_ip);
1219 mark_inode_dirty(new_ip); 1219 mark_inode_dirty(new_ip);
1220 } 1220 }
1221 } else { 1221 } else {
@@ -1278,7 +1278,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
1278 /* 1278 /*
1279 * Update ctime on changed/moved inodes & mark dirty 1279 * Update ctime on changed/moved inodes & mark dirty
1280 */ 1280 */
1281 old_ip->i_ctime = CURRENT_TIME; 1281 old_ip->i_ctime = current_time(old_ip);
1282 mark_inode_dirty(old_ip); 1282 mark_inode_dirty(old_ip);
1283 1283
1284 new_dir->i_ctime = new_dir->i_mtime = current_fs_time(new_dir->i_sb); 1284 new_dir->i_ctime = new_dir->i_mtime = current_fs_time(new_dir->i_sb);
@@ -1293,7 +1293,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
1293 1293
1294 if (old_dir != new_dir) { 1294 if (old_dir != new_dir) {
1295 iplist[ipcount++] = new_dir; 1295 iplist[ipcount++] = new_dir;
1296 old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME; 1296 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir);
1297 mark_inode_dirty(old_dir); 1297 mark_inode_dirty(old_dir);
1298 } 1298 }
1299 1299
@@ -1426,7 +1426,7 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry,
1426 1426
1427 mark_inode_dirty(ip); 1427 mark_inode_dirty(ip);
1428 1428
1429 dir->i_ctime = dir->i_mtime = CURRENT_TIME; 1429 dir->i_ctime = dir->i_mtime = current_time(dir);
1430 1430
1431 mark_inode_dirty(dir); 1431 mark_inode_dirty(dir);
1432 1432
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index cec8814a3b8b..85671f7f8518 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -830,7 +830,7 @@ out:
830 if (inode->i_size < off+len-towrite) 830 if (inode->i_size < off+len-towrite)
831 i_size_write(inode, off+len-towrite); 831 i_size_write(inode, off+len-towrite);
832 inode->i_version++; 832 inode->i_version++;
833 inode->i_mtime = inode->i_ctime = CURRENT_TIME; 833 inode->i_mtime = inode->i_ctime = current_time(inode);
834 mark_inode_dirty(inode); 834 mark_inode_dirty(inode);
835 inode_unlock(inode); 835 inode_unlock(inode);
836 return len - towrite; 836 return len - towrite;
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c
index 0bf3c33aedff..c60f3d32ee91 100644
--- a/fs/jfs/xattr.c
+++ b/fs/jfs/xattr.c
@@ -658,7 +658,7 @@ static int ea_put(tid_t tid, struct inode *inode, struct ea_buffer *ea_buf,
658 if (old_blocks) 658 if (old_blocks)
659 dquot_free_block(inode, old_blocks); 659 dquot_free_block(inode, old_blocks);
660 660
661 inode->i_ctime = CURRENT_TIME; 661 inode->i_ctime = current_time(inode);
662 662
663 return 0; 663 return 0;
664} 664}
diff --git a/fs/libfs.c b/fs/libfs.c
index 74dc8b9e7f53..cc9f7ef2a1ce 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -265,7 +265,7 @@ struct dentry *mount_pseudo(struct file_system_type *fs_type, char *name,
265 */ 265 */
266 root->i_ino = 1; 266 root->i_ino = 1;
267 root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR; 267 root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR;
268 root->i_atime = root->i_mtime = root->i_ctime = CURRENT_TIME; 268 root->i_atime = root->i_mtime = root->i_ctime = current_time(root);
269 dentry = __d_alloc(s, &d_name); 269 dentry = __d_alloc(s, &d_name);
270 if (!dentry) { 270 if (!dentry) {
271 iput(root); 271 iput(root);
@@ -295,7 +295,7 @@ int simple_link(struct dentry *old_dentry, struct inode *dir, struct dentry *den
295{ 295{
296 struct inode *inode = d_inode(old_dentry); 296 struct inode *inode = d_inode(old_dentry);
297 297
298 inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; 298 inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
299 inc_nlink(inode); 299 inc_nlink(inode);
300 ihold(inode); 300 ihold(inode);
301 dget(dentry); 301 dget(dentry);
@@ -329,7 +329,7 @@ int simple_unlink(struct inode *dir, struct dentry *dentry)
329{ 329{
330 struct inode *inode = d_inode(dentry); 330 struct inode *inode = d_inode(dentry);
331 331
332 inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; 332 inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
333 drop_nlink(inode); 333 drop_nlink(inode);
334 dput(dentry); 334 dput(dentry);
335 return 0; 335 return 0;
@@ -369,7 +369,7 @@ int simple_rename(struct inode *old_dir, struct dentry *old_dentry,
369 } 369 }
370 370
371 old_dir->i_ctime = old_dir->i_mtime = new_dir->i_ctime = 371 old_dir->i_ctime = old_dir->i_mtime = new_dir->i_ctime =
372 new_dir->i_mtime = inode->i_ctime = CURRENT_TIME; 372 new_dir->i_mtime = inode->i_ctime = current_time(old_dir);
373 373
374 return 0; 374 return 0;
375} 375}
@@ -520,7 +520,7 @@ int simple_fill_super(struct super_block *s, unsigned long magic,
520 */ 520 */
521 inode->i_ino = 1; 521 inode->i_ino = 1;
522 inode->i_mode = S_IFDIR | 0755; 522 inode->i_mode = S_IFDIR | 0755;
523 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 523 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
524 inode->i_op = &simple_dir_inode_operations; 524 inode->i_op = &simple_dir_inode_operations;
525 inode->i_fop = &simple_dir_operations; 525 inode->i_fop = &simple_dir_operations;
526 set_nlink(inode, 2); 526 set_nlink(inode, 2);
@@ -546,7 +546,7 @@ int simple_fill_super(struct super_block *s, unsigned long magic,
546 goto out; 546 goto out;
547 } 547 }
548 inode->i_mode = S_IFREG | files->mode; 548 inode->i_mode = S_IFREG | files->mode;
549 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 549 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
550 inode->i_fop = files->ops; 550 inode->i_fop = files->ops;
551 inode->i_ino = i; 551 inode->i_ino = i;
552 d_add(dentry, inode); 552 d_add(dentry, inode);
@@ -1092,7 +1092,7 @@ struct inode *alloc_anon_inode(struct super_block *s)
1092 inode->i_uid = current_fsuid(); 1092 inode->i_uid = current_fsuid();
1093 inode->i_gid = current_fsgid(); 1093 inode->i_gid = current_fsgid();
1094 inode->i_flags |= S_PRIVATE; 1094 inode->i_flags |= S_PRIVATE;
1095 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 1095 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
1096 return inode; 1096 return inode;
1097} 1097}
1098EXPORT_SYMBOL(alloc_anon_inode); 1098EXPORT_SYMBOL(alloc_anon_inode);
diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c
index 9568064ecadf..a284dd8689a8 100644
--- a/fs/logfs/dir.c
+++ b/fs/logfs/dir.c
@@ -226,7 +226,7 @@ static int logfs_unlink(struct inode *dir, struct dentry *dentry)
226 ta->state = UNLINK_1; 226 ta->state = UNLINK_1;
227 ta->ino = inode->i_ino; 227 ta->ino = inode->i_ino;
228 228
229 inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; 229 inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
230 230
231 page = logfs_get_dd_page(dir, dentry); 231 page = logfs_get_dd_page(dir, dentry);
232 if (!page) { 232 if (!page) {
@@ -540,7 +540,7 @@ static int logfs_link(struct dentry *old_dentry, struct inode *dir,
540{ 540{
541 struct inode *inode = d_inode(old_dentry); 541 struct inode *inode = d_inode(old_dentry);
542 542
543 inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; 543 inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
544 ihold(inode); 544 ihold(inode);
545 inc_nlink(inode); 545 inc_nlink(inode);
546 mark_inode_dirty_sync(inode); 546 mark_inode_dirty_sync(inode);
@@ -573,7 +573,7 @@ static int logfs_delete_dd(struct inode *dir, loff_t pos)
573 * (crc-protected) journal. 573 * (crc-protected) journal.
574 */ 574 */
575 BUG_ON(beyond_eof(dir, pos)); 575 BUG_ON(beyond_eof(dir, pos));
576 dir->i_ctime = dir->i_mtime = CURRENT_TIME; 576 dir->i_ctime = dir->i_mtime = current_time(dir);
577 log_dir(" Delete dentry (%lx, %llx)\n", dir->i_ino, pos); 577 log_dir(" Delete dentry (%lx, %llx)\n", dir->i_ino, pos);
578 return logfs_delete(dir, pos, NULL); 578 return logfs_delete(dir, pos, NULL);
579} 579}
diff --git a/fs/logfs/file.c b/fs/logfs/file.c
index f01ddfb1a03b..dae4f312ffba 100644
--- a/fs/logfs/file.c
+++ b/fs/logfs/file.c
@@ -211,7 +211,7 @@ long logfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
211 li->li_flags = flags; 211 li->li_flags = flags;
212 inode_unlock(inode); 212 inode_unlock(inode);
213 213
214 inode->i_ctime = CURRENT_TIME; 214 inode->i_ctime = current_time(inode);
215 mark_inode_dirty_sync(inode); 215 mark_inode_dirty_sync(inode);
216 return 0; 216 return 0;
217 217
diff --git a/fs/logfs/inode.c b/fs/logfs/inode.c
index db9cfc598883..f440a1525da8 100644
--- a/fs/logfs/inode.c
+++ b/fs/logfs/inode.c
@@ -213,8 +213,8 @@ static void logfs_init_inode(struct super_block *sb, struct inode *inode)
213 i_gid_write(inode, 0); 213 i_gid_write(inode, 0);
214 inode->i_size = 0; 214 inode->i_size = 0;
215 inode->i_blocks = 0; 215 inode->i_blocks = 0;
216 inode->i_ctime = CURRENT_TIME; 216 inode->i_ctime = current_time(inode);
217 inode->i_mtime = CURRENT_TIME; 217 inode->i_mtime = current_time(inode);
218 li->li_refcount = 1; 218 li->li_refcount = 1;
219 INIT_LIST_HEAD(&li->li_freeing_list); 219 INIT_LIST_HEAD(&li->li_freeing_list);
220 220
diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c
index 3fb8c6d67303..bf19bf4a243f 100644
--- a/fs/logfs/readwrite.c
+++ b/fs/logfs/readwrite.c
@@ -1546,7 +1546,7 @@ static int __logfs_write_buf(struct inode *inode, struct page *page, long flags)
1546 int err; 1546 int err;
1547 1547
1548 flags |= WF_WRITE | WF_DELETE; 1548 flags |= WF_WRITE | WF_DELETE;
1549 inode->i_ctime = inode->i_mtime = CURRENT_TIME; 1549 inode->i_ctime = inode->i_mtime = current_time(inode);
1550 1550
1551 logfs_unpack_index(index, &bix, &level); 1551 logfs_unpack_index(index, &bix, &level);
1552 if (logfs_block(page) && logfs_block(page)->reserved_bytes) 1552 if (logfs_block(page) && logfs_block(page)->reserved_bytes)
@@ -1578,7 +1578,7 @@ static int __logfs_delete(struct inode *inode, struct page *page)
1578 long flags = WF_DELETE; 1578 long flags = WF_DELETE;
1579 int err; 1579 int err;
1580 1580
1581 inode->i_ctime = inode->i_mtime = CURRENT_TIME; 1581 inode->i_ctime = inode->i_mtime = current_time(inode);
1582 1582
1583 if (page->index < I0_BLOCKS) 1583 if (page->index < I0_BLOCKS)
1584 return logfs_write_direct(inode, page, flags); 1584 return logfs_write_direct(inode, page, flags);
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c
index 908ebbf0ac7e..582831ab3eb9 100644
--- a/fs/nilfs2/dir.c
+++ b/fs/nilfs2/dir.c
@@ -438,7 +438,7 @@ void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de,
438 nilfs_set_de_type(de, inode); 438 nilfs_set_de_type(de, inode);
439 nilfs_commit_chunk(page, mapping, from, to); 439 nilfs_commit_chunk(page, mapping, from, to);
440 nilfs_put_page(page); 440 nilfs_put_page(page);
441 dir->i_mtime = dir->i_ctime = CURRENT_TIME; 441 dir->i_mtime = dir->i_ctime = current_time(dir);
442} 442}
443 443
444/* 444/*
@@ -528,7 +528,7 @@ got_it:
528 de->inode = cpu_to_le64(inode->i_ino); 528 de->inode = cpu_to_le64(inode->i_ino);
529 nilfs_set_de_type(de, inode); 529 nilfs_set_de_type(de, inode);
530 nilfs_commit_chunk(page, page->mapping, from, to); 530 nilfs_commit_chunk(page, page->mapping, from, to);
531 dir->i_mtime = dir->i_ctime = CURRENT_TIME; 531 dir->i_mtime = dir->i_ctime = current_time(dir);
532 nilfs_mark_inode_dirty(dir); 532 nilfs_mark_inode_dirty(dir);
533 /* OFFSET_CACHE */ 533 /* OFFSET_CACHE */
534out_put: 534out_put:
@@ -576,7 +576,7 @@ int nilfs_delete_entry(struct nilfs_dir_entry *dir, struct page *page)
576 pde->rec_len = nilfs_rec_len_to_disk(to - from); 576 pde->rec_len = nilfs_rec_len_to_disk(to - from);
577 dir->inode = 0; 577 dir->inode = 0;
578 nilfs_commit_chunk(page, mapping, from, to); 578 nilfs_commit_chunk(page, mapping, from, to);
579 inode->i_ctime = inode->i_mtime = CURRENT_TIME; 579 inode->i_ctime = inode->i_mtime = current_time(inode);
580out: 580out:
581 nilfs_put_page(page); 581 nilfs_put_page(page);
582 return err; 582 return err;
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index af04f553d7c9..bf084035f83c 100644
--- a/fs/nilfs2/inode.c
+++ b/fs/nilfs2/inode.c
@@ -367,7 +367,7 @@ struct inode *nilfs_new_inode(struct inode *dir, umode_t mode)
367 atomic64_inc(&root->inodes_count); 367 atomic64_inc(&root->inodes_count);
368 inode_init_owner(inode, dir, mode); 368 inode_init_owner(inode, dir, mode);
369 inode->i_ino = ino; 369 inode->i_ino = ino;
370 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 370 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
371 371
372 if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)) { 372 if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)) {
373 err = nilfs_bmap_read(ii->i_bmap, NULL); 373 err = nilfs_bmap_read(ii->i_bmap, NULL);
@@ -749,7 +749,7 @@ void nilfs_truncate(struct inode *inode)
749 749
750 nilfs_truncate_bmap(ii, blkoff); 750 nilfs_truncate_bmap(ii, blkoff);
751 751
752 inode->i_mtime = inode->i_ctime = CURRENT_TIME; 752 inode->i_mtime = inode->i_ctime = current_time(inode);
753 if (IS_SYNC(inode)) 753 if (IS_SYNC(inode))
754 nilfs_set_transaction_flag(NILFS_TI_SYNC); 754 nilfs_set_transaction_flag(NILFS_TI_SYNC);
755 755
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c
index f1d7989459fd..1d2c3d7711fe 100644
--- a/fs/nilfs2/ioctl.c
+++ b/fs/nilfs2/ioctl.c
@@ -174,7 +174,7 @@ static int nilfs_ioctl_setflags(struct inode *inode, struct file *filp,
174 (flags & FS_FL_USER_MODIFIABLE); 174 (flags & FS_FL_USER_MODIFIABLE);
175 175
176 nilfs_set_inode_flags(inode); 176 nilfs_set_inode_flags(inode);
177 inode->i_ctime = CURRENT_TIME; 177 inode->i_ctime = current_time(inode);
178 if (IS_SYNC(inode)) 178 if (IS_SYNC(inode))
179 nilfs_set_transaction_flag(NILFS_TI_SYNC); 179 nilfs_set_transaction_flag(NILFS_TI_SYNC);
180 180
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c
index dbcf1dc93a51..ace5ebf3b2a8 100644
--- a/fs/nilfs2/namei.c
+++ b/fs/nilfs2/namei.c
@@ -194,7 +194,7 @@ static int nilfs_link(struct dentry *old_dentry, struct inode *dir,
194 if (err) 194 if (err)
195 return err; 195 return err;
196 196
197 inode->i_ctime = CURRENT_TIME; 197 inode->i_ctime = current_time(inode);
198 inode_inc_link_count(inode); 198 inode_inc_link_count(inode);
199 ihold(inode); 199 ihold(inode);
200 200
@@ -391,7 +391,7 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry,
391 goto out_dir; 391 goto out_dir;
392 nilfs_set_link(new_dir, new_de, new_page, old_inode); 392 nilfs_set_link(new_dir, new_de, new_page, old_inode);
393 nilfs_mark_inode_dirty(new_dir); 393 nilfs_mark_inode_dirty(new_dir);
394 new_inode->i_ctime = CURRENT_TIME; 394 new_inode->i_ctime = current_time(new_inode);
395 if (dir_de) 395 if (dir_de)
396 drop_nlink(new_inode); 396 drop_nlink(new_inode);
397 drop_nlink(new_inode); 397 drop_nlink(new_inode);
@@ -410,7 +410,7 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry,
410 * Like most other Unix systems, set the ctime for inodes on a 410 * Like most other Unix systems, set the ctime for inodes on a
411 * rename. 411 * rename.
412 */ 412 */
413 old_inode->i_ctime = CURRENT_TIME; 413 old_inode->i_ctime = current_time(old_inode);
414 414
415 nilfs_delete_entry(old_de, old_page); 415 nilfs_delete_entry(old_de, old_page);
416 416
diff --git a/fs/nsfs.c b/fs/nsfs.c
index 8f20d6016e20..2b731bc2ae6d 100644
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -82,7 +82,7 @@ slow:
82 return ERR_PTR(-ENOMEM); 82 return ERR_PTR(-ENOMEM);
83 } 83 }
84 inode->i_ino = ns->inum; 84 inode->i_ino = ns->inum;
85 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 85 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
86 inode->i_flags |= S_IMMUTABLE; 86 inode->i_flags |= S_IMMUTABLE;
87 inode->i_mode = S_IFREG | S_IRUGO; 87 inode->i_mode = S_IFREG | S_IRUGO;
88 inode->i_fop = &ns_file_operations; 88 inode->i_fop = &ns_file_operations;
diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c
index 2162434728c0..acf0012bfc9a 100644
--- a/fs/ocfs2/acl.c
+++ b/fs/ocfs2/acl.c
@@ -201,7 +201,7 @@ static int ocfs2_acl_set_mode(struct inode *inode, struct buffer_head *di_bh,
201 } 201 }
202 202
203 inode->i_mode = new_mode; 203 inode->i_mode = new_mode;
204 inode->i_ctime = CURRENT_TIME; 204 inode->i_ctime = current_time(inode);
205 di->i_mode = cpu_to_le16(inode->i_mode); 205 di->i_mode = cpu_to_le16(inode->i_mode);
206 di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec); 206 di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
207 di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec); 207 di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
diff --git a/fs/ocfs2/alloc.c b/fs/ocfs2/alloc.c
index 7dabbc31060e..498e71141b53 100644
--- a/fs/ocfs2/alloc.c
+++ b/fs/ocfs2/alloc.c
@@ -7311,7 +7311,7 @@ int ocfs2_truncate_inline(struct inode *inode, struct buffer_head *di_bh,
7311 } 7311 }
7312 7312
7313 inode->i_blocks = ocfs2_inode_sector_count(inode); 7313 inode->i_blocks = ocfs2_inode_sector_count(inode);
7314 inode->i_ctime = inode->i_mtime = CURRENT_TIME; 7314 inode->i_ctime = inode->i_mtime = current_time(inode);
7315 7315
7316 di->i_ctime = di->i_mtime = cpu_to_le64(inode->i_ctime.tv_sec); 7316 di->i_ctime = di->i_mtime = cpu_to_le64(inode->i_ctime.tv_sec);
7317 di->i_ctime_nsec = di->i_mtime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec); 7317 di->i_ctime_nsec = di->i_mtime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 98d36548153d..3a22be483af5 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -2020,7 +2020,7 @@ out_write_size:
2020 } 2020 }
2021 inode->i_blocks = ocfs2_inode_sector_count(inode); 2021 inode->i_blocks = ocfs2_inode_sector_count(inode);
2022 di->i_size = cpu_to_le64((u64)i_size_read(inode)); 2022 di->i_size = cpu_to_le64((u64)i_size_read(inode));
2023 inode->i_mtime = inode->i_ctime = CURRENT_TIME; 2023 inode->i_mtime = inode->i_ctime = current_time(inode);
2024 di->i_mtime = di->i_ctime = cpu_to_le64(inode->i_mtime.tv_sec); 2024 di->i_mtime = di->i_ctime = cpu_to_le64(inode->i_mtime.tv_sec);
2025 di->i_mtime_nsec = di->i_ctime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec); 2025 di->i_mtime_nsec = di->i_ctime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec);
2026 ocfs2_update_inode_fsync_trans(handle, inode, 1); 2026 ocfs2_update_inode_fsync_trans(handle, inode, 1);
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index e1adf285fc31..e7054e2ac922 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -1677,7 +1677,7 @@ int __ocfs2_add_entry(handle_t *handle,
1677 offset, ocfs2_dir_trailer_blk_off(dir->i_sb)); 1677 offset, ocfs2_dir_trailer_blk_off(dir->i_sb));
1678 1678
1679 if (ocfs2_dirent_would_fit(de, rec_len)) { 1679 if (ocfs2_dirent_would_fit(de, rec_len)) {
1680 dir->i_mtime = dir->i_ctime = CURRENT_TIME; 1680 dir->i_mtime = dir->i_ctime = current_time(dir);
1681 retval = ocfs2_mark_inode_dirty(handle, dir, parent_fe_bh); 1681 retval = ocfs2_mark_inode_dirty(handle, dir, parent_fe_bh);
1682 if (retval < 0) { 1682 if (retval < 0) {
1683 mlog_errno(retval); 1683 mlog_errno(retval);
@@ -2990,7 +2990,7 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh,
2990 ocfs2_dinode_new_extent_list(dir, di); 2990 ocfs2_dinode_new_extent_list(dir, di);
2991 2991
2992 i_size_write(dir, sb->s_blocksize); 2992 i_size_write(dir, sb->s_blocksize);
2993 dir->i_mtime = dir->i_ctime = CURRENT_TIME; 2993 dir->i_mtime = dir->i_ctime = current_time(dir);
2994 2994
2995 di->i_size = cpu_to_le64(sb->s_blocksize); 2995 di->i_size = cpu_to_le64(sb->s_blocksize);
2996 di->i_ctime = di->i_mtime = cpu_to_le64(dir->i_ctime.tv_sec); 2996 di->i_ctime = di->i_mtime = cpu_to_le64(dir->i_ctime.tv_sec);
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c
index ef474cdd6404..f0d9763db126 100644
--- a/fs/ocfs2/dlmfs/dlmfs.c
+++ b/fs/ocfs2/dlmfs/dlmfs.c
@@ -398,7 +398,7 @@ static struct inode *dlmfs_get_root_inode(struct super_block *sb)
398 if (inode) { 398 if (inode) {
399 inode->i_ino = get_next_ino(); 399 inode->i_ino = get_next_ino();
400 inode_init_owner(inode, NULL, mode); 400 inode_init_owner(inode, NULL, mode);
401 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 401 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
402 inc_nlink(inode); 402 inc_nlink(inode);
403 403
404 inode->i_fop = &simple_dir_operations; 404 inode->i_fop = &simple_dir_operations;
@@ -421,7 +421,7 @@ static struct inode *dlmfs_get_inode(struct inode *parent,
421 421
422 inode->i_ino = get_next_ino(); 422 inode->i_ino = get_next_ino();
423 inode_init_owner(inode, parent, mode); 423 inode_init_owner(inode, parent, mode);
424 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 424 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
425 425
426 ip = DLMFS_I(inode); 426 ip = DLMFS_I(inode);
427 ip->ip_conn = DLMFS_I(parent)->ip_conn; 427 ip->ip_conn = DLMFS_I(parent)->ip_conn;
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 4e7b0dc22450..9adcac9dfda1 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -253,7 +253,7 @@ int ocfs2_should_update_atime(struct inode *inode,
253 return 0; 253 return 0;
254 } 254 }
255 255
256 now = CURRENT_TIME; 256 now = current_time(inode);
257 if ((now.tv_sec - inode->i_atime.tv_sec <= osb->s_atime_quantum)) 257 if ((now.tv_sec - inode->i_atime.tv_sec <= osb->s_atime_quantum))
258 return 0; 258 return 0;
259 else 259 else
@@ -287,7 +287,7 @@ int ocfs2_update_inode_atime(struct inode *inode,
287 * have i_mutex to guard against concurrent changes to other 287 * have i_mutex to guard against concurrent changes to other
288 * inode fields. 288 * inode fields.
289 */ 289 */
290 inode->i_atime = CURRENT_TIME; 290 inode->i_atime = current_time(inode);
291 di->i_atime = cpu_to_le64(inode->i_atime.tv_sec); 291 di->i_atime = cpu_to_le64(inode->i_atime.tv_sec);
292 di->i_atime_nsec = cpu_to_le32(inode->i_atime.tv_nsec); 292 di->i_atime_nsec = cpu_to_le32(inode->i_atime.tv_nsec);
293 ocfs2_update_inode_fsync_trans(handle, inode, 0); 293 ocfs2_update_inode_fsync_trans(handle, inode, 0);
@@ -308,7 +308,7 @@ int ocfs2_set_inode_size(handle_t *handle,
308 308
309 i_size_write(inode, new_i_size); 309 i_size_write(inode, new_i_size);
310 inode->i_blocks = ocfs2_inode_sector_count(inode); 310 inode->i_blocks = ocfs2_inode_sector_count(inode);
311 inode->i_ctime = inode->i_mtime = CURRENT_TIME; 311 inode->i_ctime = inode->i_mtime = current_time(inode);
312 312
313 status = ocfs2_mark_inode_dirty(handle, inode, fe_bh); 313 status = ocfs2_mark_inode_dirty(handle, inode, fe_bh);
314 if (status < 0) { 314 if (status < 0) {
@@ -429,7 +429,7 @@ static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb,
429 } 429 }
430 430
431 i_size_write(inode, new_i_size); 431 i_size_write(inode, new_i_size);
432 inode->i_ctime = inode->i_mtime = CURRENT_TIME; 432 inode->i_ctime = inode->i_mtime = current_time(inode);
433 433
434 di = (struct ocfs2_dinode *) fe_bh->b_data; 434 di = (struct ocfs2_dinode *) fe_bh->b_data;
435 di->i_size = cpu_to_le64(new_i_size); 435 di->i_size = cpu_to_le64(new_i_size);
@@ -840,7 +840,7 @@ static int ocfs2_write_zero_page(struct inode *inode, u64 abs_from,
840 i_size_write(inode, abs_to); 840 i_size_write(inode, abs_to);
841 inode->i_blocks = ocfs2_inode_sector_count(inode); 841 inode->i_blocks = ocfs2_inode_sector_count(inode);
842 di->i_size = cpu_to_le64((u64)i_size_read(inode)); 842 di->i_size = cpu_to_le64((u64)i_size_read(inode));
843 inode->i_mtime = inode->i_ctime = CURRENT_TIME; 843 inode->i_mtime = inode->i_ctime = current_time(inode);
844 di->i_mtime = di->i_ctime = cpu_to_le64(inode->i_mtime.tv_sec); 844 di->i_mtime = di->i_ctime = cpu_to_le64(inode->i_mtime.tv_sec);
845 di->i_ctime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec); 845 di->i_ctime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec);
846 di->i_mtime_nsec = di->i_ctime_nsec; 846 di->i_mtime_nsec = di->i_ctime_nsec;
@@ -1936,7 +1936,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode,
1936 if (change_size && i_size_read(inode) < size) 1936 if (change_size && i_size_read(inode) < size)
1937 i_size_write(inode, size); 1937 i_size_write(inode, size);
1938 1938
1939 inode->i_ctime = inode->i_mtime = CURRENT_TIME; 1939 inode->i_ctime = inode->i_mtime = current_time(inode);
1940 ret = ocfs2_mark_inode_dirty(handle, inode, di_bh); 1940 ret = ocfs2_mark_inode_dirty(handle, inode, di_bh);
1941 if (ret < 0) 1941 if (ret < 0)
1942 mlog_errno(ret); 1942 mlog_errno(ret);
diff --git a/fs/ocfs2/move_extents.c b/fs/ocfs2/move_extents.c
index e3d05d9901a3..4e8f32eb0bdb 100644
--- a/fs/ocfs2/move_extents.c
+++ b/fs/ocfs2/move_extents.c
@@ -953,7 +953,7 @@ static int ocfs2_move_extents(struct ocfs2_move_extents_context *context)
953 } 953 }
954 954
955 di = (struct ocfs2_dinode *)di_bh->b_data; 955 di = (struct ocfs2_dinode *)di_bh->b_data;
956 inode->i_ctime = CURRENT_TIME; 956 inode->i_ctime = current_time(inode);
957 di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec); 957 di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
958 di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec); 958 di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
959 ocfs2_update_inode_fsync_trans(handle, inode, 0); 959 ocfs2_update_inode_fsync_trans(handle, inode, 0);
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index a8f1225e6d9b..e2747d8d0552 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -798,7 +798,7 @@ static int ocfs2_link(struct dentry *old_dentry,
798 } 798 }
799 799
800 inc_nlink(inode); 800 inc_nlink(inode);
801 inode->i_ctime = CURRENT_TIME; 801 inode->i_ctime = current_time(inode);
802 ocfs2_set_links_count(fe, inode->i_nlink); 802 ocfs2_set_links_count(fe, inode->i_nlink);
803 fe->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec); 803 fe->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
804 fe->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec); 804 fe->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
@@ -1000,7 +1000,7 @@ static int ocfs2_unlink(struct inode *dir,
1000 ocfs2_set_links_count(fe, inode->i_nlink); 1000 ocfs2_set_links_count(fe, inode->i_nlink);
1001 ocfs2_journal_dirty(handle, fe_bh); 1001 ocfs2_journal_dirty(handle, fe_bh);
1002 1002
1003 dir->i_ctime = dir->i_mtime = CURRENT_TIME; 1003 dir->i_ctime = dir->i_mtime = current_time(dir);
1004 if (S_ISDIR(inode->i_mode)) 1004 if (S_ISDIR(inode->i_mode))
1005 drop_nlink(dir); 1005 drop_nlink(dir);
1006 1006
@@ -1537,7 +1537,7 @@ static int ocfs2_rename(struct inode *old_dir,
1537 new_dir_bh, &target_insert); 1537 new_dir_bh, &target_insert);
1538 } 1538 }
1539 1539
1540 old_inode->i_ctime = CURRENT_TIME; 1540 old_inode->i_ctime = current_time(old_inode);
1541 mark_inode_dirty(old_inode); 1541 mark_inode_dirty(old_inode);
1542 1542
1543 status = ocfs2_journal_access_di(handle, INODE_CACHE(old_inode), 1543 status = ocfs2_journal_access_di(handle, INODE_CACHE(old_inode),
@@ -1586,9 +1586,9 @@ static int ocfs2_rename(struct inode *old_dir,
1586 1586
1587 if (new_inode) { 1587 if (new_inode) {
1588 drop_nlink(new_inode); 1588 drop_nlink(new_inode);
1589 new_inode->i_ctime = CURRENT_TIME; 1589 new_inode->i_ctime = current_time(new_inode);
1590 } 1590 }
1591 old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME; 1591 old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir);
1592 1592
1593 if (update_dot_dot) { 1593 if (update_dot_dot) {
1594 status = ocfs2_update_entry(old_inode, handle, 1594 status = ocfs2_update_entry(old_inode, handle,
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c
index 92bbe93bfe10..19238512a324 100644
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -3778,7 +3778,7 @@ static int ocfs2_change_ctime(struct inode *inode,
3778 goto out_commit; 3778 goto out_commit;
3779 } 3779 }
3780 3780
3781 inode->i_ctime = CURRENT_TIME; 3781 inode->i_ctime = current_time(inode);
3782 di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec); 3782 di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
3783 di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec); 3783 di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
3784 3784
@@ -4094,7 +4094,7 @@ static int ocfs2_complete_reflink(struct inode *s_inode,
4094 * we want mtime to appear identical to the source and 4094 * we want mtime to appear identical to the source and
4095 * update ctime. 4095 * update ctime.
4096 */ 4096 */
4097 t_inode->i_ctime = CURRENT_TIME; 4097 t_inode->i_ctime = current_time(t_inode);
4098 4098
4099 di->i_ctime = cpu_to_le64(t_inode->i_ctime.tv_sec); 4099 di->i_ctime = cpu_to_le64(t_inode->i_ctime.tv_sec);
4100 di->i_ctime_nsec = cpu_to_le32(t_inode->i_ctime.tv_nsec); 4100 di->i_ctime_nsec = cpu_to_le32(t_inode->i_ctime.tv_nsec);
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 5bb44f7a78ee..cb157a34a656 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -3431,7 +3431,7 @@ static int __ocfs2_xattr_set_handle(struct inode *inode,
3431 goto out; 3431 goto out;
3432 } 3432 }
3433 3433
3434 inode->i_ctime = CURRENT_TIME; 3434 inode->i_ctime = current_time(inode);
3435 di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec); 3435 di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
3436 di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec); 3436 di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
3437 ocfs2_journal_dirty(ctxt->handle, xis->inode_bh); 3437 ocfs2_journal_dirty(ctxt->handle, xis->inode_bh);
diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c
index 3d935c81789a..df7ea8543a2e 100644
--- a/fs/omfs/inode.c
+++ b/fs/omfs/inode.c
@@ -49,7 +49,7 @@ struct inode *omfs_new_inode(struct inode *dir, umode_t mode)
49 inode_init_owner(inode, NULL, mode); 49 inode_init_owner(inode, NULL, mode);
50 inode->i_mapping->a_ops = &omfs_aops; 50 inode->i_mapping->a_ops = &omfs_aops;
51 51
52 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 52 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
53 switch (mode & S_IFMT) { 53 switch (mode & S_IFMT) {
54 case S_IFDIR: 54 case S_IFDIR:
55 inode->i_op = &omfs_dir_inops; 55 inode->i_op = &omfs_dir_inops;
diff --git a/fs/openpromfs/inode.c b/fs/openpromfs/inode.c
index c7a86993d97e..c003a667ed1a 100644
--- a/fs/openpromfs/inode.c
+++ b/fs/openpromfs/inode.c
@@ -355,7 +355,7 @@ static struct inode *openprom_iget(struct super_block *sb, ino_t ino)
355 if (!inode) 355 if (!inode)
356 return ERR_PTR(-ENOMEM); 356 return ERR_PTR(-ENOMEM);
357 if (inode->i_state & I_NEW) { 357 if (inode->i_state & I_NEW) {
358 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 358 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
359 if (inode->i_ino == OPENPROM_ROOT_INO) { 359 if (inode->i_ino == OPENPROM_ROOT_INO) {
360 inode->i_op = &openprom_inode_operations; 360 inode->i_op = &openprom_inode_operations;
361 inode->i_fop = &openprom_operations; 361 inode->i_fop = &openprom_operations;
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
index 526040e09f78..e799bb4474f6 100644
--- a/fs/orangefs/file.c
+++ b/fs/orangefs/file.c
@@ -358,7 +358,7 @@ out:
358 file_accessed(file); 358 file_accessed(file);
359 } else { 359 } else {
360 SetMtimeFlag(orangefs_inode); 360 SetMtimeFlag(orangefs_inode);
361 inode->i_mtime = CURRENT_TIME; 361 inode->i_mtime = current_time(inode);
362 mark_inode_dirty_sync(inode); 362 mark_inode_dirty_sync(inode);
363 } 363 }
364 } 364 }
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index 28a0557a69be..113d928d1223 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -438,7 +438,7 @@ struct inode *orangefs_new_inode(struct super_block *sb, struct inode *dir,
438 inode->i_mode = mode; 438 inode->i_mode = mode;
439 inode->i_uid = current_fsuid(); 439 inode->i_uid = current_fsuid();
440 inode->i_gid = current_fsgid(); 440 inode->i_gid = current_fsgid();
441 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 441 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
442 inode->i_size = PAGE_SIZE; 442 inode->i_size = PAGE_SIZE;
443 inode->i_rdev = dev; 443 inode->i_rdev = dev;
444 444
diff --git a/fs/pipe.c b/fs/pipe.c
index 4ebe6b2e5217..5c7c8b7726b8 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -716,7 +716,7 @@ static struct inode * get_pipe_inode(void)
716 inode->i_mode = S_IFIFO | S_IRUSR | S_IWUSR; 716 inode->i_mode = S_IFIFO | S_IRUSR | S_IWUSR;
717 inode->i_uid = current_fsuid(); 717 inode->i_uid = current_fsuid();
718 inode->i_gid = current_fsgid(); 718 inode->i_gid = current_fsgid();
719 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 719 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
720 720
721 return inode; 721 return inode;
722 722
diff --git a/fs/posix_acl.c b/fs/posix_acl.c
index 59d47ab0791a..ad0799c8b59b 100644
--- a/fs/posix_acl.c
+++ b/fs/posix_acl.c
@@ -897,7 +897,7 @@ int simple_set_acl(struct inode *inode, struct posix_acl *acl, int type)
897 acl = NULL; 897 acl = NULL;
898 } 898 }
899 899
900 inode->i_ctime = CURRENT_TIME; 900 inode->i_ctime = current_time(inode);
901 set_cached_acl(inode, type, acl); 901 set_cached_acl(inode, type, acl);
902 return 0; 902 return 0;
903} 903}
diff --git a/fs/proc/base.c b/fs/proc/base.c
index ac0df4dde823..029161d85355 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1664,7 +1664,7 @@ struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *t
1664 /* Common stuff */ 1664 /* Common stuff */
1665 ei = PROC_I(inode); 1665 ei = PROC_I(inode);
1666 inode->i_ino = get_next_ino(); 1666 inode->i_ino = get_next_ino();
1667 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 1667 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
1668 inode->i_op = &proc_def_inode_operations; 1668 inode->i_op = &proc_def_inode_operations;
1669 1669
1670 /* 1670 /*
diff --git a/fs/proc/inode.c b/fs/proc/inode.c
index ce1f1a919902..e69ebe648a34 100644
--- a/fs/proc/inode.c
+++ b/fs/proc/inode.c
@@ -420,7 +420,7 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
420 420
421 if (inode) { 421 if (inode) {
422 inode->i_ino = de->low_ino; 422 inode->i_ino = de->low_ino;
423 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 423 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
424 PROC_I(inode)->pde = de; 424 PROC_I(inode)->pde = de;
425 425
426 if (is_empty_pde(de)) { 426 if (is_empty_pde(de)) {
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 1b93650dda2f..f9e2f7a31abd 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -444,7 +444,7 @@ static struct inode *proc_sys_make_inode(struct super_block *sb,
444 ei->sysctl = head; 444 ei->sysctl = head;
445 ei->sysctl_entry = table; 445 ei->sysctl_entry = table;
446 446
447 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 447 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
448 inode->i_mode = table->mode; 448 inode->i_mode = table->mode;
449 if (!S_ISDIR(table->mode)) { 449 if (!S_ISDIR(table->mode)) {
450 inode->i_mode |= S_IFREG; 450 inode->i_mode |= S_IFREG;
diff --git a/fs/proc/self.c b/fs/proc/self.c
index b6a8d3529fea..40245954c450 100644
--- a/fs/proc/self.c
+++ b/fs/proc/self.c
@@ -56,7 +56,7 @@ int proc_setup_self(struct super_block *s)
56 struct inode *inode = new_inode_pseudo(s); 56 struct inode *inode = new_inode_pseudo(s);
57 if (inode) { 57 if (inode) {
58 inode->i_ino = self_inum; 58 inode->i_ino = self_inum;
59 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 59 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
60 inode->i_mode = S_IFLNK | S_IRWXUGO; 60 inode->i_mode = S_IFLNK | S_IRWXUGO;
61 inode->i_uid = GLOBAL_ROOT_UID; 61 inode->i_uid = GLOBAL_ROOT_UID;
62 inode->i_gid = GLOBAL_ROOT_GID; 62 inode->i_gid = GLOBAL_ROOT_GID;
diff --git a/fs/proc/thread_self.c b/fs/proc/thread_self.c
index e58a31e8fb2a..595b90a9766c 100644
--- a/fs/proc/thread_self.c
+++ b/fs/proc/thread_self.c
@@ -58,7 +58,7 @@ int proc_setup_thread_self(struct super_block *s)
58 struct inode *inode = new_inode_pseudo(s); 58 struct inode *inode = new_inode_pseudo(s);
59 if (inode) { 59 if (inode) {
60 inode->i_ino = thread_self_inum; 60 inode->i_ino = thread_self_inum;
61 inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; 61 inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
62 inode->i_mode = S_IFLNK | S_IRWXUGO; 62 inode->i_mode = S_IFLNK | S_IRWXUGO;
63 inode->i_uid = GLOBAL_ROOT_UID; 63 inode->i_uid = GLOBAL_ROOT_UID;
64 inode->i_gid = GLOBAL_ROOT_GID; 64 inode->i_gid = GLOBAL_ROOT_GID;
diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c
index ec9ddef5ae75..1781dc50762e 100644
--- a/fs/pstore/inode.c
+++ b/fs/pstore/inode.c
@@ -230,7 +230,7 @@ static struct inode *pstore_get_inode(struct super_block *sb)
230 struct inode *inode = new_inode(sb); 230 struct inode *inode = new_inode(sb);
231 if (inode) { 231 if (inode) {
232 inode->i_ino = get_next_ino(); 232 inode->i_ino = get_next_ino();
233 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 233 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
234 } 234 }
235 return inode; 235 return inode;
236} 236}
diff --git a/fs/ramfs/inode.c b/fs/ramfs/inode.c
index 1ab6e6c2e60e..8621c039b536 100644
--- a/fs/ramfs/inode.c
+++ b/fs/ramfs/inode.c
@@ -61,7 +61,7 @@ struct inode *ramfs_get_inode(struct super_block *sb,
61 inode->i_mapping->a_ops = &ramfs_aops; 61 inode->i_mapping->a_ops = &ramfs_aops;
62 mapping_set_gfp_mask(inode->i_mapping, GFP_HIGHUSER); 62 mapping_set_gfp_mask(inode->i_mapping, GFP_HIGHUSER);
63 mapping_set_unevictable(inode->i_mapping); 63 mapping_set_unevictable(inode->i_mapping);
64 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 64 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
65 switch (mode & S_IFMT) { 65 switch (mode & S_IFMT) {
66 default: 66 default:
67 init_special_inode(inode, mode, dev); 67 init_special_inode(inode, mode, dev);
@@ -100,7 +100,7 @@ ramfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
100 d_instantiate(dentry, inode); 100 d_instantiate(dentry, inode);
101 dget(dentry); /* Extra count - pin the dentry in core */ 101 dget(dentry); /* Extra count - pin the dentry in core */
102 error = 0; 102 error = 0;
103 dir->i_mtime = dir->i_ctime = CURRENT_TIME; 103 dir->i_mtime = dir->i_ctime = current_time(dir);
104 } 104 }
105 return error; 105 return error;
106} 106}
@@ -130,7 +130,7 @@ static int ramfs_symlink(struct inode * dir, struct dentry *dentry, const char *
130 if (!error) { 130 if (!error) {
131 d_instantiate(dentry, inode); 131 d_instantiate(dentry, inode);
132 dget(dentry); 132 dget(dentry);
133 dir->i_mtime = dir->i_ctime = CURRENT_TIME; 133 dir->i_mtime = dir->i_ctime = current_time(dir);
134 } else 134 } else
135 iput(inode); 135 iput(inode);
136 } 136 }
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
index ad40b64c5e2f..21d36d284735 100644
--- a/fs/tracefs/inode.c
+++ b/fs/tracefs/inode.c
@@ -133,7 +133,7 @@ static struct inode *tracefs_get_inode(struct super_block *sb)
133 struct inode *inode = new_inode(sb); 133 struct inode *inode = new_inode(sb);
134 if (inode) { 134 if (inode) {
135 inode->i_ino = get_next_ino(); 135 inode->i_ino = get_next_ino();
136 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 136 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
137 } 137 }
138 return inode; 138 return inode;
139} 139}
diff --git a/ipc/mqueue.c b/ipc/mqueue.c
index 0b13ace266f2..8cbd6e6894d5 100644
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -225,7 +225,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb,
225 inode->i_mode = mode; 225 inode->i_mode = mode;
226 inode->i_uid = current_fsuid(); 226 inode->i_uid = current_fsuid();
227 inode->i_gid = current_fsgid(); 227 inode->i_gid = current_fsgid();
228 inode->i_mtime = inode->i_ctime = inode->i_atime = CURRENT_TIME; 228 inode->i_mtime = inode->i_ctime = inode->i_atime = current_time(inode);
229 229
230 if (S_ISREG(mode)) { 230 if (S_ISREG(mode)) {
231 struct mqueue_inode_info *info; 231 struct mqueue_inode_info *info;
@@ -446,7 +446,7 @@ static int mqueue_create(struct inode *dir, struct dentry *dentry,
446 446
447 put_ipc_ns(ipc_ns); 447 put_ipc_ns(ipc_ns);
448 dir->i_size += DIRENT_SIZE; 448 dir->i_size += DIRENT_SIZE;
449 dir->i_ctime = dir->i_mtime = dir->i_atime = CURRENT_TIME; 449 dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir);
450 450
451 d_instantiate(dentry, inode); 451 d_instantiate(dentry, inode);
452 dget(dentry); 452 dget(dentry);
@@ -462,7 +462,7 @@ static int mqueue_unlink(struct inode *dir, struct dentry *dentry)
462{ 462{
463 struct inode *inode = d_inode(dentry); 463 struct inode *inode = d_inode(dentry);
464 464
465 dir->i_ctime = dir->i_mtime = dir->i_atime = CURRENT_TIME; 465 dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir);
466 dir->i_size -= DIRENT_SIZE; 466 dir->i_size -= DIRENT_SIZE;
467 drop_nlink(inode); 467 drop_nlink(inode);
468 dput(dentry); 468 dput(dentry);
@@ -500,7 +500,7 @@ static ssize_t mqueue_read_file(struct file *filp, char __user *u_data,
500 if (ret <= 0) 500 if (ret <= 0)
501 return ret; 501 return ret;
502 502
503 file_inode(filp)->i_atime = file_inode(filp)->i_ctime = CURRENT_TIME; 503 file_inode(filp)->i_atime = file_inode(filp)->i_ctime = current_time(file_inode(filp));
504 return ret; 504 return ret;
505} 505}
506 506
@@ -1060,7 +1060,7 @@ SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr,
1060 __do_notify(info); 1060 __do_notify(info);
1061 } 1061 }
1062 inode->i_atime = inode->i_mtime = inode->i_ctime = 1062 inode->i_atime = inode->i_mtime = inode->i_ctime =
1063 CURRENT_TIME; 1063 current_time(inode);
1064 } 1064 }
1065out_unlock: 1065out_unlock:
1066 spin_unlock(&info->lock); 1066 spin_unlock(&info->lock);
@@ -1156,7 +1156,7 @@ SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes, char __user *, u_msg_ptr,
1156 msg_ptr = msg_get(info); 1156 msg_ptr = msg_get(info);
1157 1157
1158 inode->i_atime = inode->i_mtime = inode->i_ctime = 1158 inode->i_atime = inode->i_mtime = inode->i_ctime =
1159 CURRENT_TIME; 1159 current_time(inode);
1160 1160
1161 /* There is now free space in queue. */ 1161 /* There is now free space in queue. */
1162 pipelined_receive(&wake_q, info); 1162 pipelined_receive(&wake_q, info);
@@ -1277,7 +1277,7 @@ retry:
1277 if (u_notification == NULL) { 1277 if (u_notification == NULL) {
1278 if (info->notify_owner == task_tgid(current)) { 1278 if (info->notify_owner == task_tgid(current)) {
1279 remove_notification(info); 1279 remove_notification(info);
1280 inode->i_atime = inode->i_ctime = CURRENT_TIME; 1280 inode->i_atime = inode->i_ctime = current_time(inode);
1281 } 1281 }
1282 } else if (info->notify_owner != NULL) { 1282 } else if (info->notify_owner != NULL) {
1283 ret = -EBUSY; 1283 ret = -EBUSY;
@@ -1302,7 +1302,7 @@ retry:
1302 1302
1303 info->notify_owner = get_pid(task_tgid(current)); 1303 info->notify_owner = get_pid(task_tgid(current));
1304 info->notify_user_ns = get_user_ns(current_user_ns()); 1304 info->notify_user_ns = get_user_ns(current_user_ns());
1305 inode->i_atime = inode->i_ctime = CURRENT_TIME; 1305 inode->i_atime = inode->i_ctime = current_time(inode);
1306 } 1306 }
1307 spin_unlock(&info->lock); 1307 spin_unlock(&info->lock);
1308out_fput: 1308out_fput:
@@ -1359,7 +1359,7 @@ SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes,
1359 f.file->f_flags &= ~O_NONBLOCK; 1359 f.file->f_flags &= ~O_NONBLOCK;
1360 spin_unlock(&f.file->f_lock); 1360 spin_unlock(&f.file->f_lock);
1361 1361
1362 inode->i_atime = inode->i_ctime = CURRENT_TIME; 1362 inode->i_atime = inode->i_ctime = current_time(inode);
1363 } 1363 }
1364 1364
1365 spin_unlock(&info->lock); 1365 spin_unlock(&info->lock);
diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c
index 5967b870a895..1ed8473ec537 100644
--- a/kernel/bpf/inode.c
+++ b/kernel/bpf/inode.c
@@ -97,7 +97,7 @@ static struct inode *bpf_get_inode(struct super_block *sb,
97 return ERR_PTR(-ENOSPC); 97 return ERR_PTR(-ENOSPC);
98 98
99 inode->i_ino = get_next_ino(); 99 inode->i_ino = get_next_ino();
100 inode->i_atime = CURRENT_TIME; 100 inode->i_atime = current_time(inode);
101 inode->i_mtime = inode->i_atime; 101 inode->i_mtime = inode->i_atime;
102 inode->i_ctime = inode->i_atime; 102 inode->i_ctime = inode->i_atime;
103 103
diff --git a/mm/shmem.c b/mm/shmem.c
index fd8b2b5741b1..28ae88bbeffa 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -933,7 +933,7 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend,
933void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend) 933void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend)
934{ 934{
935 shmem_undo_range(inode, lstart, lend, false); 935 shmem_undo_range(inode, lstart, lend, false);
936 inode->i_ctime = inode->i_mtime = CURRENT_TIME; 936 inode->i_ctime = inode->i_mtime = current_time(inode);
937} 937}
938EXPORT_SYMBOL_GPL(shmem_truncate_range); 938EXPORT_SYMBOL_GPL(shmem_truncate_range);
939 939
@@ -978,7 +978,7 @@ static int shmem_setattr(struct dentry *dentry, struct iattr *attr)
978 if (error) 978 if (error)
979 return error; 979 return error;
980 i_size_write(inode, newsize); 980 i_size_write(inode, newsize);
981 inode->i_ctime = inode->i_mtime = CURRENT_TIME; 981 inode->i_ctime = inode->i_mtime = current_time(inode);
982 } 982 }
983 if (newsize <= oldsize) { 983 if (newsize <= oldsize) {
984 loff_t holebegin = round_up(newsize, PAGE_SIZE); 984 loff_t holebegin = round_up(newsize, PAGE_SIZE);
@@ -2082,7 +2082,7 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
2082 inode->i_ino = get_next_ino(); 2082 inode->i_ino = get_next_ino();
2083 inode_init_owner(inode, dir, mode); 2083 inode_init_owner(inode, dir, mode);
2084 inode->i_blocks = 0; 2084 inode->i_blocks = 0;
2085 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 2085 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
2086 inode->i_generation = get_seconds(); 2086 inode->i_generation = get_seconds();
2087 info = SHMEM_I(inode); 2087 info = SHMEM_I(inode);
2088 memset(info, 0, (char *)inode - (char *)info); 2088 memset(info, 0, (char *)inode - (char *)info);
@@ -2853,7 +2853,7 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset,
2853 2853
2854 if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > inode->i_size) 2854 if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > inode->i_size)
2855 i_size_write(inode, offset + len); 2855 i_size_write(inode, offset + len);
2856 inode->i_ctime = CURRENT_TIME; 2856 inode->i_ctime = current_time(inode);
2857undone: 2857undone:
2858 spin_lock(&inode->i_lock); 2858 spin_lock(&inode->i_lock);
2859 inode->i_private = NULL; 2859 inode->i_private = NULL;
@@ -2906,7 +2906,7 @@ shmem_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
2906 2906
2907 error = 0; 2907 error = 0;
2908 dir->i_size += BOGO_DIRENT_SIZE; 2908 dir->i_size += BOGO_DIRENT_SIZE;
2909 dir->i_ctime = dir->i_mtime = CURRENT_TIME; 2909 dir->i_ctime = dir->i_mtime = current_time(dir);
2910 d_instantiate(dentry, inode); 2910 d_instantiate(dentry, inode);
2911 dget(dentry); /* Extra count - pin the dentry in core */ 2911 dget(dentry); /* Extra count - pin the dentry in core */
2912 } 2912 }
@@ -2974,7 +2974,7 @@ static int shmem_link(struct dentry *old_dentry, struct inode *dir, struct dentr
2974 goto out; 2974 goto out;
2975 2975
2976 dir->i_size += BOGO_DIRENT_SIZE; 2976 dir->i_size += BOGO_DIRENT_SIZE;
2977 inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; 2977 inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
2978 inc_nlink(inode); 2978 inc_nlink(inode);
2979 ihold(inode); /* New dentry reference */ 2979 ihold(inode); /* New dentry reference */
2980 dget(dentry); /* Extra pinning count for the created dentry */ 2980 dget(dentry); /* Extra pinning count for the created dentry */
@@ -2991,7 +2991,7 @@ static int shmem_unlink(struct inode *dir, struct dentry *dentry)
2991 shmem_free_inode(inode->i_sb); 2991 shmem_free_inode(inode->i_sb);
2992 2992
2993 dir->i_size -= BOGO_DIRENT_SIZE; 2993 dir->i_size -= BOGO_DIRENT_SIZE;
2994 inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; 2994 inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
2995 drop_nlink(inode); 2995 drop_nlink(inode);
2996 dput(dentry); /* Undo the count from "create" - this does all the work */ 2996 dput(dentry); /* Undo the count from "create" - this does all the work */
2997 return 0; 2997 return 0;
@@ -3024,7 +3024,7 @@ static int shmem_exchange(struct inode *old_dir, struct dentry *old_dentry, stru
3024 old_dir->i_ctime = old_dir->i_mtime = 3024 old_dir->i_ctime = old_dir->i_mtime =
3025 new_dir->i_ctime = new_dir->i_mtime = 3025 new_dir->i_ctime = new_dir->i_mtime =
3026 d_inode(old_dentry)->i_ctime = 3026 d_inode(old_dentry)->i_ctime =
3027 d_inode(new_dentry)->i_ctime = CURRENT_TIME; 3027 d_inode(new_dentry)->i_ctime = current_time(old_dir);
3028 3028
3029 return 0; 3029 return 0;
3030} 3030}
@@ -3098,7 +3098,7 @@ static int shmem_rename2(struct inode *old_dir, struct dentry *old_dentry, struc
3098 new_dir->i_size += BOGO_DIRENT_SIZE; 3098 new_dir->i_size += BOGO_DIRENT_SIZE;
3099 old_dir->i_ctime = old_dir->i_mtime = 3099 old_dir->i_ctime = old_dir->i_mtime =
3100 new_dir->i_ctime = new_dir->i_mtime = 3100 new_dir->i_ctime = new_dir->i_mtime =
3101 inode->i_ctime = CURRENT_TIME; 3101 inode->i_ctime = current_time(old_dir);
3102 return 0; 3102 return 0;
3103} 3103}
3104 3104
@@ -3153,7 +3153,7 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
3153 put_page(page); 3153 put_page(page);
3154 } 3154 }
3155 dir->i_size += BOGO_DIRENT_SIZE; 3155 dir->i_size += BOGO_DIRENT_SIZE;
3156 dir->i_ctime = dir->i_mtime = CURRENT_TIME; 3156 dir->i_ctime = dir->i_mtime = current_time(dir);
3157 d_instantiate(dentry, inode); 3157 d_instantiate(dentry, inode);
3158 dget(dentry); 3158 dget(dentry);
3159 return 0; 3159 return 0;
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 84f98cbe31c3..61a504fb1ae2 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -477,7 +477,7 @@ rpc_get_inode(struct super_block *sb, umode_t mode)
477 return NULL; 477 return NULL;
478 inode->i_ino = get_next_ino(); 478 inode->i_ino = get_next_ino();
479 inode->i_mode = mode; 479 inode->i_mode = mode;
480 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 480 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
481 switch (mode & S_IFMT) { 481 switch (mode & S_IFMT) {
482 case S_IFDIR: 482 case S_IFDIR:
483 inode->i_fop = &simple_dir_operations; 483 inode->i_fop = &simple_dir_operations;
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 729e595119ed..5923d5665209 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -381,7 +381,7 @@ void __aa_fs_profile_migrate_dents(struct aa_profile *old,
381 for (i = 0; i < AAFS_PROF_SIZEOF; i++) { 381 for (i = 0; i < AAFS_PROF_SIZEOF; i++) {
382 new->dents[i] = old->dents[i]; 382 new->dents[i] = old->dents[i];
383 if (new->dents[i]) 383 if (new->dents[i])
384 new->dents[i]->d_inode->i_mtime = CURRENT_TIME; 384 new->dents[i]->d_inode->i_mtime = current_time(new->dents[i]->d_inode);
385 old->dents[i] = NULL; 385 old->dents[i] = NULL;
386 } 386 }
387} 387}
diff --git a/security/inode.c b/security/inode.c
index e3df905ab5b1..9cb979d2b013 100644
--- a/security/inode.c
+++ b/security/inode.c
@@ -117,7 +117,7 @@ struct dentry *securityfs_create_file(const char *name, umode_t mode,
117 117
118 inode->i_ino = get_next_ino(); 118 inode->i_ino = get_next_ino();
119 inode->i_mode = mode; 119 inode->i_mode = mode;
120 inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; 120 inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
121 inode->i_private = data; 121 inode->i_private = data;
122 if (is_dir) { 122 if (is_dir) {
123 inode->i_op = &simple_dir_inode_operations; 123 inode->i_op = &simple_dir_inode_operations;
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index 0765c5b053b5..72c145dd799f 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -1089,7 +1089,7 @@ static struct inode *sel_make_inode(struct super_block *sb, int mode)
1089 1089
1090 if (ret) { 1090 if (ret) {
1091 ret->i_mode = mode; 1091 ret->i_mode = mode;
1092 ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; 1092 ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
1093 } 1093 }
1094 return ret; 1094 return ret;
1095} 1095}