|
@@ -201,7 +201,7 @@ static int jffs2_create(struct inode *dir_i, struct dentry *dentry,
|
|
|
if (ret)
|
|
|
goto fail;
|
|
|
|
|
|
- dir_i->i_mtime = dir_i->i_ctime = timespec_to_timespec64(ITIME(je32_to_cpu(ri->ctime)));
|
|
|
+ dir_i->i_mtime = dir_i->i_ctime = ITIME(je32_to_cpu(ri->ctime));
|
|
|
|
|
|
jffs2_free_raw_inode(ri);
|
|
|
|
|
@@ -227,14 +227,14 @@ 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);
|
|
|
if (dead_f->inocache)
|
|
|
set_nlink(d_inode(dentry), dead_f->inocache->pino_nlink);
|
|
|
if (!ret)
|
|
|
- dir_i->i_mtime = dir_i->i_ctime = timespec_to_timespec64(ITIME(now));
|
|
|
+ dir_i->i_mtime = dir_i->i_ctime = ITIME(now);
|
|
|
return ret;
|
|
|
}
|
|
|
/***********************************************************************/
|
|
@@ -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) {
|
|
@@ -268,7 +268,7 @@ static int jffs2_link (struct dentry *old_dentry, struct inode *dir_i, struct de
|
|
|
set_nlink(d_inode(old_dentry), ++f->inocache->pino_nlink);
|
|
|
mutex_unlock(&f->sem);
|
|
|
d_instantiate(dentry, d_inode(old_dentry));
|
|
|
- dir_i->i_mtime = dir_i->i_ctime = timespec_to_timespec64(ITIME(now));
|
|
|
+ dir_i->i_mtime = dir_i->i_ctime = ITIME(now);
|
|
|
ihold(d_inode(old_dentry));
|
|
|
}
|
|
|
return 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));
|
|
@@ -418,7 +418,7 @@ static int jffs2_symlink (struct inode *dir_i, struct dentry *dentry, const char
|
|
|
goto fail;
|
|
|
}
|
|
|
|
|
|
- dir_i->i_mtime = dir_i->i_ctime = timespec_to_timespec64(ITIME(je32_to_cpu(rd->mctime)));
|
|
|
+ dir_i->i_mtime = dir_i->i_ctime = ITIME(je32_to_cpu(rd->mctime));
|
|
|
|
|
|
jffs2_free_raw_dirent(rd);
|
|
|
|
|
@@ -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));
|
|
@@ -561,7 +561,7 @@ static int jffs2_mkdir (struct inode *dir_i, struct dentry *dentry, umode_t mode
|
|
|
goto fail;
|
|
|
}
|
|
|
|
|
|
- dir_i->i_mtime = dir_i->i_ctime = timespec_to_timespec64(ITIME(je32_to_cpu(rd->mctime)));
|
|
|
+ dir_i->i_mtime = dir_i->i_ctime = ITIME(je32_to_cpu(rd->mctime));
|
|
|
inc_nlink(dir_i);
|
|
|
|
|
|
jffs2_free_raw_dirent(rd);
|
|
@@ -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)
|
|
@@ -598,7 +598,7 @@ static int jffs2_rmdir (struct inode *dir_i, struct dentry *dentry)
|
|
|
ret = jffs2_do_unlink(c, dir_f, dentry->d_name.name,
|
|
|
dentry->d_name.len, f, now);
|
|
|
if (!ret) {
|
|
|
- dir_i->i_mtime = dir_i->i_ctime = timespec_to_timespec64(ITIME(now));
|
|
|
+ dir_i->i_mtime = dir_i->i_ctime = ITIME(now);
|
|
|
clear_nlink(d_inode(dentry));
|
|
|
drop_nlink(dir_i);
|
|
|
}
|
|
@@ -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. */
|
|
@@ -733,7 +733,7 @@ static int jffs2_mknod (struct inode *dir_i, struct dentry *dentry, umode_t mode
|
|
|
goto fail;
|
|
|
}
|
|
|
|
|
|
- dir_i->i_mtime = dir_i->i_ctime = timespec_to_timespec64(ITIME(je32_to_cpu(rd->mctime)));
|
|
|
+ dir_i->i_mtime = dir_i->i_ctime = ITIME(je32_to_cpu(rd->mctime));
|
|
|
|
|
|
jffs2_free_raw_dirent(rd);
|
|
|
|
|
@@ -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);
|
|
@@ -853,14 +853,14 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry,
|
|
|
* caller won't do it on its own since we are returning an error.
|
|
|
*/
|
|
|
d_invalidate(new_dentry);
|
|
|
- new_dir_i->i_mtime = new_dir_i->i_ctime = timespec_to_timespec64(ITIME(now));
|
|
|
+ new_dir_i->i_mtime = new_dir_i->i_ctime = ITIME(now);
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
if (d_is_dir(old_dentry))
|
|
|
drop_nlink(old_dir_i);
|
|
|
|
|
|
- new_dir_i->i_mtime = new_dir_i->i_ctime = old_dir_i->i_mtime = old_dir_i->i_ctime = timespec_to_timespec64(ITIME(now));
|
|
|
+ new_dir_i->i_mtime = new_dir_i->i_ctime = old_dir_i->i_mtime = old_dir_i->i_ctime = ITIME(now);
|
|
|
|
|
|
return 0;
|
|
|
}
|