Merge remote-tracking branch 'ovl/rename2' into for-linus
authorAl Viro <viro@zeniv.linux.org.uk>
Tue, 11 Oct 2016 03:02:51 +0000 (23:02 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Tue, 11 Oct 2016 03:02:51 +0000 (23:02 -0400)
156 files changed:
arch/powerpc/platforms/cell/spufs/inode.c
arch/s390/hypfs/inode.c
drivers/char/sonypi.c
drivers/infiniband/hw/qib/qib_fs.c
drivers/misc/ibmasm/ibmasmfs.c
drivers/oprofile/oprofilefs.c
drivers/platform/x86/sony-laptop.c
drivers/usb/core/devio.c
drivers/usb/gadget/function/f_fs.c
drivers/usb/gadget/legacy/inode.c
fs/9p/vfs_inode.c
fs/adfs/inode.c
fs/affs/amigaffs.c
fs/affs/inode.c
fs/attr.c
fs/autofs4/inode.c
fs/autofs4/root.c
fs/bad_inode.c
fs/bfs/dir.c
fs/binfmt_misc.c
fs/btrfs/file.c
fs/btrfs/inode.c
fs/btrfs/ioctl.c
fs/btrfs/transaction.c
fs/btrfs/xattr.c
fs/ceph/file.c
fs/ceph/inode.c
fs/ceph/xattr.c
fs/cifs/file.c
fs/coda/dir.c
fs/coda/file.c
fs/coda/inode.c
fs/configfs/inode.c
fs/debugfs/inode.c
fs/devpts/inode.c
fs/efivarfs/inode.c
fs/exofs/dir.c
fs/exofs/inode.c
fs/exofs/namei.c
fs/ext2/acl.c
fs/ext2/dir.c
fs/ext2/ialloc.c
fs/ext2/inode.c
fs/ext2/ioctl.c
fs/ext2/namei.c
fs/ext2/super.c
fs/ext2/xattr.c
fs/f2fs/dir.c
fs/f2fs/file.c
fs/f2fs/inline.c
fs/f2fs/namei.c
fs/f2fs/xattr.c
fs/fat/dir.c
fs/fat/file.c
fs/fat/inode.c
fs/fat/namei_msdos.c
fs/fat/namei_vfat.c
fs/fuse/control.c
fs/fuse/dir.c
fs/gfs2/bmap.c
fs/gfs2/dir.c
fs/gfs2/inode.c
fs/gfs2/quota.c
fs/gfs2/xattr.c
fs/hfs/catalog.c
fs/hfs/dir.c
fs/hfs/inode.c
fs/hfsplus/catalog.c
fs/hfsplus/dir.c
fs/hfsplus/inode.c
fs/hfsplus/ioctl.c
fs/hugetlbfs/inode.c
fs/inode.c
fs/jffs2/acl.c
fs/jffs2/fs.c
fs/jfs/acl.c
fs/jfs/inode.c
fs/jfs/jfs_inode.c
fs/jfs/namei.c
fs/jfs/super.c
fs/jfs/xattr.c
fs/kernfs/inode.c
fs/libfs.c
fs/locks.c
fs/logfs/dir.c
fs/logfs/file.c
fs/logfs/inode.c
fs/logfs/readwrite.c
fs/minix/bitmap.c
fs/minix/dir.c
fs/minix/itree_common.c
fs/minix/namei.c
fs/nfsd/blocklayout.c
fs/nilfs2/dir.c
fs/nilfs2/inode.c
fs/nilfs2/ioctl.c
fs/nilfs2/namei.c
fs/nsfs.c
fs/ntfs/inode.c
fs/ntfs/mft.c
fs/ocfs2/acl.c
fs/ocfs2/alloc.c
fs/ocfs2/aops.c
fs/ocfs2/dir.c
fs/ocfs2/dlmfs/dlmfs.c
fs/ocfs2/file.c
fs/ocfs2/move_extents.c
fs/ocfs2/namei.c
fs/ocfs2/refcounttree.c
fs/ocfs2/xattr.c
fs/omfs/dir.c
fs/omfs/inode.c
fs/openpromfs/inode.c
fs/orangefs/file.c
fs/orangefs/inode.c
fs/orangefs/namei.c
fs/pipe.c
fs/posix_acl.c
fs/proc/base.c
fs/proc/inode.c
fs/proc/proc_sysctl.c
fs/proc/self.c
fs/proc/thread_self.c
fs/pstore/inode.c
fs/ramfs/inode.c
fs/reiserfs/inode.c
fs/reiserfs/ioctl.c
fs/reiserfs/namei.c
fs/reiserfs/stree.c
fs/reiserfs/super.c
fs/reiserfs/xattr.c
fs/reiserfs/xattr_acl.c
fs/sysv/dir.c
fs/sysv/ialloc.c
fs/sysv/itree.c
fs/sysv/namei.c
fs/tracefs/inode.c
fs/udf/ialloc.c
fs/udf/inode.c
fs/udf/namei.c
fs/ufs/dir.c
fs/ufs/ialloc.c
fs/ufs/inode.c
fs/ufs/namei.c
fs/xfs/xfs_acl.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_iops.c
fs/xfs/xfs_trans_inode.c
include/linux/fs.h
ipc/mqueue.c
kernel/bpf/inode.c
mm/shmem.c
net/sunrpc/rpc_pipe.c
security/apparmor/apparmorfs.c
security/inode.c
security/selinux/selinuxfs.c

index 2975754c65ea9514e4d7d10284a2beb42d6dd3cb..5364d4a542493880bc7b14d75c57b04cf2a5469d 100644 (file)
@@ -103,7 +103,7 @@ spufs_new_inode(struct super_block *sb, umode_t mode)
        inode->i_mode = mode;
        inode->i_uid = current_fsuid();
        inode->i_gid = current_fsgid();
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
 out:
        return inode;
 }
index 255c7eec44810420ae1b4d7608142db58fbad7e7..09bccb224d03c7fcf91a80fd44a6564e65297b4d 100644 (file)
@@ -51,7 +51,7 @@ static void hypfs_update_update(struct super_block *sb)
        struct inode *inode = d_inode(sb_info->update_file);
 
        sb_info->last_update = get_seconds();
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
 }
 
 /* directory tree removal functions */
@@ -99,7 +99,7 @@ static struct inode *hypfs_make_inode(struct super_block *sb, umode_t mode)
                ret->i_mode = mode;
                ret->i_uid = hypfs_info->uid;
                ret->i_gid = hypfs_info->gid;
-               ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
+               ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
                if (S_ISDIR(mode))
                        set_nlink(ret, 2);
        }
index e496daefe9e02fa553e4cdb2a6d77399e4bf4dee..719c5b4eed3919c3679f6347999e58d12eae1ae9 100644 (file)
@@ -934,7 +934,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf,
 
        if (ret > 0) {
                struct inode *inode = file_inode(file);
-               inode->i_atime = current_fs_time(inode->i_sb);
+               inode->i_atime = current_time(inode);
        }
 
        return ret;
index c3edc033f7c4ca674380930f958c3b6b60c0cb0f..f1e66efea98a87f1a5327cbb638c51a7688bc3cc 100644 (file)
@@ -64,7 +64,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry,
        inode->i_uid = GLOBAL_ROOT_UID;
        inode->i_gid = GLOBAL_ROOT_GID;
        inode->i_blocks = 0;
-       inode->i_atime = CURRENT_TIME;
+       inode->i_atime = current_time(inode);
        inode->i_mtime = inode->i_atime;
        inode->i_ctime = inode->i_atime;
        inode->i_private = data;
index 9c677f3f3c26023c81f93c948e0388e41e8e1a52..520f5843908023e7ae654b913f45ee9dd581751f 100644 (file)
@@ -144,7 +144,7 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode)
        if (ret) {
                ret->i_ino = get_next_ino();
                ret->i_mode = mode;
-               ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
+               ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
        }
        return ret;
 }
index a0e5260bd006df0818d4ef2bd9296b50152bf1ac..134398e0231be380c0af84e960e95b838cd2dce2 100644 (file)
@@ -30,7 +30,7 @@ static struct inode *oprofilefs_get_inode(struct super_block *sb, int mode)
        if (inode) {
                inode->i_ino = get_next_ino();
                inode->i_mode = mode;
-               inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+               inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        }
        return inode;
 }
index 1dba3598cfcbdc531f1cdde7249974f0af0d3ef0..c890a49587e45da50ff4305164dcf6cd9f6162d4 100644 (file)
@@ -4116,7 +4116,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf,
 
        if (ret > 0) {
                struct inode *inode = file_inode(file);
-               inode->i_atime = current_fs_time(inode->i_sb);
+               inode->i_atime = current_time(inode);
        }
 
        return ret;
index 09c8d9ca61aea24d7b3d6669baacd0b43b7f04f6..4016dae7433b7e43e109ee264e5d533e44c0a33a 100644 (file)
@@ -2409,21 +2409,21 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
                snoop(&dev->dev, "%s: CONTROL\n", __func__);
                ret = proc_control(ps, p);
                if (ret >= 0)
-                       inode->i_mtime = CURRENT_TIME;
+                       inode->i_mtime = current_time(inode);
                break;
 
        case USBDEVFS_BULK:
                snoop(&dev->dev, "%s: BULK\n", __func__);
                ret = proc_bulk(ps, p);
                if (ret >= 0)
-                       inode->i_mtime = CURRENT_TIME;
+                       inode->i_mtime = current_time(inode);
                break;
 
        case USBDEVFS_RESETEP:
                snoop(&dev->dev, "%s: RESETEP\n", __func__);
                ret = proc_resetep(ps, p);
                if (ret >= 0)
-                       inode->i_mtime = CURRENT_TIME;
+                       inode->i_mtime = current_time(inode);
                break;
 
        case USBDEVFS_RESET:
@@ -2435,7 +2435,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
                snoop(&dev->dev, "%s: CLEAR_HALT\n", __func__);
                ret = proc_clearhalt(ps, p);
                if (ret >= 0)
-                       inode->i_mtime = CURRENT_TIME;
+                       inode->i_mtime = current_time(inode);
                break;
 
        case USBDEVFS_GETDRIVER:
@@ -2462,7 +2462,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
                snoop(&dev->dev, "%s: SUBMITURB\n", __func__);
                ret = proc_submiturb(ps, p);
                if (ret >= 0)
-                       inode->i_mtime = CURRENT_TIME;
+                       inode->i_mtime = current_time(inode);
                break;
 
 #ifdef CONFIG_COMPAT
@@ -2470,14 +2470,14 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
                snoop(&dev->dev, "%s: CONTROL32\n", __func__);
                ret = proc_control_compat(ps, p);
                if (ret >= 0)
-                       inode->i_mtime = CURRENT_TIME;
+                       inode->i_mtime = current_time(inode);
                break;
 
        case USBDEVFS_BULK32:
                snoop(&dev->dev, "%s: BULK32\n", __func__);
                ret = proc_bulk_compat(ps, p);
                if (ret >= 0)
-                       inode->i_mtime = CURRENT_TIME;
+                       inode->i_mtime = current_time(inode);
                break;
 
        case USBDEVFS_DISCSIGNAL32:
@@ -2489,7 +2489,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
                snoop(&dev->dev, "%s: SUBMITURB32\n", __func__);
                ret = proc_submiturb_compat(ps, p);
                if (ret >= 0)
-                       inode->i_mtime = CURRENT_TIME;
+                       inode->i_mtime = current_time(inode);
                break;
 
        case USBDEVFS_IOCTL32:
@@ -2552,7 +2552,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd,
  done:
        usb_unlock_device(dev);
        if (ret >= 0)
-               inode->i_atime = CURRENT_TIME;
+               inode->i_atime = current_time(inode);
        return ret;
 }
 
index 5c8429f23a892782febdb3c650efa8c168705227..2f3fa4dde6951865ea4790cfb07b7260843b2e26 100644 (file)
@@ -1193,15 +1193,15 @@ ffs_sb_make_inode(struct super_block *sb, void *data,
        inode = new_inode(sb);
 
        if (likely(inode)) {
-               struct timespec current_time = CURRENT_TIME;
+               struct timespec ts = current_time(inode);
 
                inode->i_ino     = get_next_ino();
                inode->i_mode    = perms->mode;
                inode->i_uid     = perms->uid;
                inode->i_gid     = perms->gid;
-               inode->i_atime   = current_time;
-               inode->i_mtime   = current_time;
-               inode->i_ctime   = current_time;
+               inode->i_atime   = ts;
+               inode->i_mtime   = ts;
+               inode->i_ctime   = ts;
                inode->i_private = data;
                if (fops)
                        inode->i_fop = fops;
index 16104b5ebdcb73962edc506c5c5cb3e4c7b78108..bd82dd12deffd25aa9ae8528d60a898bdfa7551b 100644 (file)
@@ -1913,7 +1913,7 @@ gadgetfs_make_inode (struct super_block *sb,
                inode->i_uid = make_kuid(&init_user_ns, default_uid);
                inode->i_gid = make_kgid(&init_user_ns, default_gid);
                inode->i_atime = inode->i_mtime = inode->i_ctime
-                               = CURRENT_TIME;
+                               = current_time(inode);
                inode->i_private = data;
                inode->i_fop = fops;
        }
index 0ad3c6c712b80f562541f6769f1ed6a47592c9a7..8bea369a29367f02ef654710d258e0c3fb6eee89 100644 (file)
@@ -276,7 +276,7 @@ int v9fs_init_inode(struct v9fs_session_info *v9ses,
        inode_init_owner(inode, NULL, mode);
        inode->i_blocks = 0;
        inode->i_rdev = rdev;
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        inode->i_mapping->a_ops = &v9fs_addr_operations;
 
        switch (mode & S_IFMT) {
index 335055d828e45d082f24558ac5b1c155dac1fefb..860f3ec90c22f76c71f08c5756c17c265818f969 100644 (file)
@@ -199,7 +199,7 @@ adfs_adfs2unix_time(struct timespec *tv, struct inode *inode)
        return;
 
  cur_time:
-       *tv = CURRENT_TIME;
+       *tv = current_time(inode);
        return;
 
  too_early:
index d8f217c711d37ed8e07622f3c16b372da87d0c41..0ec65c133b93408408c21d70c66887567390d470 100644 (file)
@@ -58,7 +58,7 @@ affs_insert_hash(struct inode *dir, struct buffer_head *bh)
        mark_buffer_dirty_inode(dir_bh, dir);
        affs_brelse(dir_bh);
 
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        dir->i_version++;
        mark_inode_dirty(dir);
 
@@ -112,7 +112,7 @@ affs_remove_hash(struct inode *dir, struct buffer_head *rem_bh)
 
        affs_brelse(bh);
 
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        dir->i_version++;
        mark_inode_dirty(dir);
 
@@ -313,7 +313,7 @@ affs_remove_header(struct dentry *dentry)
        else
                clear_nlink(inode);
        affs_unlock_link(inode);
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
 
 done:
index 0fdb0f5b2239df24b69363a7449a7a7ff360003c..ed120ec7542ce5366b84d548d0dc59873690f25b 100644 (file)
@@ -309,7 +309,7 @@ affs_new_inode(struct inode *dir)
        inode->i_gid     = current_fsgid();
        inode->i_ino     = block;
        set_nlink(inode, 1);
-       inode->i_mtime   = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime   = inode->i_atime = inode->i_ctime = current_time(inode);
        atomic_set(&AFFS_I(inode)->i_opencnt, 0);
        AFFS_I(inode)->i_blkcnt = 0;
        AFFS_I(inode)->i_lc = NULL;
index 42bb42bb3c72c206923294a3f08f0020df6c5a43..236d113002160c9eb2178f6d67cc21e866d140c2 100644 (file)
--- a/fs/attr.c
+++ b/fs/attr.c
@@ -209,7 +209,7 @@ int notify_change(struct dentry * dentry, struct iattr * attr, struct inode **de
                        inode->i_flags &= ~S_NOSEC;
        }
 
-       now = current_fs_time(inode->i_sb);
+       now = current_time(inode);
 
        attr->ia_ctime = now;
        if (!(ia_valid & ATTR_ATIME_SET))
index 61b21051bd5ad9322a58ef1caa7cccc09d25ba2b..ca9cbd6362e00144d0d3f2b59c9bbd85933e663e 100644 (file)
@@ -359,7 +359,7 @@ struct inode *autofs4_get_inode(struct super_block *sb, umode_t mode)
                inode->i_uid = d_inode(sb->s_root)->i_uid;
                inode->i_gid = d_inode(sb->s_root)->i_gid;
        }
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        inode->i_ino = get_next_ino();
 
        if (S_ISDIR(mode)) {
index fa84bb8832e0baefc79c07759e9f7f518e023988..623510e84c968c8e8cc2f34c23d1b897f75246b7 100644 (file)
@@ -591,7 +591,7 @@ static int autofs4_dir_symlink(struct inode *dir,
        if (p_ino && !IS_ROOT(dentry))
                atomic_inc(&p_ino->count);
 
-       dir->i_mtime = CURRENT_TIME;
+       dir->i_mtime = current_time(dir);
 
        return 0;
 }
@@ -631,7 +631,7 @@ static int autofs4_dir_unlink(struct inode *dir, struct dentry *dentry)
        d_inode(dentry)->i_size = 0;
        clear_nlink(d_inode(dentry));
 
-       dir->i_mtime = CURRENT_TIME;
+       dir->i_mtime = current_time(dir);
 
        spin_lock(&sbi->lookup_lock);
        __autofs4_add_expiring(dentry);
@@ -762,7 +762,7 @@ static int autofs4_dir_mkdir(struct inode *dir,
        if (p_ino && !IS_ROOT(dentry))
                atomic_inc(&p_ino->count);
        inc_nlink(dir);
-       dir->i_mtime = CURRENT_TIME;
+       dir->i_mtime = current_time(dir);
 
        return 0;
 }
index 536d2a3872671c007932e05d76feb0dab43c4686..9fc451e9f9879404d0506bc564b855cecf9be458 100644 (file)
@@ -173,7 +173,7 @@ void make_bad_inode(struct inode *inode)
 
        inode->i_mode = S_IFREG;
        inode->i_atime = inode->i_mtime = inode->i_ctime =
-               current_fs_time(inode->i_sb);
+               current_time(inode);
        inode->i_op = &bad_inode_ops;   
        inode->i_fop = &bad_file_ops;   
 }
index 5e3369f7cd9d67438a4e1ea19e6e6acbf9512412..3e5ac30e8b6fa705ccbb09eaf980626217e1c7cb 100644 (file)
@@ -97,7 +97,7 @@ static int bfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
        set_bit(ino, info->si_imap);
        info->si_freei--;
        inode_init_owner(inode, dir, mode);
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        inode->i_blocks = 0;
        inode->i_op = &bfs_file_inops;
        inode->i_fop = &bfs_file_operations;
@@ -165,7 +165,7 @@ static int bfs_link(struct dentry *old, struct inode *dir,
                return err;
        }
        inc_nlink(inode);
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
        ihold(inode);
        d_instantiate(new, inode);
@@ -194,7 +194,7 @@ static int bfs_unlink(struct inode *dir, struct dentry *dentry)
        }
        de->ino = 0;
        mark_buffer_dirty_inode(bh, dir);
-       dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
+       dir->i_ctime = dir->i_mtime = current_time(dir);
        mark_inode_dirty(dir);
        inode->i_ctime = dir->i_ctime;
        inode_dec_link_count(inode);
@@ -253,10 +253,10 @@ static int bfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                        goto end_rename;
        }
        old_de->ino = 0;
-       old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
+       old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir);
        mark_inode_dirty(old_dir);
        if (new_inode) {
-               new_inode->i_ctime = CURRENT_TIME_SEC;
+               new_inode->i_ctime = current_time(new_inode);
                inode_dec_link_count(new_inode);
        }
        mark_buffer_dirty_inode(old_bh, old_dir);
@@ -304,9 +304,9 @@ static int bfs_add_entry(struct inode *dir, const unsigned char *name,
                                pos = (block - sblock) * BFS_BSIZE + off;
                                if (pos >= dir->i_size) {
                                        dir->i_size += BFS_DIRENT_SIZE;
-                                       dir->i_ctime = CURRENT_TIME_SEC;
+                                       dir->i_ctime = current_time(dir);
                                }
-                               dir->i_mtime = CURRENT_TIME_SEC;
+                               dir->i_mtime = current_time(dir);
                                mark_inode_dirty(dir);
                                de->ino = cpu_to_le16((u16)ino);
                                for (i = 0; i < BFS_NAMELEN; i++)
index 6103a6362ccd1ad711117226879e65c6bac9c87f..9b4688ab1d8e0f1e00b118912ec7a78def04818f 100644 (file)
@@ -584,7 +584,7 @@ static struct inode *bm_get_inode(struct super_block *sb, int mode)
                inode->i_ino = get_next_ino();
                inode->i_mode = mode;
                inode->i_atime = inode->i_mtime = inode->i_ctime =
-                       current_fs_time(inode->i_sb);
+                       current_time(inode);
        }
        return inode;
 }
index fea31a4a6e36844d97a53c80a7f442c166e82b60..dad53ce54d91e4b67cc65aedbd0a28cae9736d7c 100644 (file)
@@ -1757,7 +1757,7 @@ static void update_time_for_write(struct inode *inode)
        if (IS_NOCMTIME(inode))
                return;
 
-       now = current_fs_time(inode->i_sb);
+       now = current_time(inode);
        if (!timespec_equal(&inode->i_mtime, &now))
                inode->i_mtime = now;
 
@@ -2578,7 +2578,7 @@ out_trans:
                goto out_free;
 
        inode_inc_iversion(inode);
-       inode->i_mtime = inode->i_ctime = current_fs_time(inode->i_sb);
+       inode->i_mtime = inode->i_ctime = current_time(inode);
 
        trans->block_rsv = &root->fs_info->trans_block_rsv;
        ret = btrfs_update_inode(trans, root, inode);
@@ -2842,7 +2842,7 @@ static long btrfs_fallocate(struct file *file, int mode,
                if (IS_ERR(trans)) {
                        ret = PTR_ERR(trans);
                } else {
-                       inode->i_ctime = current_fs_time(inode->i_sb);
+                       inode->i_ctime = current_time(inode);
                        i_size_write(inode, actual_end);
                        btrfs_ordered_update_i_size(inode, actual_end, NULL);
                        ret = btrfs_update_inode(trans, root, inode);
index c666020915278bbdaeabe0f09bdf05c2994863b2..a240270dc0452f09fb9e2a90e4684411c408319b 100644 (file)
@@ -4059,7 +4059,7 @@ err:
        inode_inc_iversion(inode);
        inode_inc_iversion(dir);
        inode->i_ctime = dir->i_mtime =
-               dir->i_ctime = current_fs_time(inode->i_sb);
+               dir->i_ctime = current_time(inode);
        ret = btrfs_update_inode(trans, root, dir);
 out:
        return ret;
@@ -4202,7 +4202,7 @@ int btrfs_unlink_subvol(struct btrfs_trans_handle *trans,
 
        btrfs_i_size_write(dir, dir->i_size - name_len * 2);
        inode_inc_iversion(dir);
-       dir->i_mtime = dir->i_ctime = current_fs_time(dir->i_sb);
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        ret = btrfs_update_inode_fallback(trans, root, dir);
        if (ret)
                btrfs_abort_transaction(trans, ret);
@@ -4965,7 +4965,7 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr)
                inode_inc_iversion(inode);
                if (!(mask & (ATTR_CTIME | ATTR_MTIME)))
                        inode->i_ctime = inode->i_mtime =
-                               current_fs_time(inode->i_sb);
+                               current_time(inode);
        }
 
        if (newsize > oldsize) {
@@ -5672,7 +5672,7 @@ static struct inode *new_simple_dir(struct super_block *s,
        inode->i_op = &btrfs_dir_ro_inode_operations;
        inode->i_fop = &simple_dir_operations;
        inode->i_mode = S_IFDIR | S_IRUGO | S_IWUSR | S_IXUGO;
-       inode->i_mtime = current_fs_time(inode->i_sb);
+       inode->i_mtime = current_time(inode);
        inode->i_atime = inode->i_mtime;
        inode->i_ctime = inode->i_mtime;
        BTRFS_I(inode)->i_otime = inode->i_mtime;
@@ -6258,7 +6258,7 @@ static struct inode *btrfs_new_inode(struct btrfs_trans_handle *trans,
        inode_init_owner(inode, dir, mode);
        inode_set_bytes(inode, 0);
 
-       inode->i_mtime = current_fs_time(inode->i_sb);
+       inode->i_mtime = current_time(inode);
        inode->i_atime = inode->i_mtime;
        inode->i_ctime = inode->i_mtime;
        BTRFS_I(inode)->i_otime = inode->i_mtime;
@@ -6372,7 +6372,7 @@ int btrfs_add_link(struct btrfs_trans_handle *trans,
                           name_len * 2);
        inode_inc_iversion(parent_inode);
        parent_inode->i_mtime = parent_inode->i_ctime =
-               current_fs_time(parent_inode->i_sb);
+               current_time(parent_inode);
        ret = btrfs_update_inode(trans, root, parent_inode);
        if (ret)
                btrfs_abort_transaction(trans, ret);
@@ -6590,7 +6590,7 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir,
        BTRFS_I(inode)->dir_index = 0ULL;
        inc_nlink(inode);
        inode_inc_iversion(inode);
-       inode->i_ctime = current_fs_time(inode->i_sb);
+       inode->i_ctime = current_time(inode);
        ihold(inode);
        set_bit(BTRFS_INODE_COPY_EVERYTHING, &BTRFS_I(inode)->runtime_flags);
 
@@ -9492,7 +9492,7 @@ static int btrfs_rename_exchange(struct inode *old_dir,
        struct btrfs_root *dest = BTRFS_I(new_dir)->root;
        struct inode *new_inode = new_dentry->d_inode;
        struct inode *old_inode = old_dentry->d_inode;
-       struct timespec ctime = CURRENT_TIME;
+       struct timespec ctime = current_time(old_inode);
        struct dentry *parent;
        u64 old_ino = btrfs_ino(old_inode);
        u64 new_ino = btrfs_ino(new_inode);
@@ -9860,7 +9860,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        inode_inc_iversion(old_inode);
        old_dir->i_ctime = old_dir->i_mtime =
        new_dir->i_ctime = new_dir->i_mtime =
-       old_inode->i_ctime = current_fs_time(old_dir->i_sb);
+       old_inode->i_ctime = current_time(old_dir);
 
        if (old_dentry->d_parent != new_dentry->d_parent)
                btrfs_record_unlink_dir(trans, old_dir, old_inode, 1);
@@ -9885,7 +9885,7 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 
        if (new_inode) {
                inode_inc_iversion(new_inode);
-               new_inode->i_ctime = current_fs_time(new_inode->i_sb);
+               new_inode->i_ctime = current_time(new_inode);
                if (unlikely(btrfs_ino(new_inode) ==
                             BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)) {
                        root_objectid = BTRFS_I(new_inode)->location.objectid;
@@ -10403,7 +10403,7 @@ next:
                *alloc_hint = ins.objectid + ins.offset;
 
                inode_inc_iversion(inode);
-               inode->i_ctime = current_fs_time(inode->i_sb);
+               inode->i_ctime = current_time(inode);
                BTRFS_I(inode)->flags |= BTRFS_INODE_PREALLOC;
                if (!(mode & FALLOC_FL_KEEP_SIZE) &&
                    (actual_len > inode->i_size) &&
index 7fd939bfbd99359b3ffab8b9689d8fdd2b313aeb..b182197f70910b4e7c867c2a56f9e232063e88fa 100644 (file)
@@ -349,7 +349,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
 
        btrfs_update_iflags(inode);
        inode_inc_iversion(inode);
-       inode->i_ctime = current_fs_time(inode->i_sb);
+       inode->i_ctime = current_time(inode);
        ret = btrfs_update_inode(trans, root, inode);
 
        btrfs_end_transaction(trans, root);
@@ -445,7 +445,7 @@ static noinline int create_subvol(struct inode *dir,
        struct btrfs_root *root = BTRFS_I(dir)->root;
        struct btrfs_root *new_root;
        struct btrfs_block_rsv block_rsv;
-       struct timespec cur_time = current_fs_time(dir->i_sb);
+       struct timespec cur_time = current_time(dir);
        struct inode *inode;
        int ret;
        int err;
@@ -3291,7 +3291,7 @@ static int clone_finish_inode_update(struct btrfs_trans_handle *trans,
 
        inode_inc_iversion(inode);
        if (!no_time_update)
-               inode->i_mtime = inode->i_ctime = current_fs_time(inode->i_sb);
+               inode->i_mtime = inode->i_ctime = current_time(inode);
        /*
         * We round up to the block size at eof when determining which
         * extents to clone above, but shouldn't round up the file size.
@@ -5106,7 +5106,7 @@ static long _btrfs_ioctl_set_received_subvol(struct file *file,
        struct btrfs_root *root = BTRFS_I(inode)->root;
        struct btrfs_root_item *root_item = &root->root_item;
        struct btrfs_trans_handle *trans;
-       struct timespec ct = current_fs_time(inode->i_sb);
+       struct timespec ct = current_time(inode);
        int ret = 0;
        int received_uuid_changed;
 
index 95d41919d034ef69647b6983dfac27f87f17e130..c294313ea2c8be7421464cb480d387c2bef2df2e 100644 (file)
@@ -1474,7 +1474,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
        parent_root = BTRFS_I(parent_inode)->root;
        record_root_in_trans(trans, parent_root, 0);
 
-       cur_time = current_fs_time(parent_inode->i_sb);
+       cur_time = current_time(parent_inode);
 
        /*
         * insert the directory item
@@ -1630,7 +1630,7 @@ static noinline int create_pending_snapshot(struct btrfs_trans_handle *trans,
        btrfs_i_size_write(parent_inode, parent_inode->i_size +
                                         dentry->d_name.len * 2);
        parent_inode->i_mtime = parent_inode->i_ctime =
-               current_fs_time(parent_inode->i_sb);
+               current_time(parent_inode);
        ret = btrfs_update_inode_fallback(trans, parent_root, parent_inode);
        if (ret) {
                btrfs_abort_transaction(trans, ret);
index d1a177a3dbe89e29f0d9356b765549334d829d64..fccbf5567e786f12a9f62ff1aca5c2e3dbb0661a 100644 (file)
@@ -252,7 +252,7 @@ int __btrfs_setxattr(struct btrfs_trans_handle *trans,
                goto out;
 
        inode_inc_iversion(inode);
-       inode->i_ctime = current_fs_time(inode->i_sb);
+       inode->i_ctime = current_time(inode);
        set_bit(BTRFS_INODE_COPY_EVERYTHING, &BTRFS_I(inode)->runtime_flags);
        ret = btrfs_update_inode(trans, root, inode);
        BUG_ON(ret);
index 0f5375d8e030591eed3a7b71b3fe712f53e729d1..a37a343fbd0fae0e9983f10a03e756112ff12958 100644 (file)
@@ -886,7 +886,7 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter,
        int num_pages = 0;
        int flags;
        int ret;
-       struct timespec mtime = current_fs_time(inode->i_sb);
+       struct timespec mtime = current_time(inode);
        size_t count = iov_iter_count(iter);
        loff_t pos = iocb->ki_pos;
        bool write = iov_iter_rw(iter) == WRITE;
@@ -1091,7 +1091,7 @@ ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos,
        int flags;
        int check_caps = 0;
        int ret;
-       struct timespec mtime = current_fs_time(inode->i_sb);
+       struct timespec mtime = current_time(inode);
        size_t count = iov_iter_count(from);
 
        if (ceph_snap(file_inode(file)) != CEPH_NOSNAP)
index dd3a6dbf71ebcd8903ca6a04b2ba91fa24893baa..ca1ccf74177122851c2929c7818411ca44ba49fd 100644 (file)
@@ -2080,7 +2080,7 @@ int __ceph_setattr(struct inode *inode, struct iattr *attr)
        if (dirtied) {
                inode_dirty_flags = __ceph_mark_dirty_caps(ci, dirtied,
                                                           &prealloc_cf);
-               inode->i_ctime = current_fs_time(inode->i_sb);
+               inode->i_ctime = current_time(inode);
        }
 
        release &= issued;
index adc231892b0d5ce86bffa854d9ff789386ab1999..40b703217977df467aa4b0c4cdc2ffd68423bd30 100644 (file)
@@ -1034,7 +1034,7 @@ retry:
                dirty = __ceph_mark_dirty_caps(ci, CEPH_CAP_XATTR_EXCL,
                                               &prealloc_cf);
                ci->i_xattrs.dirty = true;
-               inode->i_ctime = current_fs_time(inode->i_sb);
+               inode->i_ctime = current_time(inode);
        }
 
        spin_unlock(&ci->i_ceph_lock);
index 579e41b350a2df88e13de9e5d39abbff4ae6aa95..00b6bf08cdba77883b5fcebf041c868bd9826bcc 100644 (file)
@@ -1878,7 +1878,7 @@ static int cifs_partialpagewrite(struct page *page, unsigned from, unsigned to)
                                           write_data, to - from, &offset);
                cifsFileInfo_put(open_file);
                /* Does mm or vfs already set times? */
-               inode->i_atime = inode->i_mtime = current_fs_time(inode->i_sb);
+               inode->i_atime = inode->i_mtime = current_time(inode);
                if ((bytes_written > 0) && (offset))
                        rc = 0;
                else if (bytes_written < 0)
@@ -3571,7 +3571,7 @@ static int cifs_readpage_worker(struct file *file, struct page *page,
                cifs_dbg(FYI, "Bytes read %d\n", rc);
 
        file_inode(file)->i_atime =
-               current_fs_time(file_inode(file)->i_sb);
+               current_time(file_inode(file));
 
        if (PAGE_SIZE > rc)
                memset(read_data + rc, 0, PAGE_SIZE - rc);
index 82aceaef8e4eda2648644a8b784139f0883282b9..c0474ac6cbf200eb458eaf5e3f2359e9b0edfcab 100644 (file)
@@ -109,7 +109,7 @@ static inline void coda_dir_update_mtime(struct inode *dir)
        /* optimistically we can also act as if our nose bleeds. The
         * granularity of the mtime is coarse anyways so we might actually be
         * right most of the time. Note: we only do this for directories. */
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
 #endif
 }
 
index f47c7483863b5ae55b1160de0f059ec23b3d4cb3..42be8a6f11054936c3fe08393c2f3cb577930f06 100644 (file)
@@ -75,7 +75,7 @@ coda_file_write_iter(struct kiocb *iocb, struct iov_iter *to)
        ret = vfs_iter_write(cfi->cfi_container, to, &iocb->ki_pos);
        coda_inode->i_size = file_inode(host_file)->i_size;
        coda_inode->i_blocks = (coda_inode->i_size + 511) >> 9;
-       coda_inode->i_mtime = coda_inode->i_ctime = CURRENT_TIME_SEC;
+       coda_inode->i_mtime = coda_inode->i_ctime = current_time(coda_inode);
        inode_unlock(coda_inode);
        file_end_write(host_file);
        return ret;
index 57e81cbba0fa56134e53c4396afb6f27fb943fbe..71dbe7e287cef964955edad9be066966f129db29 100644 (file)
@@ -271,7 +271,7 @@ int coda_setattr(struct dentry *de, struct iattr *iattr)
 
        memset(&vattr, 0, sizeof(vattr)); 
 
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        coda_iattr_to_vattr(iattr, &vattr);
        vattr.va_type = C_VNON; /* cannot set type */
 
index 0387968e6f475e35426b3e241c17a14de44665f3..ad718e5e37bb6415e3a8de5f5d7c98e31c90a425 100644 (file)
@@ -76,7 +76,7 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr)
                sd_iattr->ia_uid = GLOBAL_ROOT_UID;
                sd_iattr->ia_gid = GLOBAL_ROOT_GID;
                sd_iattr->ia_atime = sd_iattr->ia_mtime =
-                       sd_iattr->ia_ctime = current_fs_time(inode->i_sb);
+                       sd_iattr->ia_ctime = current_time(inode);
                sd->s_iattr = sd_iattr;
        }
        /* attributes were changed atleast once in past */
@@ -113,7 +113,7 @@ static inline void set_default_inode_attr(struct inode * inode, umode_t mode)
 {
        inode->i_mode = mode;
        inode->i_atime = inode->i_mtime =
-               inode->i_ctime = current_fs_time(inode->i_sb);
+               inode->i_ctime = current_time(inode);
 }
 
 static inline void set_inode_attr(struct inode * inode, struct iattr * iattr)
@@ -197,7 +197,7 @@ int configfs_create(struct dentry * dentry, umode_t mode, void (*init)(struct in
                return -ENOMEM;
 
        p_inode = d_inode(dentry->d_parent);
-       p_inode->i_mtime = p_inode->i_ctime = current_fs_time(p_inode->i_sb);
+       p_inode->i_mtime = p_inode->i_ctime = current_time(p_inode);
        configfs_set_inode_lock_class(sd, inode);
 
        init(inode);
index 5ac27c9de66997e0f550f7969c20be2492f01218..f17fcf89e18eb077ca4231c344327852ea3b156f 100644 (file)
@@ -45,7 +45,7 @@ static struct inode *debugfs_get_inode(struct super_block *sb)
        if (inode) {
                inode->i_ino = get_next_ino();
                inode->i_atime = inode->i_mtime =
-                       inode->i_ctime = current_fs_time(sb);
+                       inode->i_ctime = current_time(inode);
        }
        return inode;
 }
index 79a5941c2474622d7888c8e8c3bc925eabdb77e1..9156c91def48493b8252874f5b27d2232f8fcecb 100644 (file)
@@ -305,7 +305,7 @@ static int mknod_ptmx(struct super_block *sb)
        }
 
        inode->i_ino = 2;
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
 
        mode = S_IFCHR|opts->ptmxmode;
        init_special_inode(inode, mode, MKDEV(TTYAUX_MAJOR, 2));
@@ -411,7 +411,7 @@ devpts_fill_super(struct super_block *s, void *data, int silent)
        if (!inode)
                goto fail;
        inode->i_ino = 1;
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
        inode->i_op = &simple_dir_inode_operations;
        inode->i_fop = &simple_dir_operations;
@@ -559,7 +559,7 @@ struct dentry *devpts_pty_new(struct pts_fs_info *fsi, int index, void *priv)
        inode->i_ino = index + 3;
        inode->i_uid = opts->setuid ? opts->uid : current_fsuid();
        inode->i_gid = opts->setgid ? opts->gid : current_fsgid();
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        init_special_inode(inode, S_IFCHR|opts->mode, MKDEV(UNIX98_PTY_SLAVE_MAJOR, index));
 
        sprintf(s, "%d", index);
index 1d73fc6dba13bc49fe9bdefefd0370a27ff0f86e..be5a33691f69d5b64c96db9ad0f35439223b19df 100644 (file)
@@ -24,7 +24,7 @@ struct inode *efivarfs_get_inode(struct super_block *sb,
        if (inode) {
                inode->i_ino = get_next_ino();
                inode->i_mode = mode;
-               inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+               inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
                inode->i_flags = is_removable ? 0 : S_IMMUTABLE;
                switch (mode & S_IFMT) {
                case S_IFREG:
index f69a1b5826a5c70975a8ebbc4520a143d0ba188c..79101651fe9ed2a6ccb3682ba39c590755b5bb00 100644 (file)
@@ -416,7 +416,7 @@ int exofs_set_link(struct inode *dir, struct exofs_dir_entry *de,
        if (likely(!err))
                err = exofs_commit_chunk(page, pos, len);
        exofs_put_page(page);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        mark_inode_dirty(dir);
        return err;
 }
@@ -503,7 +503,7 @@ got_it:
        de->inode_no = cpu_to_le64(inode->i_ino);
        exofs_set_de_type(de, inode);
        err = exofs_commit_chunk(page, pos, rec_len);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        mark_inode_dirty(dir);
        sbi->s_numfiles++;
 
@@ -554,7 +554,7 @@ int exofs_delete_entry(struct exofs_dir_entry *dir, struct page *page)
        dir->inode_no = 0;
        if (likely(!err))
                err = exofs_commit_chunk(page, pos, to - from);
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
        mark_inode_dirty(inode);
        sbi->s_numfiles--;
 out:
index 9dc4c6dbf3c99f012cb965e1aaba357fff6ce194..4327f71d302dba690635f6c0cc072a90debf1258 100644 (file)
@@ -1007,7 +1007,7 @@ static int _do_truncate(struct inode *inode, loff_t newsize)
        struct exofs_sb_info *sbi = inode->i_sb->s_fs_info;
        int ret;
 
-       inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_ctime = current_time(inode);
 
        ret = ore_truncate(&sbi->layout, &oi->oc, (u64)newsize);
        if (likely(!ret))
@@ -1313,7 +1313,7 @@ struct inode *exofs_new_inode(struct inode *dir, umode_t mode)
        inode_init_owner(inode, dir, mode);
        inode->i_ino = sbi->s_nextid++;
        inode->i_blkbits = EXOFS_BLKSHIFT;
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        oi->i_commit_size = inode->i_size = 0;
        spin_lock(&sbi->s_next_gen_lock);
        inode->i_generation = sbi->s_next_generation++;
index 53d838200cc99e6787b40a55b81ee2619fd91d25..7295cd7227700ee9f4356f03805ba839dab551ce 100644 (file)
@@ -142,7 +142,7 @@ static int exofs_link(struct dentry *old_dentry, struct inode *dir,
 {
        struct inode *inode = d_inode(old_dentry);
 
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
        inode_inc_link_count(inode);
        ihold(inode);
 
@@ -265,7 +265,7 @@ static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry,
                if (!new_de)
                        goto out_dir;
                err = exofs_set_link(new_dir, new_de, new_page, old_inode);
-               new_inode->i_ctime = CURRENT_TIME;
+               new_inode->i_ctime = current_time(new_inode);
                if (dir_de)
                        drop_nlink(new_inode);
                inode_dec_link_count(new_inode);
@@ -279,7 +279,7 @@ static int exofs_rename(struct inode *old_dir, struct dentry *old_dentry,
                        inode_inc_link_count(new_dir);
        }
 
-       old_inode->i_ctime = CURRENT_TIME;
+       old_inode->i_ctime = current_time(old_inode);
 
        exofs_delete_entry(old_de, old_page);
        mark_inode_dirty(old_inode);
index 42f1d1814083c568cff9b6daf181d96da1ac5420..80c1e579428a4d556aa8d39e59560fd6a33206e7 100644 (file)
@@ -194,7 +194,7 @@ ext2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
                                if (error < 0)
                                        return error;
                                else {
-                                       inode->i_ctime = CURRENT_TIME_SEC;
+                                       inode->i_ctime = current_time(inode);
                                        mark_inode_dirty(inode);
                                        if (error == 0)
                                                acl = NULL;
index 61ad490ed67b9837db3049b09ecfff009572852d..d9650c9508e4de549788e85210039b36032ec5a0 100644 (file)
@@ -471,7 +471,7 @@ void ext2_set_link(struct inode *dir, struct ext2_dir_entry_2 *de,
        err = ext2_commit_chunk(page, pos, len);
        ext2_put_page(page);
        if (update_times)
-               dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+               dir->i_mtime = dir->i_ctime = current_time(dir);
        EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL;
        mark_inode_dirty(dir);
 }
@@ -561,7 +561,7 @@ got_it:
        de->inode = cpu_to_le32(inode->i_ino);
        ext2_set_de_type (de, inode);
        err = ext2_commit_chunk(page, pos, rec_len);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL;
        mark_inode_dirty(dir);
        /* OFFSET_CACHE */
@@ -610,7 +610,7 @@ int ext2_delete_entry (struct ext2_dir_entry_2 * dir, struct page * page )
                pde->rec_len = ext2_rec_len_to_disk(to - from);
        dir->inode = 0;
        err = ext2_commit_chunk(page, pos, to - from);
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
        EXT2_I(inode)->i_flags &= ~EXT2_BTREE_FL;
        mark_inode_dirty(inode);
 out:
index efe5fb21c5332197e9bb4ebe302fa408d3be5e38..43dc9c54335cc658f780ccb08706921fa8575471 100644 (file)
@@ -551,7 +551,7 @@ got:
 
        inode->i_ino = ino;
        inode->i_blocks = 0;
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        memset(ei->i_data, 0, sizeof(ei->i_data));
        ei->i_flags =
                ext2_mask_flags(mode, EXT2_I(dir)->i_flags & EXT2_FL_INHERITED);
index d5c7d09919f318066c1be57cf446624875ba229a..b66a6585a521e6cd60fdd8eb9fc470ed08e444fe 100644 (file)
@@ -594,7 +594,7 @@ static void ext2_splice_branch(struct inode *inode,
        if (where->bh)
                mark_buffer_dirty_inode(where->bh, inode);
 
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
 }
 
@@ -1236,7 +1236,7 @@ static int ext2_setsize(struct inode *inode, loff_t newsize)
        __ext2_truncate_blocks(inode, newsize);
        dax_sem_up_write(EXT2_I(inode));
 
-       inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_ctime = current_time(inode);
        if (inode_needs_sync(inode)) {
                sync_mapping_buffers(inode->i_mapping);
                sync_inode_metadata(inode, 1);
index b386af2e45f41fda4f965eafa5751ab10dc48bc3..9d617423e93660344c1f8c12363f4b82284b08e3 100644 (file)
@@ -79,7 +79,7 @@ long ext2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
                ei->i_flags = flags;
 
                ext2_set_inode_flags(inode);
-               inode->i_ctime = CURRENT_TIME_SEC;
+               inode->i_ctime = current_time(inode);
                inode_unlock(inode);
 
                mark_inode_dirty(inode);
@@ -103,7 +103,7 @@ setflags_out:
                }
 
                inode_lock(inode);
-               inode->i_ctime = CURRENT_TIME_SEC;
+               inode->i_ctime = current_time(inode);
                inode->i_generation = generation;
                inode_unlock(inode);
 
index be32e20a2b8863a19e48d9ddac2dd2a14354bb00..7d66b2012e939059577c0351c6325fc1926c8d23 100644 (file)
@@ -221,7 +221,7 @@ static int ext2_link (struct dentry * old_dentry, struct inode * dir,
        if (err)
                return err;
 
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        inode_inc_link_count(inode);
        ihold(inode);
 
@@ -376,7 +376,7 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry,
                if (!new_de)
                        goto out_dir;
                ext2_set_link(new_dir, new_de, new_page, old_inode, 1);
-               new_inode->i_ctime = CURRENT_TIME_SEC;
+               new_inode->i_ctime = current_time(new_inode);
                if (dir_de)
                        drop_nlink(new_inode);
                inode_dec_link_count(new_inode);
@@ -392,7 +392,7 @@ static int ext2_rename (struct inode * old_dir, struct dentry * old_dentry,
         * Like most other Unix systems, set the ctime for inodes on a
         * rename.
         */
-       old_inode->i_ctime = CURRENT_TIME_SEC;
+       old_inode->i_ctime = current_time(old_inode);
        mark_inode_dirty(old_inode);
 
        ext2_delete_entry (old_de, old_page);
index 1d9379568aa833b1fdd48a8ff112d343e3a7f773..6cb042b53b5ba671b1027973d690d9aac9b78cc3 100644 (file)
@@ -1543,7 +1543,7 @@ out:
        if (inode->i_size < off+len-towrite)
                i_size_write(inode, off+len-towrite);
        inode->i_version++;
-       inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
        return len - towrite;
 }
index b7f896f3f7a7fb83160ee049f2c119908668cb64..fbdb8f17189366ede18ba20754d4db30c7e867b9 100644 (file)
@@ -691,7 +691,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
 
        /* Update the inode. */
        EXT2_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        if (IS_SYNC(inode)) {
                error = sync_inode_metadata(inode, 1);
                /* In case sync failed due to ENOSPC the inode was actually
index 9054aeac80152ba952eb2f362d3bb106280b115e..8e5309c532df2660a111d442753df6c28a4a5540 100644 (file)
@@ -299,7 +299,7 @@ void f2fs_set_link(struct inode *dir, struct f2fs_dir_entry *de,
        f2fs_dentry_kunmap(dir, page);
        set_page_dirty(page);
 
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        f2fs_mark_inode_dirty_sync(dir);
        f2fs_put_page(page, 1);
 }
@@ -451,7 +451,7 @@ void update_parent_metadata(struct inode *dir, struct inode *inode,
                        f2fs_i_links_write(dir, true);
                clear_inode_flag(inode, FI_NEW_INODE);
        }
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        f2fs_mark_inode_dirty_sync(dir);
 
        if (F2FS_I(dir)->i_current_depth != current_depth)
@@ -656,7 +656,7 @@ void f2fs_drop_nlink(struct inode *dir, struct inode *inode)
 
        if (S_ISDIR(inode->i_mode))
                f2fs_i_links_write(dir, false);
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
 
        f2fs_i_links_write(inode, false);
        if (S_ISDIR(inode->i_mode)) {
@@ -703,7 +703,7 @@ void f2fs_delete_entry(struct f2fs_dir_entry *dentry, struct page *page,
        kunmap(page); /* kunmap - pair of f2fs_find_entry */
        set_page_dirty(page);
 
-       dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       dir->i_ctime = dir->i_mtime = current_time(dir);
        f2fs_mark_inode_dirty_sync(dir);
 
        if (inode)
index 28f4f4cbb8d84d0b07c22e3952d09b9eb1e1bf8c..b831d7662005339fb896cfd4ea7e5af27ed524f6 100644 (file)
@@ -631,7 +631,7 @@ int f2fs_truncate(struct inode *inode)
        if (err)
                return err;
 
-       inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_ctime = current_time(inode);
        f2fs_mark_inode_dirty_sync(inode);
        return 0;
 }
@@ -708,7 +708,7 @@ int f2fs_setattr(struct dentry *dentry, struct iattr *attr)
                                if (err)
                                        return err;
                        }
-                       inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+                       inode->i_mtime = inode->i_ctime = current_time(inode);
                }
        }
 
@@ -1395,7 +1395,7 @@ static long f2fs_fallocate(struct file *file, int mode,
        }
 
        if (!ret) {
-               inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+               inode->i_mtime = inode->i_ctime = current_time(inode);
                f2fs_mark_inode_dirty_sync(inode);
                f2fs_update_time(F2FS_I_SB(inode), REQ_TIME);
        }
@@ -1487,7 +1487,7 @@ static int f2fs_ioc_setflags(struct file *filp, unsigned long arg)
        fi->i_flags = flags;
        inode_unlock(inode);
 
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
        f2fs_set_inode_flags(inode);
 out:
        mnt_drop_write_file(filp);
index ccea8735de593cdeb015e1b9c138bf437414a92d..b4af15b26a12b84d60bc852a0dbdc4ca5da99e2b 100644 (file)
@@ -569,7 +569,7 @@ void f2fs_delete_inline_entry(struct f2fs_dir_entry *dentry, struct page *page,
        set_page_dirty(page);
        f2fs_put_page(page, 1);
 
-       dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       dir->i_ctime = dir->i_mtime = current_time(dir);
        f2fs_mark_inode_dirty_sync(dir);
 
        if (inode)
index 08e3d1d7a5009f3fcc76233f688152a0d2bf501f..71e36a780c901940577809953a82129870806942 100644 (file)
@@ -46,7 +46,7 @@ static struct inode *f2fs_new_inode(struct inode *dir, umode_t mode)
 
        inode->i_ino = ino;
        inode->i_blocks = 0;
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        inode->i_generation = sbi->s_next_generation++;
 
        err = insert_inode_locked(inode);
@@ -177,7 +177,7 @@ static int f2fs_link(struct dentry *old_dentry, struct inode *dir,
 
        f2fs_balance_fs(sbi, true);
 
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
        ihold(inode);
 
        set_inode_flag(inode, FI_INC_LINK);
@@ -718,7 +718,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
 
                f2fs_set_link(new_dir, new_entry, new_page, old_inode);
 
-               new_inode->i_ctime = CURRENT_TIME;
+               new_inode->i_ctime = current_time(new_inode);
                down_write(&F2FS_I(new_inode)->i_sem);
                if (old_dir_entry)
                        f2fs_i_links_write(new_inode, false);
@@ -772,7 +772,7 @@ static int f2fs_rename(struct inode *old_dir, struct dentry *old_dentry,
                file_set_enc_name(old_inode);
        up_write(&F2FS_I(old_inode)->i_sem);
 
-       old_inode->i_ctime = CURRENT_TIME;
+       old_inode->i_ctime = current_time(old_inode);
        f2fs_mark_inode_dirty_sync(old_inode);
 
        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,
        file_lost_pino(old_inode);
        up_write(&F2FS_I(old_inode)->i_sem);
 
-       old_dir->i_ctime = CURRENT_TIME;
+       old_dir->i_ctime = current_time(old_dir);
        if (old_nlink) {
                down_write(&F2FS_I(old_dir)->i_sem);
                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,
        file_lost_pino(new_inode);
        up_write(&F2FS_I(new_inode)->i_sem);
 
-       new_dir->i_ctime = CURRENT_TIME;
+       new_dir->i_ctime = current_time(new_dir);
        if (new_nlink) {
                down_write(&F2FS_I(new_dir)->i_sem);
                f2fs_i_links_write(new_dir, new_nlink > 0);
index c8898b5148eb62134db2467d579d5401f8efdcfd..62f76ea6cb3c37565051f7108a45c031ae705d70 100644 (file)
@@ -541,7 +541,7 @@ static int __f2fs_setxattr(struct inode *inode, int index,
 
        if (is_inode_flag_set(inode, FI_ACL_MODE)) {
                inode->i_mode = F2FS_I(inode)->i_acl_mode;
-               inode->i_ctime = CURRENT_TIME;
+               inode->i_ctime = current_time(inode);
                clear_inode_flag(inode, FI_ACL_MODE);
        }
        if (index == F2FS_XATTR_INDEX_ENCRYPTION &&
index 663e428596c6cf7990b59df673e0a191dcfafda2..81cecbe6d7cf6b193a416df0c6d4b5585255ec56 100644 (file)
@@ -1071,7 +1071,7 @@ int fat_remove_entries(struct inode *dir, struct fat_slot_info *sinfo)
                }
        }
 
-       dir->i_mtime = dir->i_atime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_atime = current_time(dir);
        if (IS_DIRSYNC(dir))
                (void)fat_sync_inode(dir);
        else
index f7018566883241bc65a981cf0d6e533e4d331241..fc71ff524367dca026356b812177e462eef97885 100644 (file)
@@ -63,7 +63,7 @@ static int fat_ioctl_set_attributes(struct file *file, u32 __user *user_attr)
 
        /* Equivalent to a chmod() */
        ia.ia_valid = ATTR_MODE | ATTR_CTIME;
-       ia.ia_ctime = current_fs_time(inode->i_sb);
+       ia.ia_ctime = current_time(inode);
        if (is_dir)
                ia.ia_mode = fat_make_mode(sbi, attr, S_IRWXUGO);
        else {
@@ -194,7 +194,7 @@ static int fat_cont_expand(struct inode *inode, loff_t size)
        if (err)
                goto out;
 
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
        mark_inode_dirty(inode);
        if (IS_SYNC(inode)) {
                int err2;
@@ -297,7 +297,7 @@ static int fat_free(struct inode *inode, int skip)
                MSDOS_I(inode)->i_logstart = 0;
        }
        MSDOS_I(inode)->i_attrs |= ATTR_ARCH;
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
        if (wait) {
                err = fat_sync_inode(inode);
                if (err) {
index da04c0298fab40c1df4d22dd2492ec8d7ef26a4d..338d2f73eb29c8f1691a22a162e5929875bbf8cf 100644 (file)
@@ -237,7 +237,7 @@ static int fat_write_end(struct file *file, struct address_space *mapping,
        if (err < len)
                fat_write_failed(mapping, pos + len);
        if (!(err < 0) && !(MSDOS_I(inode)->i_attrs & ATTR_ARCH)) {
-               inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
+               inode->i_mtime = inode->i_ctime = current_time(inode);
                MSDOS_I(inode)->i_attrs |= ATTR_ARCH;
                mark_inode_dirty(inode);
        }
index a8f6aa9699483123791a83fd72e9e0dbd3fb440b..7d6a105d601b52d3d5b356e94c0c7ab87a818263 100644 (file)
@@ -283,7 +283,7 @@ static int msdos_create(struct inode *dir, struct dentry *dentry, umode_t mode,
                goto out;
        }
 
-       ts = CURRENT_TIME_SEC;
+       ts = current_time(dir);
        err = msdos_add_entry(dir, msdos_name, 0, is_hid, 0, &ts, &sinfo);
        if (err)
                goto out;
@@ -330,7 +330,7 @@ static int msdos_rmdir(struct inode *dir, struct dentry *dentry)
        drop_nlink(dir);
 
        clear_nlink(inode);
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        fat_detach(inode);
 out:
        mutex_unlock(&MSDOS_SB(sb)->s_lock);
@@ -364,7 +364,7 @@ static int msdos_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
                goto out;
        }
 
-       ts = CURRENT_TIME_SEC;
+       ts = current_time(dir);
        cluster = fat_alloc_new_dir(dir, &ts);
        if (cluster < 0) {
                err = cluster;
@@ -416,7 +416,7 @@ static int msdos_unlink(struct inode *dir, struct dentry *dentry)
        if (err)
                goto out;
        clear_nlink(inode);
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        fat_detach(inode);
 out:
        mutex_unlock(&MSDOS_SB(sb)->s_lock);
@@ -481,7 +481,7 @@ static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name,
                                mark_inode_dirty(old_inode);
 
                        old_dir->i_version++;
-                       old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
+                       old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir);
                        if (IS_DIRSYNC(old_dir))
                                (void)fat_sync_inode(old_dir);
                        else
@@ -490,7 +490,7 @@ static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name,
                }
        }
 
-       ts = CURRENT_TIME_SEC;
+       ts = current_time(old_inode);
        if (new_inode) {
                if (err)
                        goto out;
index c5e48b8631ccb5bbaa2ebe5269b99bc266d4b65a..bf46a2d7dc50d3dba408b49360bc2177e7a829f5 100644 (file)
@@ -777,7 +777,7 @@ static int vfat_create(struct inode *dir, struct dentry *dentry, umode_t mode,
 
        mutex_lock(&MSDOS_SB(sb)->s_lock);
 
-       ts = CURRENT_TIME_SEC;
+       ts = current_time(dir);
        err = vfat_add_entry(dir, &dentry->d_name, 0, 0, &ts, &sinfo);
        if (err)
                goto out;
@@ -821,7 +821,7 @@ static int vfat_rmdir(struct inode *dir, struct dentry *dentry)
        drop_nlink(dir);
 
        clear_nlink(inode);
-       inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_atime = current_time(inode);
        fat_detach(inode);
        dentry->d_time = dir->i_version;
 out:
@@ -847,7 +847,7 @@ static int vfat_unlink(struct inode *dir, struct dentry *dentry)
        if (err)
                goto out;
        clear_nlink(inode);
-       inode->i_mtime = inode->i_atime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_atime = current_time(inode);
        fat_detach(inode);
        dentry->d_time = dir->i_version;
 out:
@@ -866,7 +866,7 @@ static int vfat_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
 
        mutex_lock(&MSDOS_SB(sb)->s_lock);
 
-       ts = CURRENT_TIME_SEC;
+       ts = current_time(dir);
        cluster = fat_alloc_new_dir(dir, &ts);
        if (cluster < 0) {
                err = cluster;
@@ -935,7 +935,7 @@ static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry,
                }
        }
 
-       ts = CURRENT_TIME_SEC;
+       ts = current_time(old_dir);
        if (new_inode) {
                if (is_dir) {
                        err = fat_dir_empty(new_inode);
index f863ac6647ac35506681b3a68923f09e5492b5ea..6e22748b0704c509edad6a0e93d0a6626601137b 100644 (file)
@@ -220,7 +220,7 @@ static struct dentry *fuse_ctl_add_dentry(struct dentry *parent,
        inode->i_mode = mode;
        inode->i_uid = fc->user_id;
        inode->i_gid = fc->group_id;
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        /* setting ->i_op to NULL is not allowed */
        if (iop)
                inode->i_op = iop;
index 4bfeaa70815f6c76cfa8ea06eadbe856d4c91d43..215b4beea2ef463e641a092d7c26a618e7745f34 100644 (file)
@@ -637,7 +637,7 @@ static int fuse_symlink(struct inode *dir, struct dentry *entry,
 static inline void fuse_update_ctime(struct inode *inode)
 {
        if (!IS_NOCMTIME(inode)) {
-               inode->i_ctime = current_fs_time(inode->i_sb);
+               inode->i_ctime = current_time(inode);
                mark_inode_dirty_sync(inode);
        }
 }
index 6e2bec1cd28944eecd3d59f22f8a25ccf2facc4e..945342202a5eb4b1902696413bdc7ed39a858157 100644 (file)
@@ -836,7 +836,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh,
        gfs2_quota_change(ip, -(s64)btotal, ip->i_inode.i_uid,
                          ip->i_inode.i_gid);
 
-       ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
+       ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
 
        gfs2_dinode_out(ip, dibh->b_data);
 
@@ -1063,7 +1063,7 @@ static int trunc_start(struct inode *inode, u64 oldsize, u64 newsize)
        }
 
        i_size_write(inode, newsize);
-       ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
+       ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
        gfs2_dinode_out(ip, dibh->b_data);
 
        if (journaled)
@@ -1142,7 +1142,7 @@ static int trunc_end(struct gfs2_inode *ip)
                gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode));
                gfs2_ordered_del_inode(ip);
        }
-       ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
+       ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
        ip->i_diskflags &= ~GFS2_DIF_TRUNC_IN_PROG;
 
        gfs2_trans_add_meta(ip->i_gl, dibh);
@@ -1252,7 +1252,7 @@ static int do_grow(struct inode *inode, u64 size)
                goto do_end_trans;
 
        i_size_write(inode, size);
-       ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
+       ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
        gfs2_trans_add_meta(ip->i_gl, dibh);
        gfs2_dinode_out(ip, dibh->b_data);
        brelse(dibh);
index fcb59b23f1e38dd6ecd8cc90a14985f618347373..f75c9aef9f9483712027f291762f5f019efa8cca 100644 (file)
@@ -135,7 +135,7 @@ static int gfs2_dir_write_stuffed(struct gfs2_inode *ip, const char *buf,
        memcpy(dibh->b_data + offset + sizeof(struct gfs2_dinode), buf, size);
        if (ip->i_inode.i_size < offset + size)
                i_size_write(&ip->i_inode, offset + size);
-       ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
+       ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
        gfs2_dinode_out(ip, dibh->b_data);
 
        brelse(dibh);
@@ -233,7 +233,7 @@ out:
 
        if (ip->i_inode.i_size < offset + copied)
                i_size_write(&ip->i_inode, offset + copied);
-       ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
+       ip->i_inode.i_mtime = ip->i_inode.i_ctime = current_time(&ip->i_inode);
 
        gfs2_trans_add_meta(ip->i_gl, dibh);
        gfs2_dinode_out(ip, dibh->b_data);
@@ -872,7 +872,7 @@ static struct gfs2_leaf *new_leaf(struct inode *inode, struct buffer_head **pbh,
        struct gfs2_leaf *leaf;
        struct gfs2_dirent *dent;
        struct qstr name = { .name = "" };
-       struct timespec tv = CURRENT_TIME;
+       struct timespec tv = current_time(inode);
 
        error = gfs2_alloc_blocks(ip, &bn, &n, 0, NULL);
        if (error)
@@ -1816,7 +1816,7 @@ int gfs2_dir_add(struct inode *inode, const struct qstr *name,
                        gfs2_inum_out(nip, dent);
                        dent->de_type = cpu_to_be16(IF2DT(nip->i_inode.i_mode));
                        dent->de_rahead = cpu_to_be16(gfs2_inode_ra_len(nip));
-                       tv = CURRENT_TIME;
+                       tv = current_time(&ip->i_inode);
                        if (ip->i_diskflags & GFS2_DIF_EXHASH) {
                                leaf = (struct gfs2_leaf *)bh->b_data;
                                be16_add_cpu(&leaf->lf_entries, 1);
@@ -1878,7 +1878,7 @@ int gfs2_dir_del(struct gfs2_inode *dip, const struct dentry *dentry)
        const struct qstr *name = &dentry->d_name;
        struct gfs2_dirent *dent, *prev = NULL;
        struct buffer_head *bh;
-       struct timespec tv = CURRENT_TIME;
+       struct timespec tv = current_time(&dip->i_inode);
 
        /* Returns _either_ the entry (if its first in block) or the
           previous entry otherwise */
@@ -1960,7 +1960,7 @@ int gfs2_dir_mvino(struct gfs2_inode *dip, const struct qstr *filename,
                gfs2_trans_add_meta(dip->i_gl, bh);
        }
 
-       dip->i_inode.i_mtime = dip->i_inode.i_ctime = CURRENT_TIME;
+       dip->i_inode.i_mtime = dip->i_inode.i_ctime = current_time(&dip->i_inode);
        gfs2_dinode_out(dip, bh->b_data);
        brelse(bh);
        return 0;
index 56825cc8ab87e159dd8c54947264224071188966..abc74e13502dd4a8d8a2d0e03669af846128a1a6 100644 (file)
@@ -652,7 +652,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
        set_nlink(inode, S_ISDIR(mode) ? 2 : 1);
        inode->i_rdev = dev;
        inode->i_size = size;
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        gfs2_set_inode_blocks(inode, 1);
        munge_mode_uid_gid(dip, inode);
        check_and_update_goal(dip);
@@ -979,7 +979,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
 
        gfs2_trans_add_meta(ip->i_gl, dibh);
        inc_nlink(&ip->i_inode);
-       ip->i_inode.i_ctime = CURRENT_TIME;
+       ip->i_inode.i_ctime = current_time(&ip->i_inode);
        ihold(inode);
        d_instantiate(dentry, inode);
        mark_inode_dirty(inode);
@@ -1063,7 +1063,7 @@ static int gfs2_unlink_inode(struct gfs2_inode *dip,
                return error;
 
        ip->i_entries = 0;
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
        if (S_ISDIR(inode->i_mode))
                clear_nlink(inode);
        else
@@ -1326,7 +1326,7 @@ static int update_moved_ino(struct gfs2_inode *ip, struct gfs2_inode *ndip,
        error = gfs2_meta_inode_buffer(ip, &dibh);
        if (error)
                return error;
-       ip->i_inode.i_ctime = CURRENT_TIME;
+       ip->i_inode.i_ctime = current_time(&ip->i_inode);
        gfs2_trans_add_meta(ip->i_gl, dibh);
        gfs2_dinode_out(ip, dibh->b_data);
        brelse(dibh);
index 77930ca25303d9c1e040de629ff10bf449574420..422e640a5a9d52c0621801627eb30555b3e96ae0 100644 (file)
@@ -854,7 +854,7 @@ static int gfs2_adjust_quota(struct gfs2_inode *ip, loff_t loc,
                size = loc + sizeof(struct gfs2_quota);
                if (size > inode->i_size)
                        i_size_write(inode, size);
-               inode->i_mtime = inode->i_atime = CURRENT_TIME;
+               inode->i_mtime = inode->i_atime = current_time(inode);
                mark_inode_dirty(inode);
                set_bit(QDF_REFRESH, &qd->qd_flags);
        }
index 3a28535040841151a9d246d104f7e145aa5b28f8..a4a577088d19c32d31071cd60f518452750103ab 100644 (file)
@@ -309,7 +309,7 @@ static int ea_dealloc_unstuffed(struct gfs2_inode *ip, struct buffer_head *bh,
 
        error = gfs2_meta_inode_buffer(ip, &dibh);
        if (!error) {
-               ip->i_inode.i_ctime = CURRENT_TIME;
+               ip->i_inode.i_ctime = current_time(&ip->i_inode);
                gfs2_trans_add_meta(ip->i_gl, dibh);
                gfs2_dinode_out(ip, dibh->b_data);
                brelse(dibh);
@@ -775,7 +775,7 @@ static int ea_alloc_skeleton(struct gfs2_inode *ip, struct gfs2_ea_request *er,
 
        error = gfs2_meta_inode_buffer(ip, &dibh);
        if (!error) {
-               ip->i_inode.i_ctime = CURRENT_TIME;
+               ip->i_inode.i_ctime = current_time(&ip->i_inode);
                gfs2_trans_add_meta(ip->i_gl, dibh);
                gfs2_dinode_out(ip, dibh->b_data);
                brelse(dibh);
@@ -910,7 +910,7 @@ static int ea_set_simple_noalloc(struct gfs2_inode *ip, struct buffer_head *bh,
        error = gfs2_meta_inode_buffer(ip, &dibh);
        if (error)
                goto out;
-       ip->i_inode.i_ctime = CURRENT_TIME;
+       ip->i_inode.i_ctime = current_time(&ip->i_inode);
        gfs2_trans_add_meta(ip->i_gl, dibh);
        gfs2_dinode_out(ip, dibh->b_data);
        brelse(dibh);
@@ -1133,7 +1133,7 @@ static int ea_remove_stuffed(struct gfs2_inode *ip, struct gfs2_ea_location *el)
 
        error = gfs2_meta_inode_buffer(ip, &dibh);
        if (!error) {
-               ip->i_inode.i_ctime = CURRENT_TIME;
+               ip->i_inode.i_ctime = current_time(&ip->i_inode);
                gfs2_trans_add_meta(ip->i_gl, dibh);
                gfs2_dinode_out(ip, dibh->b_data);
                brelse(dibh);
index 8f4afd3f5108d1d019ef5d1267b03548a4ad02cc..8a66405b0f8b5abddd78bc7b39b783649a44b687 100644 (file)
@@ -125,7 +125,7 @@ int hfs_cat_create(u32 cnid, struct inode *dir, const struct qstr *str, struct i
                goto err1;
 
        dir->i_size++;
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        mark_inode_dirty(dir);
        hfs_find_exit(&fd);
        return 0;
@@ -261,7 +261,7 @@ int hfs_cat_delete(u32 cnid, struct inode *dir, const struct qstr *str)
        }
 
        dir->i_size--;
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        mark_inode_dirty(dir);
        res = 0;
 out:
@@ -321,7 +321,7 @@ int hfs_cat_move(u32 cnid, struct inode *src_dir, const struct qstr *src_name,
        if (err)
                goto out;
        dst_dir->i_size++;
-       dst_dir->i_mtime = dst_dir->i_ctime = CURRENT_TIME_SEC;
+       dst_dir->i_mtime = dst_dir->i_ctime = current_time(dst_dir);
        mark_inode_dirty(dst_dir);
 
        /* finally remove the old entry */
@@ -333,7 +333,7 @@ int hfs_cat_move(u32 cnid, struct inode *src_dir, const struct qstr *src_name,
        if (err)
                goto out;
        src_dir->i_size--;
-       src_dir->i_mtime = src_dir->i_ctime = CURRENT_TIME_SEC;
+       src_dir->i_mtime = src_dir->i_ctime = current_time(src_dir);
        mark_inode_dirty(src_dir);
 
        type = entry.type;
index 4f7a1b64e2512a05918dcd63aa6bb710f33eef6e..5de5c48b418da2e62edc00c188bde0546cf97410 100644 (file)
@@ -268,7 +268,7 @@ static int hfs_remove(struct inode *dir, struct dentry *dentry)
        if (res)
                return res;
        clear_nlink(inode);
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        hfs_delete_inode(inode);
        mark_inode_dirty(inode);
        return 0;
index c6a32415735bcb55e5187fdcd14159db1aa6ab9c..b8b57ecbe1ab840ac472422b561fd411d2b1597f 100644 (file)
@@ -193,7 +193,7 @@ struct inode *hfs_new_inode(struct inode *dir, const struct qstr *name, umode_t
        inode->i_uid = current_fsuid();
        inode->i_gid = current_fsgid();
        set_nlink(inode, 1);
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        HFS_I(inode)->flags = 0;
        HFS_I(inode)->rsrc_inode = NULL;
        HFS_I(inode)->fs_blocks = 0;
index 142534d3c2d506eaf73970c7fb6dc8e3529a628c..a5e00f7a4c1434ba9d5718935c213fe0c2158868 100644 (file)
@@ -303,7 +303,7 @@ int hfsplus_create_cat(u32 cnid, struct inode *dir,
        dir->i_size++;
        if (S_ISDIR(inode->i_mode))
                hfsplus_subfolders_inc(dir);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        hfsplus_mark_inode_dirty(dir, HFSPLUS_I_CAT_DIRTY);
 
        hfs_find_exit(&fd);
@@ -400,7 +400,7 @@ int hfsplus_delete_cat(u32 cnid, struct inode *dir, const struct qstr *str)
        dir->i_size--;
        if (type == HFSPLUS_FOLDER)
                hfsplus_subfolders_dec(dir);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        hfsplus_mark_inode_dirty(dir, HFSPLUS_I_CAT_DIRTY);
 
        if (type == HFSPLUS_FILE || type == HFSPLUS_FOLDER) {
@@ -469,7 +469,7 @@ int hfsplus_rename_cat(u32 cnid,
        dst_dir->i_size++;
        if (type == HFSPLUS_FOLDER)
                hfsplus_subfolders_inc(dst_dir);
-       dst_dir->i_mtime = dst_dir->i_ctime = CURRENT_TIME_SEC;
+       dst_dir->i_mtime = dst_dir->i_ctime = current_time(dst_dir);
 
        /* finally remove the old entry */
        err = hfsplus_cat_build_key(sb, src_fd.search_key,
@@ -486,7 +486,7 @@ int hfsplus_rename_cat(u32 cnid,
        src_dir->i_size--;
        if (type == HFSPLUS_FOLDER)
                hfsplus_subfolders_dec(src_dir);
-       src_dir->i_mtime = src_dir->i_ctime = CURRENT_TIME_SEC;
+       src_dir->i_mtime = src_dir->i_ctime = current_time(src_dir);
 
        /* remove old thread entry */
        hfsplus_cat_build_key_with_cnid(sb, src_fd.search_key, cnid);
index 063577958126fdeacf4eff86b4a10fea40c55401..3cf088779589b14bb6315905eb7265cfceac50b9 100644 (file)
@@ -347,7 +347,7 @@ static int hfsplus_link(struct dentry *src_dentry, struct inode *dst_dir,
        inc_nlink(inode);
        hfsplus_instantiate(dst_dentry, inode, cnid);
        ihold(inode);
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
        sbi->file_count++;
        hfsplus_mark_mdb_dirty(dst_dir->i_sb);
@@ -406,7 +406,7 @@ static int hfsplus_unlink(struct inode *dir, struct dentry *dentry)
                        hfsplus_delete_inode(inode);
        } else
                sbi->file_count--;
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
 out:
        mutex_unlock(&sbi->vh_mutex);
@@ -427,7 +427,7 @@ static int hfsplus_rmdir(struct inode *dir, struct dentry *dentry)
        if (res)
                goto out;
        clear_nlink(inode);
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        hfsplus_delete_inode(inode);
        mark_inode_dirty(inode);
 out:
index 19462d773fe2443c3c483249630c646dc1f3c3f9..c350cfb6898cd531d1c9f38e663c4d60f883d058 100644 (file)
@@ -369,7 +369,7 @@ struct inode *hfsplus_new_inode(struct super_block *sb, umode_t mode)
        inode->i_uid = current_fsuid();
        inode->i_gid = current_fsgid();
        set_nlink(inode, 1);
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
 
        hip = HFSPLUS_I(inode);
        INIT_LIST_HEAD(&hip->open_dir_list);
index 32a49e292b6a6b5d94421eaa8eb59541d15b12b5..99627f8a0a1829b1b8007d9523aee26775dd9329 100644 (file)
@@ -122,7 +122,7 @@ static int hfsplus_ioctl_setflags(struct file *file, int __user *user_flags)
        else
                hip->userflags &= ~HFSPLUS_FLG_NODUMP;
 
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
 
 out_unlock_inode:
index 4ea71eba40a57a3dd1c2e32460021878e12f56d3..3053e200ec950af0d97f436ddc61b395507fb111 100644 (file)
@@ -657,7 +657,7 @@ static long hugetlbfs_fallocate(struct file *file, int mode, loff_t offset,
 
        if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > inode->i_size)
                i_size_write(inode, offset + len);
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
 out:
        inode_unlock(inode);
        return error;
@@ -702,7 +702,7 @@ static struct inode *hugetlbfs_get_root(struct super_block *sb,
                inode->i_mode = S_IFDIR | config->mode;
                inode->i_uid = config->uid;
                inode->i_gid = config->gid;
-               inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+               inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
                info = HUGETLBFS_I(inode);
                mpol_shared_policy_init(&info->policy, NULL);
                inode->i_op = &hugetlbfs_dir_inode_operations;
@@ -741,7 +741,7 @@ static struct inode *hugetlbfs_get_inode(struct super_block *sb,
                lockdep_set_class(&inode->i_mapping->i_mmap_rwsem,
                                &hugetlbfs_i_mmap_rwsem_key);
                inode->i_mapping->a_ops = &hugetlbfs_aops;
-               inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+               inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
                inode->i_mapping->private_data = resv_map;
                info = HUGETLBFS_I(inode);
                /*
@@ -790,7 +790,7 @@ static int hugetlbfs_mknod(struct inode *dir,
 
        inode = hugetlbfs_get_inode(dir->i_sb, dir, mode, dev);
        if (inode) {
-               dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+               dir->i_ctime = dir->i_mtime = current_time(dir);
                d_instantiate(dentry, inode);
                dget(dentry);   /* Extra count - pin the dentry in core */
                error = 0;
@@ -827,7 +827,7 @@ static int hugetlbfs_symlink(struct inode *dir,
                } else
                        iput(inode);
        }
-       dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       dir->i_ctime = dir->i_mtime = current_time(dir);
 
        return error;
 }
index 7e3ef3af3db9e35dc175608d83d3e7ab7d3f789a..cadf75fb579e4bcd937314060bf90a58442ad580 100644 (file)
@@ -1636,7 +1636,7 @@ bool atime_needs_update(const struct path *path, struct inode *inode)
        if ((mnt->mnt_flags & MNT_NODIRATIME) && S_ISDIR(inode->i_mode))
                return false;
 
-       now = current_fs_time(inode->i_sb);
+       now = current_time(inode);
 
        if (!relatime_need_update(mnt, inode, now))
                return false;
@@ -1670,7 +1670,7 @@ void touch_atime(const struct path *path)
         * We may also fail on filesystems that have the ability to make parts
         * of the fs read only, e.g. subvolumes in Btrfs.
         */
-       now = current_fs_time(inode->i_sb);
+       now = current_time(inode);
        update_time(inode, &now, S_ATIME);
        __mnt_drop_write(mnt);
 skip_update:
@@ -1793,7 +1793,7 @@ int file_update_time(struct file *file)
        if (IS_NOCMTIME(inode))
                return 0;
 
-       now = current_fs_time(inode->i_sb);
+       now = current_time(inode);
        if (!timespec_equal(&inode->i_mtime, &now))
                sync_it = S_MTIME;
 
@@ -2049,3 +2049,26 @@ void inode_nohighmem(struct inode *inode)
        mapping_set_gfp_mask(inode->i_mapping, GFP_USER);
 }
 EXPORT_SYMBOL(inode_nohighmem);
+
+/**
+ * current_time - Return FS time
+ * @inode: inode.
+ *
+ * Return the current time truncated to the time granularity supported by
+ * the fs.
+ *
+ * Note that inode and inode->sb cannot be NULL.
+ * Otherwise, the function warns and returns time without truncation.
+ */
+struct timespec current_time(struct inode *inode)
+{
+       struct timespec now = current_kernel_time();
+
+       if (unlikely(!inode->i_sb)) {
+               WARN(1, "current_time() called with uninitialized super_block in the inode");
+               return now;
+       }
+
+       return timespec_trunc(now, inode->i_sb->s_time_gran);
+}
+EXPORT_SYMBOL(current_time);
index bc2693d562987a6602b9403599f48d6c481a39be..8fd0a7845d88ec29ebe5476b0005ba66f7c68847 100644 (file)
@@ -242,7 +242,7 @@ int jffs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
 
                                attr.ia_valid = ATTR_MODE | ATTR_CTIME;
                                attr.ia_mode = mode;
-                               attr.ia_ctime = CURRENT_TIME_SEC;
+                               attr.ia_ctime = current_time(inode);
                                rc = jffs2_do_setattr(inode, &attr);
                                if (rc < 0)
                                        return rc;
index ae2ebb26b4468fdf4d1c528b65db24d2618c1ead..2478e0b98441d1de9684ee943f23052f38bd4c3e 100644 (file)
@@ -472,7 +472,7 @@ struct inode *jffs2_new_inode (struct inode *dir_i, umode_t mode, struct jffs2_r
        inode->i_mode = jemode_to_cpu(ri->mode);
        i_gid_write(inode, je16_to_cpu(ri->gid));
        i_uid_write(inode, je16_to_cpu(ri->uid));
-       inode->i_atime = inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
+       inode->i_atime = inode->i_ctime = inode->i_mtime = current_time(inode);
        ri->atime = ri->mtime = ri->ctime = cpu_to_je32(I_SEC(inode->i_mtime));
 
        inode->i_blocks = 0;
index 21fa92ba2c191664fb2851da022f76a5e5d62388..4c1a6b5670df9e42eb7875ec2a5b410a442ea7cb 100644 (file)
@@ -81,7 +81,7 @@ static int __jfs_set_acl(tid_t tid, struct inode *inode, int type,
                        rc = posix_acl_equiv_mode(acl, &inode->i_mode);
                        if (rc < 0)
                                return rc;
-                       inode->i_ctime = CURRENT_TIME;
+                       inode->i_ctime = current_time(inode);
                        mark_inode_dirty(inode);
                        if (rc == 0)
                                acl = NULL;
index ad3e7b1effc4b0793b261a5808fa6f6e56e1be44..054cc761b426fa510a33df464bd788342576f3fc 100644 (file)
@@ -403,7 +403,7 @@ void jfs_truncate_nolock(struct inode *ip, loff_t length)
                        break;
                }
 
-               ip->i_mtime = ip->i_ctime = CURRENT_TIME;
+               ip->i_mtime = ip->i_ctime = current_time(ip);
                mark_inode_dirty(ip);
 
                txCommit(tid, 1, &ip, 0);
index 5e33cb9a190d8077fbf742a3480f611c6273f9ac..375dd257a34fe343b1b25a0176b4dd863aeae0c4 100644 (file)
@@ -131,7 +131,7 @@ struct inode *ialloc(struct inode *parent, umode_t mode)
        jfs_inode->mode2 |= inode->i_mode;
 
        inode->i_blocks = 0;
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        jfs_inode->otime = inode->i_ctime.tv_sec;
        inode->i_generation = JFS_SBI(sb)->gengen++;
 
index 1d88df6ae81bd46328281cb66be05f601142c95d..d1d7c43abb63263cf593c55c4dc7fa24635fd608 100644 (file)
@@ -162,7 +162,7 @@ static int jfs_create(struct inode *dip, struct dentry *dentry, umode_t mode,
 
        mark_inode_dirty(ip);
 
-       dip->i_ctime = dip->i_mtime = CURRENT_TIME;
+       dip->i_ctime = dip->i_mtime = current_time(dip);
 
        mark_inode_dirty(dip);
 
@@ -298,7 +298,7 @@ static int jfs_mkdir(struct inode *dip, struct dentry *dentry, umode_t mode)
 
        /* update parent directory inode */
        inc_nlink(dip);         /* for '..' from child directory */
-       dip->i_ctime = dip->i_mtime = CURRENT_TIME;
+       dip->i_ctime = dip->i_mtime = current_time(dip);
        mark_inode_dirty(dip);
 
        rc = txCommit(tid, 2, &iplist[0], 0);
@@ -406,7 +406,7 @@ static int jfs_rmdir(struct inode *dip, struct dentry *dentry)
        /* update parent directory's link count corresponding
         * to ".." entry of the target directory deleted
         */
-       dip->i_ctime = dip->i_mtime = CURRENT_TIME;
+       dip->i_ctime = dip->i_mtime = current_time(dip);
        inode_dec_link_count(dip);
 
        /*
@@ -528,7 +528,7 @@ static int jfs_unlink(struct inode *dip, struct dentry *dentry)
 
        ASSERT(ip->i_nlink);
 
-       ip->i_ctime = dip->i_ctime = dip->i_mtime = CURRENT_TIME;
+       ip->i_ctime = dip->i_ctime = dip->i_mtime = current_time(ip);
        mark_inode_dirty(dip);
 
        /* update target's inode */
@@ -838,8 +838,8 @@ static int jfs_link(struct dentry *old_dentry,
 
        /* update object inode */
        inc_nlink(ip);          /* for new link */
-       ip->i_ctime = CURRENT_TIME;
-       dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       ip->i_ctime = current_time(ip);
+       dir->i_ctime = dir->i_mtime = current_time(dir);
        mark_inode_dirty(dir);
        ihold(ip);
 
@@ -1039,7 +1039,7 @@ static int jfs_symlink(struct inode *dip, struct dentry *dentry,
 
        mark_inode_dirty(ip);
 
-       dip->i_ctime = dip->i_mtime = CURRENT_TIME;
+       dip->i_ctime = dip->i_mtime = current_time(dip);
        mark_inode_dirty(dip);
        /*
         * commit update of parent directory and link object
@@ -1218,7 +1218,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                        tblk->xflag |= COMMIT_DELETE;
                        tblk->u.ip = new_ip;
                } else {
-                       new_ip->i_ctime = CURRENT_TIME;
+                       new_ip->i_ctime = current_time(new_ip);
                        mark_inode_dirty(new_ip);
                }
        } else {
@@ -1281,10 +1281,10 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        /*
         * Update ctime on changed/moved inodes & mark dirty
         */
-       old_ip->i_ctime = CURRENT_TIME;
+       old_ip->i_ctime = current_time(old_ip);
        mark_inode_dirty(old_ip);
 
-       new_dir->i_ctime = new_dir->i_mtime = current_fs_time(new_dir->i_sb);
+       new_dir->i_ctime = new_dir->i_mtime = current_time(new_dir);
        mark_inode_dirty(new_dir);
 
        /* Build list of inodes modified by this transaction */
@@ -1296,7 +1296,7 @@ static int jfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 
        if (old_dir != new_dir) {
                iplist[ipcount++] = new_dir;
-               old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
+               old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir);
                mark_inode_dirty(old_dir);
        }
 
@@ -1429,7 +1429,7 @@ static int jfs_mknod(struct inode *dir, struct dentry *dentry,
 
        mark_inode_dirty(ip);
 
-       dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       dir->i_ctime = dir->i_mtime = current_time(dir);
 
        mark_inode_dirty(dir);
 
index cec8814a3b8becb58cc9b640c3867312e44c2d5a..85671f7f8518f566dcae6c2aa193e05f891b296c 100644 (file)
@@ -830,7 +830,7 @@ out:
        if (inode->i_size < off+len-towrite)
                i_size_write(inode, off+len-towrite);
        inode->i_version++;
-       inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
        inode_unlock(inode);
        return len - towrite;
index 0bf3c33aedff9ecca4bbcaa11f04685b00671322..c60f3d32ee911192c0cd8dae3b7cb11c0f416411 100644 (file)
@@ -658,7 +658,7 @@ static int ea_put(tid_t tid, struct inode *inode, struct ea_buffer *ea_buf,
        if (old_blocks)
                dquot_free_block(inode, old_blocks);
 
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
 
        return 0;
 }
index 63b925d5ba1e43c67a83dfc1c92f59325fc954ba..43f6848266d5035a8ecee8c8d2e9970118bf2fba 100644 (file)
@@ -241,7 +241,7 @@ static inline void set_default_inode_attr(struct inode *inode, umode_t mode)
 {
        inode->i_mode = mode;
        inode->i_atime = inode->i_mtime =
-               inode->i_ctime = current_fs_time(inode->i_sb);
+               inode->i_ctime = current_time(inode);
 }
 
 static inline void set_inode_attr(struct inode *inode, struct iattr *iattr)
index 4758353b2d41bb1b252afe6b2026f46bd5d44d5f..d8ee308de3255d1c8753eab6645d0874744548d7 100644 (file)
@@ -265,7 +265,7 @@ struct dentry *mount_pseudo(struct file_system_type *fs_type, char *name,
         */
        root->i_ino = 1;
        root->i_mode = S_IFDIR | S_IRUSR | S_IWUSR;
-       root->i_atime = root->i_mtime = root->i_ctime = CURRENT_TIME;
+       root->i_atime = root->i_mtime = root->i_ctime = current_time(root);
        dentry = __d_alloc(s, &d_name);
        if (!dentry) {
                iput(root);
@@ -295,7 +295,7 @@ int simple_link(struct dentry *old_dentry, struct inode *dir, struct dentry *den
 {
        struct inode *inode = d_inode(old_dentry);
 
-       inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
        inc_nlink(inode);
        ihold(inode);
        dget(dentry);
@@ -329,7 +329,7 @@ int simple_unlink(struct inode *dir, struct dentry *dentry)
 {
        struct inode *inode = d_inode(dentry);
 
-       inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
        drop_nlink(inode);
        dput(dentry);
        return 0;
@@ -373,7 +373,7 @@ int simple_rename(struct inode *old_dir, struct dentry *old_dentry,
        }
 
        old_dir->i_ctime = old_dir->i_mtime = new_dir->i_ctime =
-               new_dir->i_mtime = inode->i_ctime = CURRENT_TIME;
+               new_dir->i_mtime = inode->i_ctime = current_time(old_dir);
 
        return 0;
 }
@@ -524,7 +524,7 @@ int simple_fill_super(struct super_block *s, unsigned long magic,
         */
        inode->i_ino = 1;
        inode->i_mode = S_IFDIR | 0755;
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        inode->i_op = &simple_dir_inode_operations;
        inode->i_fop = &simple_dir_operations;
        set_nlink(inode, 2);
@@ -550,7 +550,7 @@ int simple_fill_super(struct super_block *s, unsigned long magic,
                        goto out;
                }
                inode->i_mode = S_IFREG | files->mode;
-               inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+               inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
                inode->i_fop = files->ops;
                inode->i_ino = i;
                d_add(dentry, inode);
@@ -1096,7 +1096,7 @@ struct inode *alloc_anon_inode(struct super_block *s)
        inode->i_uid = current_fsuid();
        inode->i_gid = current_fsgid();
        inode->i_flags |= S_PRIVATE;
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        return inode;
 }
 EXPORT_SYMBOL(alloc_anon_inode);
index ee1b15f6fc135c33e2e0564eb5e10db927080533..b5152b067f37a052f0541e6ff43a47b3e613c704 100644 (file)
@@ -1539,7 +1539,7 @@ void lease_get_mtime(struct inode *inode, struct timespec *time)
        }
 
        if (has_lease)
-               *time = current_fs_time(inode->i_sb);
+               *time = current_time(inode);
        else
                *time = inode->i_mtime;
 }
index be37b907e65a0c1e07343e5e5c7e5e147f1b9a51..c87ea52de3d9d202d02dd6d66735c4d8f89724a8 100644 (file)
@@ -226,7 +226,7 @@ static int logfs_unlink(struct inode *dir, struct dentry *dentry)
        ta->state = UNLINK_1;
        ta->ino = inode->i_ino;
 
-       inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
 
        page = logfs_get_dd_page(dir, dentry);
        if (!page) {
@@ -540,7 +540,7 @@ static int logfs_link(struct dentry *old_dentry, struct inode *dir,
 {
        struct inode *inode = d_inode(old_dentry);
 
-       inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
        ihold(inode);
        inc_nlink(inode);
        mark_inode_dirty_sync(inode);
@@ -573,7 +573,7 @@ static int logfs_delete_dd(struct inode *dir, loff_t pos)
         * (crc-protected) journal.
         */
        BUG_ON(beyond_eof(dir, pos));
-       dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       dir->i_ctime = dir->i_mtime = current_time(dir);
        log_dir(" Delete dentry (%lx, %llx)\n", dir->i_ino, pos);
        return logfs_delete(dir, pos, NULL);
 }
index f01ddfb1a03b6ecc5d122b0bd94c6e301a1f6fa3..dae4f312ffbadda110e1a9006e5301c776cbf00d 100644 (file)
@@ -211,7 +211,7 @@ long logfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                li->li_flags = flags;
                inode_unlock(inode);
 
-               inode->i_ctime = CURRENT_TIME;
+               inode->i_ctime = current_time(inode);
                mark_inode_dirty_sync(inode);
                return 0;
 
index db9cfc5988836f125ef0adf1fce387bc726f53dd..f440a1525da898f5f80834347ea4fd548275101d 100644 (file)
@@ -213,8 +213,8 @@ static void logfs_init_inode(struct super_block *sb, struct inode *inode)
        i_gid_write(inode, 0);
        inode->i_size   = 0;
        inode->i_blocks = 0;
-       inode->i_ctime  = CURRENT_TIME;
-       inode->i_mtime  = CURRENT_TIME;
+       inode->i_ctime  = current_time(inode);
+       inode->i_mtime  = current_time(inode);
        li->li_refcount = 1;
        INIT_LIST_HEAD(&li->li_freeing_list);
 
index 3fb8c6d67303e9ed6a842152dfdc3c648009decb..bf19bf4a243f9b434c1d1843716fa3d88472f543 100644 (file)
@@ -1546,7 +1546,7 @@ static int __logfs_write_buf(struct inode *inode, struct page *page, long flags)
        int err;
 
        flags |= WF_WRITE | WF_DELETE;
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
 
        logfs_unpack_index(index, &bix, &level);
        if (logfs_block(page) && logfs_block(page)->reserved_bytes)
@@ -1578,7 +1578,7 @@ static int __logfs_delete(struct inode *inode, struct page *page)
        long flags = WF_DELETE;
        int err;
 
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
 
        if (page->index < I0_BLOCKS)
                return logfs_write_direct(inode, page, flags);
index 742942a983be8c73cf9f3ea01639ccfe86367e18..c2c3fd3277b5c89c012024c216edcd33a1e19d91 100644 (file)
@@ -253,7 +253,7 @@ struct inode *minix_new_inode(const struct inode *dir, umode_t mode, int *error)
        }
        inode_init_owner(inode, dir, mode);
        inode->i_ino = j;
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        inode->i_blocks = 0;
        memset(&minix_i(inode)->u, 0, sizeof(minix_i(inode)->u));
        insert_inode_hash(inode);
index 31dcd515b9d506ff9b8d26989a9d75dc9bce10dc..7edc9b3957009ee1c3bbbf3193bcb4b54395d499 100644 (file)
@@ -274,7 +274,7 @@ got_it:
                de->inode = inode->i_ino;
        }
        err = dir_commit_chunk(page, pos, sbi->s_dirsize);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        mark_inode_dirty(dir);
 out_put:
        dir_put_page(page);
@@ -306,7 +306,7 @@ int minix_delete_entry(struct minix_dir_entry *de, struct page *page)
                unlock_page(page);
        }
        dir_put_page(page);
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
        mark_inode_dirty(inode);
        return err;
 }
@@ -430,7 +430,7 @@ void minix_set_link(struct minix_dir_entry *de, struct page *page,
                unlock_page(page);
        }
        dir_put_page(page);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        mark_inode_dirty(dir);
 }
 
index a731cabf1540e0d0f12bff4f88ea23d40e78dd7a..4c57c9af6946f0918bf689e42107343b4e09f164 100644 (file)
@@ -124,7 +124,7 @@ static inline int splice_branch(struct inode *inode,
 
        /* We are done with atomic stuff, now do the rest of housekeeping */
 
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
 
        /* had we spliced it onto indirect block? */
        if (where->bh)
@@ -343,7 +343,7 @@ do_indirects:
                }
                first_whole++;
        }
-       inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
 }
 
index f7811d508104c120c7c85c515e7d757afa6bec46..1e0f11f5dac9c90093dd511f2dc451971c232c6d 100644 (file)
@@ -106,7 +106,7 @@ static int minix_link(struct dentry * old_dentry, struct inode * dir,
 {
        struct inode *inode = d_inode(old_dentry);
 
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        inode_inc_link_count(inode);
        ihold(inode);
        return add_nondir(dentry, inode);
@@ -223,7 +223,7 @@ static int minix_rename(struct inode * old_dir, struct dentry *old_dentry,
                if (!new_de)
                        goto out_dir;
                minix_set_link(new_de, new_page, old_inode);
-               new_inode->i_ctime = CURRENT_TIME_SEC;
+               new_inode->i_ctime = current_time(new_inode);
                if (dir_de)
                        drop_nlink(new_inode);
                inode_dec_link_count(new_inode);
index 5a17084415103a08b18cfbcb31bc80e9b422de53..0780ff8645391e83622708159550973290404960 100644 (file)
@@ -123,7 +123,7 @@ nfsd4_block_commit_blocks(struct inode *inode, struct nfsd4_layoutcommit *lcp,
 
        if (lcp->lc_mtime.tv_nsec == UTIME_NOW ||
            timespec_compare(&lcp->lc_mtime, &inode->i_mtime) < 0)
-               lcp->lc_mtime = current_fs_time(inode->i_sb);
+               lcp->lc_mtime = current_time(inode);
        iattr.ia_valid |= ATTR_ATIME | ATTR_CTIME | ATTR_MTIME;
        iattr.ia_atime = iattr.ia_ctime = iattr.ia_mtime = lcp->lc_mtime;
 
index 908ebbf0ac7eafc7c79db65c0dbf490b9e1496f6..582831ab3eb95dee645907bf4be2402f62087748 100644 (file)
@@ -438,7 +438,7 @@ void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de,
        nilfs_set_de_type(de, inode);
        nilfs_commit_chunk(page, mapping, from, to);
        nilfs_put_page(page);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
 }
 
 /*
@@ -528,7 +528,7 @@ got_it:
        de->inode = cpu_to_le64(inode->i_ino);
        nilfs_set_de_type(de, inode);
        nilfs_commit_chunk(page, page->mapping, from, to);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        nilfs_mark_inode_dirty(dir);
        /* OFFSET_CACHE */
 out_put:
@@ -576,7 +576,7 @@ int nilfs_delete_entry(struct nilfs_dir_entry *dir, struct page *page)
                pde->rec_len = nilfs_rec_len_to_disk(to - from);
        dir->inode = 0;
        nilfs_commit_chunk(page, mapping, from, to);
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
 out:
        nilfs_put_page(page);
        return err;
index af04f553d7c9d8b83acb9d5181f45948694b0af5..bf084035f83c633144abe22487ecb6548ef05855 100644 (file)
@@ -367,7 +367,7 @@ struct inode *nilfs_new_inode(struct inode *dir, umode_t mode)
        atomic64_inc(&root->inodes_count);
        inode_init_owner(inode, dir, mode);
        inode->i_ino = ino;
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
 
        if (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)) {
                err = nilfs_bmap_read(ii->i_bmap, NULL);
@@ -749,7 +749,7 @@ void nilfs_truncate(struct inode *inode)
 
        nilfs_truncate_bmap(ii, blkoff);
 
-       inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_ctime = current_time(inode);
        if (IS_SYNC(inode))
                nilfs_set_transaction_flag(NILFS_TI_SYNC);
 
index f1d7989459fdbafdaf40a8654af923c67e8f7560..1d2c3d7711feb94dea6ce3a0a1540a41a1bef1d2 100644 (file)
@@ -174,7 +174,7 @@ static int nilfs_ioctl_setflags(struct inode *inode, struct file *filp,
                (flags & FS_FL_USER_MODIFIABLE);
 
        nilfs_set_inode_flags(inode);
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
        if (IS_SYNC(inode))
                nilfs_set_transaction_flag(NILFS_TI_SYNC);
 
index ea94049c3e7959685ef05e487ccb6fc12ede1afc..2b71c60fe982a1bafdca0848193acc33287b56c5 100644 (file)
@@ -194,7 +194,7 @@ static int nilfs_link(struct dentry *old_dentry, struct inode *dir,
        if (err)
                return err;
 
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
        inode_inc_link_count(inode);
        ihold(inode);
 
@@ -395,7 +395,7 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry,
                        goto out_dir;
                nilfs_set_link(new_dir, new_de, new_page, old_inode);
                nilfs_mark_inode_dirty(new_dir);
-               new_inode->i_ctime = CURRENT_TIME;
+               new_inode->i_ctime = current_time(new_inode);
                if (dir_de)
                        drop_nlink(new_inode);
                drop_nlink(new_inode);
@@ -414,7 +414,7 @@ static int nilfs_rename(struct inode *old_dir, struct dentry *old_dentry,
         * Like most other Unix systems, set the ctime for inodes on a
         * rename.
         */
-       old_inode->i_ctime = CURRENT_TIME;
+       old_inode->i_ctime = current_time(old_inode);
 
        nilfs_delete_entry(old_de, old_page);
 
index 8f20d6016e205d341b82e31025961e8c9f6c6963..2b731bc2ae6de7e3dabe99436182e7254349e9f0 100644 (file)
--- a/fs/nsfs.c
+++ b/fs/nsfs.c
@@ -82,7 +82,7 @@ slow:
                return ERR_PTR(-ENOMEM);
        }
        inode->i_ino = ns->inum;
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        inode->i_flags |= S_IMMUTABLE;
        inode->i_mode = S_IFREG | S_IRUGO;
        inode->i_fop = &ns_file_operations;
index e01287c964a88ab4db60472e1e084449bcd166e3..6b7588a6f98c41e2a959ffe9d57c380f3155bb31 100644 (file)
@@ -2813,7 +2813,7 @@ done:
         * for real.
         */
        if (!IS_NOCMTIME(VFS_I(base_ni)) && !IS_RDONLY(VFS_I(base_ni))) {
-               struct timespec now = current_fs_time(VFS_I(base_ni)->i_sb);
+               struct timespec now = current_time(VFS_I(base_ni));
                int sync_it = 0;
 
                if (!timespec_equal(&VFS_I(base_ni)->i_mtime, &now) ||
index d15d492ce47b1ea500a4a774577536c9e053c535..d3c009626032fef599c13e6af37807ebb28ddd76 100644 (file)
@@ -2692,7 +2692,7 @@ mft_rec_already_initialized:
 
                /* Set the inode times to the current time. */
                vi->i_atime = vi->i_mtime = vi->i_ctime =
-                       current_fs_time(vi->i_sb);
+                       current_time(vi);
                /*
                 * Set the file size to 0, the ntfs inode sizes are set to 0 by
                 * the call to ntfs_init_big_inode() below.
index 2162434728c022ab4651904b778c21d958ca802d..acf0012bfc9a9ee909372baa7c825d2ec92bdc79 100644 (file)
@@ -201,7 +201,7 @@ static int ocfs2_acl_set_mode(struct inode *inode, struct buffer_head *di_bh,
        }
 
        inode->i_mode = new_mode;
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
        di->i_mode = cpu_to_le16(inode->i_mode);
        di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
        di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
index f165f867f3326f1c0dce98c4e1d031308fb65c51..f72712f6c28d587ab6d96c21a48940403a5ccdad 100644 (file)
@@ -7293,7 +7293,7 @@ int ocfs2_truncate_inline(struct inode *inode, struct buffer_head *di_bh,
        }
 
        inode->i_blocks = ocfs2_inode_sector_count(inode);
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
 
        di->i_ctime = di->i_mtime = cpu_to_le64(inode->i_ctime.tv_sec);
        di->i_ctime_nsec = di->i_mtime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
index 98d36548153dc3696619b2923e2eecce35bd6bbc..3a22be483af58216cf2d96140bfaaee891b344ad 100644 (file)
@@ -2020,7 +2020,7 @@ out_write_size:
                }
                inode->i_blocks = ocfs2_inode_sector_count(inode);
                di->i_size = cpu_to_le64((u64)i_size_read(inode));
-               inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+               inode->i_mtime = inode->i_ctime = current_time(inode);
                di->i_mtime = di->i_ctime = cpu_to_le64(inode->i_mtime.tv_sec);
                di->i_mtime_nsec = di->i_ctime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec);
                ocfs2_update_inode_fsync_trans(handle, inode, 1);
index e1adf285fc3142ab8c0856ea0a28d766c914ce3f..e7054e2ac9227dc4687a98beea6e005c2d03d988 100644 (file)
@@ -1677,7 +1677,7 @@ int __ocfs2_add_entry(handle_t *handle,
                                offset, ocfs2_dir_trailer_blk_off(dir->i_sb));
 
                if (ocfs2_dirent_would_fit(de, rec_len)) {
-                       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+                       dir->i_mtime = dir->i_ctime = current_time(dir);
                        retval = ocfs2_mark_inode_dirty(handle, dir, parent_fe_bh);
                        if (retval < 0) {
                                mlog_errno(retval);
@@ -2990,7 +2990,7 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh,
        ocfs2_dinode_new_extent_list(dir, di);
 
        i_size_write(dir, sb->s_blocksize);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
 
        di->i_size = cpu_to_le64(sb->s_blocksize);
        di->i_ctime = di->i_mtime = cpu_to_le64(dir->i_ctime.tv_sec);
index ef474cdd640479d1e9b3b48204f12dc5c6a7704f..f0d9763db1263e808c5f575ddb5c88835f884cfd 100644 (file)
@@ -398,7 +398,7 @@ static struct inode *dlmfs_get_root_inode(struct super_block *sb)
        if (inode) {
                inode->i_ino = get_next_ino();
                inode_init_owner(inode, NULL, mode);
-               inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+               inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
                inc_nlink(inode);
 
                inode->i_fop = &simple_dir_operations;
@@ -421,7 +421,7 @@ static struct inode *dlmfs_get_inode(struct inode *parent,
 
        inode->i_ino = get_next_ino();
        inode_init_owner(inode, parent, mode);
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
 
        ip = DLMFS_I(inode);
        ip->ip_conn = DLMFS_I(parent)->ip_conn;
index 0b055bfb8e866ddf2c4bf874ff653694081a5dec..63bfc3b5260dc7b09f486b12936c11d7a885ba8e 100644 (file)
@@ -253,7 +253,7 @@ int ocfs2_should_update_atime(struct inode *inode,
                return 0;
        }
 
-       now = CURRENT_TIME;
+       now = current_time(inode);
        if ((now.tv_sec - inode->i_atime.tv_sec <= osb->s_atime_quantum))
                return 0;
        else
@@ -287,7 +287,7 @@ int ocfs2_update_inode_atime(struct inode *inode,
         * have i_mutex to guard against concurrent changes to other
         * inode fields.
         */
-       inode->i_atime = CURRENT_TIME;
+       inode->i_atime = current_time(inode);
        di->i_atime = cpu_to_le64(inode->i_atime.tv_sec);
        di->i_atime_nsec = cpu_to_le32(inode->i_atime.tv_nsec);
        ocfs2_update_inode_fsync_trans(handle, inode, 0);
@@ -308,7 +308,7 @@ int ocfs2_set_inode_size(handle_t *handle,
 
        i_size_write(inode, new_i_size);
        inode->i_blocks = ocfs2_inode_sector_count(inode);
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
 
        status = ocfs2_mark_inode_dirty(handle, inode, fe_bh);
        if (status < 0) {
@@ -429,7 +429,7 @@ static int ocfs2_orphan_for_truncate(struct ocfs2_super *osb,
        }
 
        i_size_write(inode, new_i_size);
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
 
        di = (struct ocfs2_dinode *) fe_bh->b_data;
        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,
        i_size_write(inode, abs_to);
        inode->i_blocks = ocfs2_inode_sector_count(inode);
        di->i_size = cpu_to_le64((u64)i_size_read(inode));
-       inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_ctime = current_time(inode);
        di->i_mtime = di->i_ctime = cpu_to_le64(inode->i_mtime.tv_sec);
        di->i_ctime_nsec = cpu_to_le32(inode->i_mtime.tv_nsec);
        di->i_mtime_nsec = di->i_ctime_nsec;
@@ -1950,7 +1950,7 @@ static int __ocfs2_change_file_space(struct file *file, struct inode *inode,
        if (change_size && i_size_read(inode) < size)
                i_size_write(inode, size);
 
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
        ret = ocfs2_mark_inode_dirty(handle, inode, di_bh);
        if (ret < 0)
                mlog_errno(ret);
index e3d05d9901a3da26b123865545446f5ef96b08a5..4e8f32eb0bdb2f3e9aa90806ebf748290343d8c0 100644 (file)
@@ -953,7 +953,7 @@ static int ocfs2_move_extents(struct ocfs2_move_extents_context *context)
        }
 
        di = (struct ocfs2_dinode *)di_bh->b_data;
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
        di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
        di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
        ocfs2_update_inode_fsync_trans(handle, inode, 0);
index 7fb6a7f023e7ed724810a10007d13824876d6c9f..0e0e387f2da3df478e720244f34f84ec90d6cfa9 100644 (file)
@@ -798,7 +798,7 @@ static int ocfs2_link(struct dentry *old_dentry,
        }
 
        inc_nlink(inode);
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
        ocfs2_set_links_count(fe, inode->i_nlink);
        fe->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
        fe->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
@@ -1000,7 +1000,7 @@ static int ocfs2_unlink(struct inode *dir,
        ocfs2_set_links_count(fe, inode->i_nlink);
        ocfs2_journal_dirty(handle, fe_bh);
 
-       dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       dir->i_ctime = dir->i_mtime = current_time(dir);
        if (S_ISDIR(inode->i_mode))
                drop_nlink(dir);
 
@@ -1541,7 +1541,7 @@ static int ocfs2_rename(struct inode *old_dir,
                                         new_dir_bh, &target_insert);
        }
 
-       old_inode->i_ctime = CURRENT_TIME;
+       old_inode->i_ctime = current_time(old_inode);
        mark_inode_dirty(old_inode);
 
        status = ocfs2_journal_access_di(handle, INODE_CACHE(old_inode),
@@ -1590,9 +1590,9 @@ static int ocfs2_rename(struct inode *old_dir,
 
        if (new_inode) {
                drop_nlink(new_inode);
-               new_inode->i_ctime = CURRENT_TIME;
+               new_inode->i_ctime = current_time(new_inode);
        }
-       old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
+       old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir);
 
        if (update_dot_dot) {
                status = ocfs2_update_entry(old_inode, handle,
index 92bbe93bfe1077332286d5a16fb5ea759c66c466..19238512a324ab3beef32fee2e2a0d675d0796f8 100644 (file)
@@ -3778,7 +3778,7 @@ static int ocfs2_change_ctime(struct inode *inode,
                goto out_commit;
        }
 
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
        di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
        di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
 
@@ -4094,7 +4094,7 @@ static int ocfs2_complete_reflink(struct inode *s_inode,
                 * we want mtime to appear identical to the source and
                 * update ctime.
                 */
-               t_inode->i_ctime = CURRENT_TIME;
+               t_inode->i_ctime = current_time(t_inode);
 
                di->i_ctime = cpu_to_le64(t_inode->i_ctime.tv_sec);
                di->i_ctime_nsec = cpu_to_le32(t_inode->i_ctime.tv_nsec);
index 5bb44f7a78ee812e2deacf76cd1a9d633705f709..cb157a34a65679dff7f298ddacbd4a5c217c35b2 100644 (file)
@@ -3431,7 +3431,7 @@ static int __ocfs2_xattr_set_handle(struct inode *inode,
                        goto out;
                }
 
-               inode->i_ctime = CURRENT_TIME;
+               inode->i_ctime = current_time(inode);
                di->i_ctime = cpu_to_le64(inode->i_ctime.tv_sec);
                di->i_ctime_nsec = cpu_to_le32(inode->i_ctime.tv_nsec);
                ocfs2_journal_dirty(ctxt->handle, xis->inode_bh);
index e81f06be5e7bd2262f767e6c22ab0e70e62bb4d2..b7146526afff303543a2ab11ecd78ab2949f770d 100644 (file)
@@ -143,7 +143,7 @@ static int omfs_add_link(struct dentry *dentry, struct inode *inode)
        mark_buffer_dirty(bh);
        brelse(bh);
 
-       dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_ctime = current_time(dir);
 
        /* mark affected inodes dirty to rebuild checksums */
        mark_inode_dirty(dir);
@@ -399,7 +399,7 @@ static int omfs_rename(struct inode *old_dir, struct dentry *old_dentry,
        if (err)
                goto out;
 
-       old_inode->i_ctime = CURRENT_TIME_SEC;
+       old_inode->i_ctime = current_time(old_inode);
        mark_inode_dirty(old_inode);
 out:
        return err;
index 3d935c81789aaab13e33e52fab88b408fbccd6f2..df7ea8543a2ef00e90010812c3d35e672608033d 100644 (file)
@@ -49,7 +49,7 @@ struct inode *omfs_new_inode(struct inode *dir, umode_t mode)
        inode_init_owner(inode, NULL, mode);
        inode->i_mapping->a_ops = &omfs_aops;
 
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        switch (mode & S_IFMT) {
        case S_IFDIR:
                inode->i_op = &omfs_dir_inops;
index c7a86993d97e3d3ee6c2d817659ee8809a616a80..c003a667ed1a626dddd9c831f355f783902c55d5 100644 (file)
@@ -355,7 +355,7 @@ static struct inode *openprom_iget(struct super_block *sb, ino_t ino)
        if (!inode)
                return ERR_PTR(-ENOMEM);
        if (inode->i_state & I_NEW) {
-               inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+               inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
                if (inode->i_ino == OPENPROM_ROOT_INO) {
                        inode->i_op = &openprom_inode_operations;
                        inode->i_fop = &openprom_operations;
index 526040e09f78746d3f0d8d275be6ce6217a861cd..e799bb4474f6c6c6921de103769b020d5a96c84f 100644 (file)
@@ -358,7 +358,7 @@ out:
                        file_accessed(file);
                } else {
                        SetMtimeFlag(orangefs_inode);
-                       inode->i_mtime = CURRENT_TIME;
+                       inode->i_mtime = current_time(inode);
                        mark_inode_dirty_sync(inode);
                }
        }
index 28a0557a69be8bc82795c2136d122f4da77ab2dc..113d928d1223c6b1c3eeacc7338c6c7f823b485f 100644 (file)
@@ -438,7 +438,7 @@ struct inode *orangefs_new_inode(struct super_block *sb, struct inode *dir,
        inode->i_mode = mode;
        inode->i_uid = current_fsuid();
        inode->i_gid = current_fsgid();
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        inode->i_size = PAGE_SIZE;
        inode->i_rdev = dev;
 
index 5f015c58bfa29efbe74f0c704c08d886b1d86096..0dfa868a6d037a286f8b68d97b0c5883bb2526a4 100644 (file)
@@ -81,7 +81,7 @@ static int orangefs_create(struct inode *dir,
                     dentry->d_name.name);
 
        SetMtimeFlag(parent);
-       dir->i_mtime = dir->i_ctime = current_fs_time(dir->i_sb);
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        mark_inode_dirty_sync(dir);
        ret = 0;
 out:
@@ -254,7 +254,7 @@ static int orangefs_unlink(struct inode *dir, struct dentry *dentry)
                drop_nlink(inode);
 
                SetMtimeFlag(parent);
-               dir->i_mtime = dir->i_ctime = current_fs_time(dir->i_sb);
+               dir->i_mtime = dir->i_ctime = current_time(dir);
                mark_inode_dirty_sync(dir);
        }
        return ret;
@@ -331,7 +331,7 @@ static int orangefs_symlink(struct inode *dir,
                     dentry->d_name.name);
 
        SetMtimeFlag(parent);
-       dir->i_mtime = dir->i_ctime = current_fs_time(dir->i_sb);
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        mark_inode_dirty_sync(dir);
        ret = 0;
 out:
@@ -399,7 +399,7 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
         * across clients; keep constant at 1.
         */
        SetMtimeFlag(parent);
-       dir->i_mtime = dir->i_ctime = current_fs_time(dir->i_sb);
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        mark_inode_dirty_sync(dir);
 out:
        op_release(new_op);
@@ -447,7 +447,7 @@ static int orangefs_rename(struct inode *old_dir,
                     ret);
 
        if (new_dentry->d_inode)
-               new_dentry->d_inode->i_ctime = CURRENT_TIME;
+               new_dentry->d_inode->i_ctime = current_time(new_dentry->d_inode);
 
        op_release(new_op);
        return ret;
index 4ebe6b2e5217c2e26c7185bcf4254d8af3b55872..5c7c8b7726b83586860168886e41b2b9fcacd4af 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -716,7 +716,7 @@ static struct inode * get_pipe_inode(void)
        inode->i_mode = S_IFIFO | S_IRUSR | S_IWUSR;
        inode->i_uid = current_fsuid();
        inode->i_gid = current_fsgid();
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
 
        return inode;
 
index 59d47ab0791af5ce96200c18ecaeee53800cd35a..ad0799c8b59b936addb3fc2fd575d291cfc63c28 100644 (file)
@@ -897,7 +897,7 @@ int simple_set_acl(struct inode *inode, struct posix_acl *acl, int type)
                        acl = NULL;
        }
 
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
        set_cached_acl(inode, type, acl);
        return 0;
 }
index ac0df4dde823866b54480c7062d5188887009365..029161d85355660d913e639a52bd8f23df2edd6f 100644 (file)
@@ -1664,7 +1664,7 @@ struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct *t
        /* Common stuff */
        ei = PROC_I(inode);
        inode->i_ino = get_next_ino();
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        inode->i_op = &proc_def_inode_operations;
 
        /*
index c1b72388e57115747790948a172312738997fb0a..e69ebe648a34bd69b1a0242fbdb5bb737edee2e9 100644 (file)
@@ -68,7 +68,6 @@ static struct inode *proc_alloc_inode(struct super_block *sb)
        ei->sysctl_entry = NULL;
        ei->ns_ops = NULL;
        inode = &ei->vfs_inode;
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
        return inode;
 }
 
@@ -421,7 +420,7 @@ struct inode *proc_get_inode(struct super_block *sb, struct proc_dir_entry *de)
 
        if (inode) {
                inode->i_ino = de->low_ino;
-               inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+               inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
                PROC_I(inode)->pde = de;
 
                if (is_empty_pde(de)) {
index 1b93650dda2fc5f51cb9c0d42c94efcc2f561a92..f9e2f7a31abd74bd10d864752c3c158de1cd5d60 100644 (file)
@@ -444,7 +444,7 @@ static struct inode *proc_sys_make_inode(struct super_block *sb,
        ei->sysctl = head;
        ei->sysctl_entry = table;
 
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        inode->i_mode = table->mode;
        if (!S_ISDIR(table->mode)) {
                inode->i_mode |= S_IFREG;
index b6a8d3529fea9714fb25d063e9505b198201e7ab..40245954c4501e838b15a00b68b7105ab9ab759a 100644 (file)
@@ -56,7 +56,7 @@ int proc_setup_self(struct super_block *s)
                struct inode *inode = new_inode_pseudo(s);
                if (inode) {
                        inode->i_ino = self_inum;
-                       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+                       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
                        inode->i_mode = S_IFLNK | S_IRWXUGO;
                        inode->i_uid = GLOBAL_ROOT_UID;
                        inode->i_gid = GLOBAL_ROOT_GID;
index e58a31e8fb2a186aaa2d3dee62811f090e2ade57..595b90a9766c98c93014418486397f0e508873f1 100644 (file)
@@ -58,7 +58,7 @@ int proc_setup_thread_self(struct super_block *s)
                struct inode *inode = new_inode_pseudo(s);
                if (inode) {
                        inode->i_ino = thread_self_inum;
-                       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
+                       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
                        inode->i_mode = S_IFLNK | S_IRWXUGO;
                        inode->i_uid = GLOBAL_ROOT_UID;
                        inode->i_gid = GLOBAL_ROOT_GID;
index ec9ddef5ae755d87ccd3359e49289e532f6a2d0f..1781dc50762e2fe03391e8efa8c0ff5577cd7cf6 100644 (file)
@@ -230,7 +230,7 @@ static struct inode *pstore_get_inode(struct super_block *sb)
        struct inode *inode = new_inode(sb);
        if (inode) {
                inode->i_ino = get_next_ino();
-               inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+               inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        }
        return inode;
 }
index 1ab6e6c2e60e72f14c3749cf4a3bff657b5b3244..8621c039b5365c9e422019ea33ca5848e454ed13 100644 (file)
@@ -61,7 +61,7 @@ struct inode *ramfs_get_inode(struct super_block *sb,
                inode->i_mapping->a_ops = &ramfs_aops;
                mapping_set_gfp_mask(inode->i_mapping, GFP_HIGHUSER);
                mapping_set_unevictable(inode->i_mapping);
-               inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+               inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
                switch (mode & S_IFMT) {
                default:
                        init_special_inode(inode, mode, dev);
@@ -100,7 +100,7 @@ ramfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
                d_instantiate(dentry, inode);
                dget(dentry);   /* Extra count - pin the dentry in core */
                error = 0;
-               dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+               dir->i_mtime = dir->i_ctime = current_time(dir);
        }
        return error;
 }
@@ -130,7 +130,7 @@ static int ramfs_symlink(struct inode * dir, struct dentry *dentry, const char *
                if (!error) {
                        d_instantiate(dentry, inode);
                        dget(dentry);
-                       dir->i_mtime = dir->i_ctime = CURRENT_TIME;
+                       dir->i_mtime = dir->i_ctime = current_time(dir);
                } else
                        iput(inode);
        }
index c2c59f9ff04beec2a71b28e30c9b0340df0ede6a..f0609c849510e83c8c49f27fe0b3135709ef5474 100644 (file)
@@ -2005,7 +2005,7 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
        if (S_ISLNK(inode->i_mode))
                inode->i_flags &= ~(S_IMMUTABLE | S_APPEND);
 
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        inode->i_size = i_size;
        inode->i_blocks = 0;
        inode->i_bytes = 0;
index 2f1ddc9080132f9fe9a08c66f1cd999913ee67be..1f4692a505a0c08af54f388d09a7fb9a2f0d75fd 100644 (file)
@@ -94,7 +94,7 @@ long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
                        }
                        sd_attrs_to_i_attrs(flags, inode);
                        REISERFS_I(inode)->i_attrs = flags;
-                       inode->i_ctime = CURRENT_TIME_SEC;
+                       inode->i_ctime = current_time(inode);
                        mark_inode_dirty(inode);
 setflags_out:
                        mnt_drop_write_file(filp);
@@ -115,7 +115,7 @@ setflags_out:
                        err = -EFAULT;
                        goto setversion_out;
                }
-               inode->i_ctime = CURRENT_TIME_SEC;
+               inode->i_ctime = current_time(inode);
                mark_inode_dirty(inode);
 setversion_out:
                mnt_drop_write_file(filp);
index 586260ed81c9e163b585e3a2f513f524c434be75..f9a0a2ba37830b9a34bf21a0e42ada262aad2804 100644 (file)
@@ -570,7 +570,7 @@ static int reiserfs_add_entry(struct reiserfs_transaction_handle *th,
        }
 
        dir->i_size += paste_size;
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        if (!S_ISDIR(inode->i_mode) && visible)
                /* reiserfs_mkdir or reiserfs_rename will do that by itself */
                reiserfs_update_sd(th, dir);
@@ -963,7 +963,7 @@ static int reiserfs_rmdir(struct inode *dir, struct dentry *dentry)
                               inode->i_nlink);
 
        clear_nlink(inode);
-       inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
+       inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(dir);
        reiserfs_update_sd(&th, inode);
 
        DEC_DIR_INODE_NLINK(dir)
@@ -1067,11 +1067,11 @@ static int reiserfs_unlink(struct inode *dir, struct dentry *dentry)
                inc_nlink(inode);
                goto end_unlink;
        }
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        reiserfs_update_sd(&th, inode);
 
        dir->i_size -= (de.de_entrylen + DEH_SIZE);
-       dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
+       dir->i_ctime = dir->i_mtime = current_time(dir);
        reiserfs_update_sd(&th, dir);
 
        if (!savelink)
@@ -1246,7 +1246,7 @@ static int reiserfs_link(struct dentry *old_dentry, struct inode *dir,
                return err ? err : retval;
        }
 
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        reiserfs_update_sd(&th, inode);
 
        ihold(inode);
@@ -1571,7 +1571,7 @@ static int reiserfs_rename(struct inode *old_dir, struct dentry *old_dentry,
 
        mark_de_hidden(old_de.de_deh + old_de.de_entry_num);
        journal_mark_dirty(&th, old_de.de_bh);
-       ctime = CURRENT_TIME_SEC;
+       ctime = current_time(old_dir);
        old_dir->i_ctime = old_dir->i_mtime = ctime;
        new_dir->i_ctime = new_dir->i_mtime = ctime;
        /*
index 4032d1e87c8fabc0db9dd327ebc3c4c748e53541..a97e352d05d3b5492b800ab280966d4a00911eab 100644 (file)
@@ -1987,8 +1987,8 @@ int reiserfs_do_truncate(struct reiserfs_transaction_handle *th,
                        pathrelse(&s_search_path);
 
                        if (update_timestamps) {
-                               inode->i_mtime = CURRENT_TIME_SEC;
-                               inode->i_ctime = CURRENT_TIME_SEC;
+                               inode->i_mtime = current_time(inode);
+                               inode->i_ctime = current_time(inode);
                        }
                        reiserfs_update_sd(th, inode);
 
@@ -2012,8 +2012,8 @@ int reiserfs_do_truncate(struct reiserfs_transaction_handle *th,
 update_and_out:
        if (update_timestamps) {
                /* this is truncate, not file closing */
-               inode->i_mtime = CURRENT_TIME_SEC;
-               inode->i_ctime = CURRENT_TIME_SEC;
+               inode->i_mtime = current_time(inode);
+               inode->i_ctime = current_time(inode);
        }
        reiserfs_update_sd(th, inode);
 
index 7a4a85a6821e721f463257c1891c8279ad8ba1ad..44edbf4d92aa96f6e4974b734518e00319094d06 100644 (file)
@@ -2512,7 +2512,7 @@ out:
        if (inode->i_size < off + len - towrite)
                i_size_write(inode, off + len - towrite);
        inode->i_version++;
-       inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_mtime = inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
        return len - towrite;
 }
index a33812ae9fad2e176222da0b14c0f86a65180cf8..e87aa21c30de055539b2858f97773d66fb6006f9 100644 (file)
@@ -450,13 +450,13 @@ int reiserfs_commit_write(struct file *f, struct page *page,
 
 static void update_ctime(struct inode *inode)
 {
-       struct timespec now = current_fs_time(inode->i_sb);
+       struct timespec now = current_time(inode);
 
        if (inode_unhashed(inode) || !inode->i_nlink ||
            timespec_equal(&inode->i_ctime, &now))
                return;
 
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
 }
 
@@ -575,7 +575,7 @@ reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *th,
        new_size = buffer_size + sizeof(struct reiserfs_xattr_header);
        if (!err && new_size < i_size_read(d_inode(dentry))) {
                struct iattr newattrs = {
-                       .ia_ctime = current_fs_time(inode->i_sb),
+                       .ia_ctime = current_time(inode),
                        .ia_size = new_size,
                        .ia_valid = ATTR_SIZE | ATTR_CTIME,
                };
index dbed42f755e01ff46518efb35e46a06036b1b52d..c6eaab0481d32b52d362dcae710c06b42d1dddc0 100644 (file)
@@ -277,7 +277,7 @@ __reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode,
        if (error == -ENODATA) {
                error = 0;
                if (type == ACL_TYPE_ACCESS) {
-                       inode->i_ctime = CURRENT_TIME_SEC;
+                       inode->i_ctime = current_time(inode);
                        mark_inode_dirty(inode);
                }
        }
index 2661b77fc8a79b18071088236382421bc2eb21b8..5bdae85ceef7d6ae9e7c560cb23e9bb1c09ea098 100644 (file)
@@ -215,7 +215,7 @@ got_it:
        memset (de->name + namelen, 0, SYSV_DIRSIZE - namelen - 2);
        de->inode = cpu_to_fs16(SYSV_SB(inode->i_sb), inode->i_ino);
        err = dir_commit_chunk(page, pos, SYSV_DIRSIZE);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        mark_inode_dirty(dir);
 out_page:
        dir_put_page(page);
@@ -239,7 +239,7 @@ int sysv_delete_entry(struct sysv_dir_entry *de, struct page *page)
        de->inode = 0;
        err = dir_commit_chunk(page, pos, SYSV_DIRSIZE);
        dir_put_page(page);
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
        mark_inode_dirty(inode);
        return err;
 }
@@ -337,7 +337,7 @@ void sysv_set_link(struct sysv_dir_entry *de, struct page *page,
        de->inode = cpu_to_fs16(SYSV_SB(inode->i_sb), inode->i_ino);
        err = dir_commit_chunk(page, pos, SYSV_DIRSIZE);
        dir_put_page(page);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
        mark_inode_dirty(dir);
 }
 
index f9db4eb31db4d64aeef36acd351ca02cfe8dd66b..53f1b78996dd476a9ca37e3d24428303ff905179 100644 (file)
@@ -164,7 +164,7 @@ struct inode * sysv_new_inode(const struct inode * dir, umode_t mode)
        dirty_sb(sb);
        inode_init_owner(inode, dir, mode);
        inode->i_ino = fs16_to_cpu(sbi, ino);
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        inode->i_blocks = 0;
        memset(SYSV_I(inode)->i_data, 0, sizeof(SYSV_I(inode)->i_data));
        SYSV_I(inode)->i_dir_start_lookup = 0;
index 2fde40acf024173b1f4fc68131ca97cb921588b0..08d3e630b49c8691fe24e9ce8d7294c370a7d067 100644 (file)
@@ -178,7 +178,7 @@ static inline int splice_branch(struct inode *inode,
        *where->p = where->key;
        write_unlock(&pointers_lock);
 
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
 
        /* had we spliced it onto indirect block? */
        if (where->bh)
@@ -418,7 +418,7 @@ do_indirects:
                }
                n++;
        }
-       inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_ctime = current_time(inode);
        if (IS_SYNC(inode))
                sysv_sync_inode (inode);
        else
index 30bf6780985a06b3ce0ce03675f5502e82a475ec..d8817f13976357232a21a1ead9577c68b8c4b117 100644 (file)
@@ -120,7 +120,7 @@ static int sysv_link(struct dentry * old_dentry, struct inode * dir,
 {
        struct inode *inode = d_inode(old_dentry);
 
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        inode_inc_link_count(inode);
        ihold(inode);
 
@@ -244,7 +244,7 @@ static int sysv_rename(struct inode * old_dir, struct dentry * old_dentry,
                if (!new_de)
                        goto out_dir;
                sysv_set_link(new_de, new_page, old_inode);
-               new_inode->i_ctime = CURRENT_TIME_SEC;
+               new_inode->i_ctime = current_time(new_inode);
                if (dir_de)
                        drop_nlink(new_inode);
                inode_dec_link_count(new_inode);
index ad40b64c5e2f4295688ec1b3522319b5d1b9b1b1..21d36d28473562d4a40f75134ae3916b11c8041c 100644 (file)
@@ -133,7 +133,7 @@ static struct inode *tracefs_get_inode(struct super_block *sb)
        struct inode *inode = new_inode(sb);
        if (inode) {
                inode->i_ino = get_next_ino();
-               inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+               inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        }
        return inode;
 }
index e77db621ec8985ad21878c45e970ebc3f23258cb..c1ed18a10ce41e46b542f28b6618932fef7f9a8d 100644 (file)
@@ -121,7 +121,7 @@ struct inode *udf_new_inode(struct inode *dir, umode_t mode)
        else
                iinfo->i_alloc_type = ICBTAG_FLAG_AD_LONG;
        inode->i_mtime = inode->i_atime = inode->i_ctime =
-               iinfo->i_crtime = current_fs_time(inode->i_sb);
+               iinfo->i_crtime = current_time(inode);
        if (unlikely(insert_inode_locked(inode) < 0)) {
                make_bad_inode(inode);
                iput(inode);
index 55aa587bbc385f162e71536b35d5e826808f3a8b..aad46401ede5d881053aac1cb64050adcda60204 100644 (file)
@@ -886,7 +886,7 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
        *new = 1;
        iinfo->i_next_alloc_block = block;
        iinfo->i_next_alloc_goal = newblocknum;
-       inode->i_ctime = current_fs_time(inode->i_sb);
+       inode->i_ctime = current_time(inode);
 
        if (IS_SYNC(inode))
                udf_sync_inode(inode);
@@ -1268,7 +1268,7 @@ set_size:
                up_write(&iinfo->i_data_sem);
        }
 update_time:
-       inode->i_mtime = inode->i_ctime = current_fs_time(inode->i_sb);
+       inode->i_mtime = inode->i_ctime = current_time(inode);
        if (IS_SYNC(inode))
                udf_sync_inode(inode);
        else
index 17e9d4af301097a7a69dabdd1ad0f9249c25c1b2..2d65e280748bb99f2c9e494142c7cf78587148d7 100644 (file)
@@ -616,7 +616,7 @@ static int udf_add_nondir(struct dentry *dentry, struct inode *inode)
        *(__le32 *)((struct allocDescImpUse *)cfi.icb.impUse)->impUse =
                cpu_to_le32(iinfo->i_unique & 0x00000000FFFFFFFFUL);
        udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL);
-       dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb);
+       dir->i_ctime = dir->i_mtime = current_time(dir);
        mark_inode_dirty(dir);
        if (fibh.sbh != fibh.ebh)
                brelse(fibh.ebh);
@@ -730,7 +730,7 @@ static int udf_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
        cfi.fileCharacteristics |= FID_FILE_CHAR_DIRECTORY;
        udf_write_fi(dir, &cfi, fi, &fibh, NULL, NULL);
        inc_nlink(dir);
-       dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb);
+       dir->i_ctime = dir->i_mtime = current_time(dir);
        mark_inode_dirty(dir);
        unlock_new_inode(inode);
        d_instantiate(dentry, inode);
@@ -845,7 +845,7 @@ static int udf_rmdir(struct inode *dir, struct dentry *dentry)
        inode->i_size = 0;
        inode_dec_link_count(dir);
        inode->i_ctime = dir->i_ctime = dir->i_mtime =
-                                               current_fs_time(dir->i_sb);
+                                               current_time(inode);
        mark_inode_dirty(dir);
 
 end_rmdir:
@@ -888,7 +888,7 @@ static int udf_unlink(struct inode *dir, struct dentry *dentry)
        retval = udf_delete_entry(dir, fi, &fibh, &cfi);
        if (retval)
                goto end_unlink;
-       dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb);
+       dir->i_ctime = dir->i_mtime = current_time(dir);
        mark_inode_dirty(dir);
        inode_dec_link_count(inode);
        inode->i_ctime = dir->i_ctime;
@@ -1079,9 +1079,9 @@ static int udf_link(struct dentry *old_dentry, struct inode *dir,
                brelse(fibh.ebh);
        brelse(fibh.sbh);
        inc_nlink(inode);
-       inode->i_ctime = current_fs_time(inode->i_sb);
+       inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
-       dir->i_ctime = dir->i_mtime = current_fs_time(dir->i_sb);
+       dir->i_ctime = dir->i_mtime = current_time(dir);
        mark_inode_dirty(dir);
        ihold(inode);
        d_instantiate(dentry, inode);
@@ -1176,7 +1176,7 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry,
         * Like most other Unix systems, set the ctime for inodes on a
         * rename.
         */
-       old_inode->i_ctime = current_fs_time(old_inode->i_sb);
+       old_inode->i_ctime = current_time(old_inode);
        mark_inode_dirty(old_inode);
 
        /*
@@ -1192,11 +1192,11 @@ static int udf_rename(struct inode *old_dir, struct dentry *old_dentry,
        udf_delete_entry(old_dir, ofi, &ofibh, &ocfi);
 
        if (new_inode) {
-               new_inode->i_ctime = current_fs_time(new_inode->i_sb);
+               new_inode->i_ctime = current_time(new_inode);
                inode_dec_link_count(new_inode);
        }
-       old_dir->i_ctime = old_dir->i_mtime = current_fs_time(old_dir->i_sb);
-       new_dir->i_ctime = new_dir->i_mtime = current_fs_time(new_dir->i_sb);
+       old_dir->i_ctime = old_dir->i_mtime = current_time(old_dir);
+       new_dir->i_ctime = new_dir->i_mtime = current_time(new_dir);
        mark_inode_dirty(old_dir);
        mark_inode_dirty(new_dir);
 
index fa3bda1a860fe124bfafe4c67e9bc6121eb3b0da..de01b8f2aa78b00cdb4360e142b24abc83fdae72 100644 (file)
@@ -100,7 +100,7 @@ void ufs_set_link(struct inode *dir, struct ufs_dir_entry *de,
        err = ufs_commit_chunk(page, pos, len);
        ufs_put_page(page);
        if (update_times)
-               dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+               dir->i_mtime = dir->i_ctime = current_time(dir);
        mark_inode_dirty(dir);
 }
 
@@ -389,7 +389,7 @@ got_it:
        ufs_set_de_type(sb, de, inode->i_mode);
 
        err = ufs_commit_chunk(page, pos, rec_len);
-       dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
+       dir->i_mtime = dir->i_ctime = current_time(dir);
 
        mark_inode_dirty(dir);
        /* OFFSET_CACHE */
@@ -530,7 +530,7 @@ int ufs_delete_entry(struct inode *inode, struct ufs_dir_entry *dir,
                pde->d_reclen = cpu_to_fs16(sb, to - from);
        dir->d_ino = 0;
        err = ufs_commit_chunk(page, pos, to - from);
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
        mark_inode_dirty(inode);
 out:
        ufs_put_page(page);
index fd0203ce1f7fde1595d463ef4ae67b8d9482cfcb..9774555b37217eba4c7fa5375e6df0c7cfa64ae8 100644 (file)
@@ -290,7 +290,7 @@ cg_found:
        inode_init_owner(inode, dir, mode);
        inode->i_blocks = 0;
        inode->i_generation = 0;
-       inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode);
        ufsi->i_flags = UFS_I(dir)->i_flags;
        ufsi->i_lastfrag = 0;
        ufsi->i_shadow = 0;
index 9f49431e798d6778f371eb482eed0c0390c250c4..edd3c0a58ed4f5790f6d9f95094e03c6a52abc0c 100644 (file)
@@ -293,7 +293,7 @@ ufs_inode_getfrag(struct inode *inode, unsigned index,
 
        if (new)
                *new = 1;
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        if (IS_SYNC(inode))
                ufs_sync_inode (inode);
        mark_inode_dirty(inode);
@@ -375,7 +375,7 @@ ufs_inode_getblock(struct inode *inode, u64 ind_block,
        mark_buffer_dirty(bh);
        if (IS_SYNC(inode))
                sync_dirty_buffer(bh);
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
 out:
        brelse (bh);
@@ -1185,7 +1185,7 @@ static int ufs_truncate(struct inode *inode, loff_t size)
        truncate_setsize(inode, size);
 
        __ufs_truncate_blocks(inode);
-       inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_mtime = inode->i_ctime = current_time(inode);
        mark_inode_dirty(inode);
 out:
        UFSD("EXIT: err %d\n", err);
index f2f11c382b6d40514320edb38e756c47a44c0b63..8eca4eda8450a1bec00f80ea30964ea5c51f8286 100644 (file)
@@ -153,7 +153,7 @@ static int ufs_link (struct dentry * old_dentry, struct inode * dir,
        struct inode *inode = d_inode(old_dentry);
        int error;
 
-       inode->i_ctime = CURRENT_TIME_SEC;
+       inode->i_ctime = current_time(inode);
        inode_inc_link_count(inode);
        ihold(inode);
 
@@ -283,7 +283,7 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry,
                if (!new_de)
                        goto out_dir;
                ufs_set_link(new_dir, new_de, new_page, old_inode, 1);
-               new_inode->i_ctime = CURRENT_TIME_SEC;
+               new_inode->i_ctime = current_time(new_inode);
                if (dir_de)
                        drop_nlink(new_inode);
                inode_dec_link_count(new_inode);
@@ -299,7 +299,7 @@ static int ufs_rename(struct inode *old_dir, struct dentry *old_dentry,
         * Like most other Unix systems, set the ctime for inodes on a
         * rename.
         */
-       old_inode->i_ctime = CURRENT_TIME_SEC;
+       old_inode->i_ctime = current_time(old_inode);
 
        ufs_delete_entry(old_dir, old_de, old_page);
        mark_inode_dirty(old_inode);
index b6e527b8eccb6d2917a9ef8a7938da902ed9b7c8..74f7c68105b9cd11bba357a5caefe0a3d707c9ec 100644 (file)
@@ -236,7 +236,7 @@ xfs_set_mode(struct inode *inode, umode_t mode)
 
                iattr.ia_valid = ATTR_MODE | ATTR_CTIME;
                iattr.ia_mode = mode;
-               iattr.ia_ctime = current_fs_time(inode->i_sb);
+               iattr.ia_ctime = current_time(inode);
 
                error = xfs_setattr_nonsize(XFS_I(inode), &iattr, XFS_ATTR_NOACL);
        }
index e08eaea6327b5c4752264c7a54996b75fd2e2447..020110b76a40390c7af82a942d34fd3b55cad480 100644 (file)
@@ -821,7 +821,7 @@ xfs_ialloc(
        ip->i_d.di_nextents = 0;
        ASSERT(ip->i_d.di_nblocks == 0);
 
-       tv = current_fs_time(mp->m_super);
+       tv = current_time(inode);
        inode->i_mtime = tv;
        inode->i_atime = tv;
        inode->i_ctime = tv;
index a66c781e5468176ff12808602c9c937b472137a1..d8ac28656ac2c58a6ddf99e564fa23f6fb2786fd 100644 (file)
@@ -882,7 +882,7 @@ xfs_setattr_size(
        if (newsize != oldsize &&
            !(iattr->ia_valid & (ATTR_CTIME | ATTR_MTIME))) {
                iattr->ia_ctime = iattr->ia_mtime =
-                       current_fs_time(inode->i_sb);
+                       current_time(inode);
                iattr->ia_valid |= ATTR_CTIME | ATTR_MTIME;
        }
 
index 11a3af08b5c7ea1e40dcd348606414e147e6a0cd..dab8daa676f943c5a26737211a336a4f9889d35a 100644 (file)
@@ -73,7 +73,7 @@ xfs_trans_ichgtime(
        ASSERT(tp);
        ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL));
 
-       tv = current_fs_time(inode->i_sb);
+       tv = current_time(inode);
 
        if (flags & XFS_ICHGTIME_MOD)
                inode->i_mtime = tv;
index cf7e621f7413aa4a38bcbed8f57b6d7a24a97cf0..17d5a3507d0e131743e8125601167da6d71ea823 100644 (file)
@@ -1459,6 +1459,7 @@ static inline void i_gid_write(struct inode *inode, gid_t gid)
 }
 
 extern struct timespec current_fs_time(struct super_block *sb);
+extern struct timespec current_time(struct inode *inode);
 
 /*
  * Snapshotting support.
index 0b13ace266f2d06ee423d8d0d42f9e1946de698a..8cbd6e6894d514d2078c4af3bcb4e77c68a73abf 100644 (file)
@@ -225,7 +225,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb,
        inode->i_mode = mode;
        inode->i_uid = current_fsuid();
        inode->i_gid = current_fsgid();
-       inode->i_mtime = inode->i_ctime = inode->i_atime = CURRENT_TIME;
+       inode->i_mtime = inode->i_ctime = inode->i_atime = current_time(inode);
 
        if (S_ISREG(mode)) {
                struct mqueue_inode_info *info;
@@ -446,7 +446,7 @@ static int mqueue_create(struct inode *dir, struct dentry *dentry,
 
        put_ipc_ns(ipc_ns);
        dir->i_size += DIRENT_SIZE;
-       dir->i_ctime = dir->i_mtime = dir->i_atime = CURRENT_TIME;
+       dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir);
 
        d_instantiate(dentry, inode);
        dget(dentry);
@@ -462,7 +462,7 @@ static int mqueue_unlink(struct inode *dir, struct dentry *dentry)
 {
        struct inode *inode = d_inode(dentry);
 
-       dir->i_ctime = dir->i_mtime = dir->i_atime = CURRENT_TIME;
+       dir->i_ctime = dir->i_mtime = dir->i_atime = current_time(dir);
        dir->i_size -= DIRENT_SIZE;
        drop_nlink(inode);
        dput(dentry);
@@ -500,7 +500,7 @@ static ssize_t mqueue_read_file(struct file *filp, char __user *u_data,
        if (ret <= 0)
                return ret;
 
-       file_inode(filp)->i_atime = file_inode(filp)->i_ctime = CURRENT_TIME;
+       file_inode(filp)->i_atime = file_inode(filp)->i_ctime = current_time(file_inode(filp));
        return ret;
 }
 
@@ -1060,7 +1060,7 @@ SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr,
                        __do_notify(info);
                }
                inode->i_atime = inode->i_mtime = inode->i_ctime =
-                               CURRENT_TIME;
+                               current_time(inode);
        }
 out_unlock:
        spin_unlock(&info->lock);
@@ -1156,7 +1156,7 @@ SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes, char __user *, u_msg_ptr,
                msg_ptr = msg_get(info);
 
                inode->i_atime = inode->i_mtime = inode->i_ctime =
-                               CURRENT_TIME;
+                               current_time(inode);
 
                /* There is now free space in queue. */
                pipelined_receive(&wake_q, info);
@@ -1277,7 +1277,7 @@ retry:
        if (u_notification == NULL) {
                if (info->notify_owner == task_tgid(current)) {
                        remove_notification(info);
-                       inode->i_atime = inode->i_ctime = CURRENT_TIME;
+                       inode->i_atime = inode->i_ctime = current_time(inode);
                }
        } else if (info->notify_owner != NULL) {
                ret = -EBUSY;
@@ -1302,7 +1302,7 @@ retry:
 
                info->notify_owner = get_pid(task_tgid(current));
                info->notify_user_ns = get_user_ns(current_user_ns());
-               inode->i_atime = inode->i_ctime = CURRENT_TIME;
+               inode->i_atime = inode->i_ctime = current_time(inode);
        }
        spin_unlock(&info->lock);
 out_fput:
@@ -1359,7 +1359,7 @@ SYSCALL_DEFINE3(mq_getsetattr, mqd_t, mqdes,
                        f.file->f_flags &= ~O_NONBLOCK;
                spin_unlock(&f.file->f_lock);
 
-               inode->i_atime = inode->i_ctime = CURRENT_TIME;
+               inode->i_atime = inode->i_ctime = current_time(inode);
        }
 
        spin_unlock(&info->lock);
index 5967b870a895b2fb4c3882abe10132bc903d7fd4..1ed8473ec537c5aa13feb483c0fc44d2b6ad35ad 100644 (file)
@@ -97,7 +97,7 @@ static struct inode *bpf_get_inode(struct super_block *sb,
                return ERR_PTR(-ENOSPC);
 
        inode->i_ino = get_next_ino();
-       inode->i_atime = CURRENT_TIME;
+       inode->i_atime = current_time(inode);
        inode->i_mtime = inode->i_atime;
        inode->i_ctime = inode->i_atime;
 
index efbef23366051ae90f9a056871b08f24a2cfa020..e7e8f8c210c101e04cb00976f1db3a110cf87eaf 100644 (file)
@@ -934,7 +934,7 @@ static void shmem_undo_range(struct inode *inode, loff_t lstart, loff_t lend,
 void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend)
 {
        shmem_undo_range(inode, lstart, lend, false);
-       inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+       inode->i_ctime = inode->i_mtime = current_time(inode);
 }
 EXPORT_SYMBOL_GPL(shmem_truncate_range);
 
@@ -979,7 +979,7 @@ static int shmem_setattr(struct dentry *dentry, struct iattr *attr)
                        if (error)
                                return error;
                        i_size_write(inode, newsize);
-                       inode->i_ctime = inode->i_mtime = CURRENT_TIME;
+                       inode->i_ctime = inode->i_mtime = current_time(inode);
                }
                if (newsize <= oldsize) {
                        loff_t holebegin = round_up(newsize, PAGE_SIZE);
@@ -2083,7 +2083,7 @@ static struct inode *shmem_get_inode(struct super_block *sb, const struct inode
                inode->i_ino = get_next_ino();
                inode_init_owner(inode, dir, mode);
                inode->i_blocks = 0;
-               inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+               inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
                inode->i_generation = get_seconds();
                info = SHMEM_I(inode);
                memset(info, 0, (char *)inode - (char *)info);
@@ -2854,7 +2854,7 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset,
 
        if (!(mode & FALLOC_FL_KEEP_SIZE) && offset + len > inode->i_size)
                i_size_write(inode, offset + len);
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(inode);
 undone:
        spin_lock(&inode->i_lock);
        inode->i_private = NULL;
@@ -2907,7 +2907,7 @@ shmem_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t dev)
 
                error = 0;
                dir->i_size += BOGO_DIRENT_SIZE;
-               dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+               dir->i_ctime = dir->i_mtime = current_time(dir);
                d_instantiate(dentry, inode);
                dget(dentry); /* Extra count - pin the dentry in core */
        }
@@ -2975,7 +2975,7 @@ static int shmem_link(struct dentry *old_dentry, struct inode *dir, struct dentr
                goto out;
 
        dir->i_size += BOGO_DIRENT_SIZE;
-       inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
        inc_nlink(inode);
        ihold(inode);   /* New dentry reference */
        dget(dentry);           /* Extra pinning count for the created dentry */
@@ -2992,7 +2992,7 @@ static int shmem_unlink(struct inode *dir, struct dentry *dentry)
                shmem_free_inode(inode->i_sb);
 
        dir->i_size -= BOGO_DIRENT_SIZE;
-       inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
        drop_nlink(inode);
        dput(dentry);   /* Undo the count from "create" - this does all the work */
        return 0;
@@ -3025,7 +3025,7 @@ static int shmem_exchange(struct inode *old_dir, struct dentry *old_dentry, stru
        old_dir->i_ctime = old_dir->i_mtime =
        new_dir->i_ctime = new_dir->i_mtime =
        d_inode(old_dentry)->i_ctime =
-       d_inode(new_dentry)->i_ctime = CURRENT_TIME;
+       d_inode(new_dentry)->i_ctime = current_time(old_dir);
 
        return 0;
 }
@@ -3099,7 +3099,7 @@ static int shmem_rename2(struct inode *old_dir, struct dentry *old_dentry, struc
        new_dir->i_size += BOGO_DIRENT_SIZE;
        old_dir->i_ctime = old_dir->i_mtime =
        new_dir->i_ctime = new_dir->i_mtime =
-       inode->i_ctime = CURRENT_TIME;
+       inode->i_ctime = current_time(old_dir);
        return 0;
 }
 
@@ -3154,7 +3154,7 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
                put_page(page);
        }
        dir->i_size += BOGO_DIRENT_SIZE;
-       dir->i_ctime = dir->i_mtime = CURRENT_TIME;
+       dir->i_ctime = dir->i_mtime = current_time(dir);
        d_instantiate(dentry, inode);
        dget(dentry);
        return 0;
index 84f98cbe31c3cf4ce4b19a2ca9e47f6d69783116..61a504fb1ae2556c02c831b37ba9e3f598530426 100644 (file)
@@ -477,7 +477,7 @@ rpc_get_inode(struct super_block *sb, umode_t mode)
                return NULL;
        inode->i_ino = get_next_ino();
        inode->i_mode = mode;
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        switch (mode & S_IFMT) {
        case S_IFDIR:
                inode->i_fop = &simple_dir_operations;
index 729e595119eded446298c84386dd4ba1511aafd1..5923d5665209df45ef37e116f147f9cac2f846d3 100644 (file)
@@ -381,7 +381,7 @@ void __aa_fs_profile_migrate_dents(struct aa_profile *old,
        for (i = 0; i < AAFS_PROF_SIZEOF; i++) {
                new->dents[i] = old->dents[i];
                if (new->dents[i])
-                       new->dents[i]->d_inode->i_mtime = CURRENT_TIME;
+                       new->dents[i]->d_inode->i_mtime = current_time(new->dents[i]->d_inode);
                old->dents[i] = NULL;
        }
 }
index e3df905ab5b163fc4d423c8c7dff6d9609c63ba7..9cb979d2b01331535a90c2e804696123aba4b56f 100644 (file)
@@ -117,7 +117,7 @@ struct dentry *securityfs_create_file(const char *name, umode_t mode,
 
        inode->i_ino = get_next_ino();
        inode->i_mode = mode;
-       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
+       inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
        inode->i_private = data;
        if (is_dir) {
                inode->i_op = &simple_dir_inode_operations;
index 0765c5b053b52ce44819292acbef59319ffe8a6f..72c145dd799f175c09b98a9e6c9fa52fca4009b5 100644 (file)
@@ -1089,7 +1089,7 @@ static struct inode *sel_make_inode(struct super_block *sb, int mode)
 
        if (ret) {
                ret->i_mode = mode;
-               ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME;
+               ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret);
        }
        return ret;
 }