summaryrefslogtreecommitdiffstats
path: root/fs/jffs2/write.c
diff options
context:
space:
mode:
authorArtem B. Bityutskiy <dedekind@infradead.org>2005-08-17 14:46:26 +0100
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-11-06 20:25:59 +0100
commit3a69e0cd22cf34920508a4032d53e41251925f53 (patch)
treef6f862aa743e3de98e348c20d84a26772da06195 /fs/jffs2/write.c
parent01d445f89d68187c9ada7b58ca939dbb987c9fbd (diff)
downloadlinux-3a69e0cd22cf34920508a4032d53e41251925f53.tar.gz
linux-3a69e0cd22cf34920508a4032d53e41251925f53.tar.bz2
linux-3a69e0cd22cf34920508a4032d53e41251925f53.zip
[JFFS2] Fix JFFS2 [mc]time handling
From: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Artem B. Bityutskiy <dedekind@infradead.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/jffs2/write.c')
-rw-r--r--fs/jffs2/write.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c
index 4c418e69cfc6..0a194759bbbd 100644
--- a/fs/jffs2/write.c
+++ b/fs/jffs2/write.c
@@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
- * $Id: write.c,v 1.94 2005/07/20 15:50:51 dedekind Exp $
+ * $Id: write.c,v 1.95 2005/08/17 13:46:23 dedekind Exp $
*
*/
@@ -533,7 +533,8 @@ int jffs2_do_create(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, str
int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
- const char *name, int namelen, struct jffs2_inode_info *dead_f)
+ const char *name, int namelen, struct jffs2_inode_info *dead_f,
+ uint32_t time)
{
struct jffs2_raw_dirent *rd;
struct jffs2_full_dirent *fd;
@@ -565,7 +566,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
rd->pino = cpu_to_je32(dir_f->inocache->ino);
rd->version = cpu_to_je32(++dir_f->highest_version);
rd->ino = cpu_to_je32(0);
- rd->mctime = cpu_to_je32(get_seconds());
+ rd->mctime = cpu_to_je32(time);
rd->nsize = namelen;
rd->type = DT_UNKNOWN;
rd->node_crc = cpu_to_je32(crc32(0, rd, sizeof(*rd)-8));
@@ -646,7 +647,7 @@ int jffs2_do_unlink(struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f,
}
-int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint32_t ino, uint8_t type, const char *name, int namelen)
+int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint32_t ino, uint8_t type, const char *name, int namelen, uint32_t time)
{
struct jffs2_raw_dirent *rd;
struct jffs2_full_dirent *fd;
@@ -674,7 +675,7 @@ int jffs2_do_link (struct jffs2_sb_info *c, struct jffs2_inode_info *dir_f, uint
rd->pino = cpu_to_je32(dir_f->inocache->ino);
rd->version = cpu_to_je32(++dir_f->highest_version);
rd->ino = cpu_to_je32(ino);
- rd->mctime = cpu_to_je32(get_seconds());
+ rd->mctime = cpu_to_je32(time);
rd->nsize = namelen;
rd->type = type;