jffs2: use 64-bit intermediate timestamps
[linux-2.6-block.git] / fs / jffs2 / dir.c
index e5a6deb38e1e1be47803250b3de5d115ce5c7e88..f20cff1194bb665c4740d5af992af242105f0532 100644 (file)
@@ -227,7 +227,7 @@ static int jffs2_unlink(struct inode *dir_i, struct dentry *dentry)
        struct jffs2_inode_info *dir_f = JFFS2_INODE_INFO(dir_i);
        struct jffs2_inode_info *dead_f = JFFS2_INODE_INFO(d_inode(dentry));
        int ret;
-       uint32_t now = get_seconds();
+       uint32_t now = JFFS2_NOW();
 
        ret = jffs2_do_unlink(c, dir_f, dentry->d_name.name,
                              dentry->d_name.len, dead_f, now);
@@ -260,7 +260,7 @@ static int jffs2_link (struct dentry *old_dentry, struct inode *dir_i, struct de
        type = (d_inode(old_dentry)->i_mode & S_IFMT) >> 12;
        if (!type) type = DT_REG;
 
-       now = get_seconds();
+       now = JFFS2_NOW();
        ret = jffs2_do_link(c, dir_f, f->inocache->ino, type, dentry->d_name.name, dentry->d_name.len, now);
 
        if (!ret) {
@@ -400,7 +400,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
        rd->pino = cpu_to_je32(dir_i->i_ino);
        rd->version = cpu_to_je32(++dir_f->highest_version);
        rd->ino = cpu_to_je32(inode->i_ino);
-       rd->mctime = cpu_to_je32(get_seconds());
+       rd->mctime = cpu_to_je32(JFFS2_NOW());
        rd->nsize = namelen;
        rd->type = DT_LNK;
        rd->node_crc = cpu_to_je32(crc32(0, rd, sizeof(*rd)-8));
@@ -543,7 +543,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, umode_t mode
        rd->pino = cpu_to_je32(dir_i->i_ino);
        rd->version = cpu_to_je32(++dir_f->highest_version);
        rd->ino = cpu_to_je32(inode->i_ino);
-       rd->mctime = cpu_to_je32(get_seconds());
+       rd->mctime = cpu_to_je32(JFFS2_NOW());
        rd->nsize = namelen;
        rd->type = DT_DIR;
        rd->node_crc = cpu_to_je32(crc32(0, rd, sizeof(*rd)-8));
@@ -588,7 +588,7 @@ static int jffs2_rmdir (struct inode *dir_i, struct dentry *dentry)
        struct jffs2_inode_info *f = JFFS2_INODE_INFO(d_inode(dentry));
        struct jffs2_full_dirent *fd;
        int ret;
-       uint32_t now = get_seconds();
+       uint32_t now = JFFS2_NOW();
 
        for (fd = f->dents ; fd; fd = fd->next) {
                if (fd->ino)
@@ -712,7 +712,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, umode_t mode
        rd->pino = cpu_to_je32(dir_i->i_ino);
        rd->version = cpu_to_je32(++dir_f->highest_version);
        rd->ino = cpu_to_je32(inode->i_ino);
-       rd->mctime = cpu_to_je32(get_seconds());
+       rd->mctime = cpu_to_je32(JFFS2_NOW());
        rd->nsize = namelen;
 
        /* XXX: This is ugly. */
@@ -797,7 +797,7 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
        type = (d_inode(old_dentry)->i_mode & S_IFMT) >> 12;
        if (!type) type = DT_REG;
 
-       now = get_seconds();
+       now = JFFS2_NOW();
        ret = jffs2_do_link(c, JFFS2_INODE_INFO(new_dir_i),
                            d_inode(old_dentry)->i_ino, type,
                            new_dentry->d_name.name, new_dentry->d_name.len, now);