yaffs: Fix current time setting
authorCharles Manning <cdhmanning@gmail.com>
Thu, 2 Dec 2010 19:24:45 +0000 (08:24 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Thu, 2 Dec 2010 19:24:45 +0000 (08:24 +1300)
As pointed out by Marcin Slusarz, the current time was not being
set correctly.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
yaffs_attribs.c

index aaf4685..241c08a 100644 (file)
@@ -39,9 +39,9 @@ void yaffs_load_current_time(struct yaffs_obj *obj, int do_a, int do_c)
 {
        obj->yst_mtime = Y_CURRENT_TIME;
        if (do_a)
-               obj->yst_atime = obj->yst_atime;
+               obj->yst_atime = obj->yst_mtime;
        if (do_c)
-               obj->yst_ctime = obj->yst_atime;
+               obj->yst_ctime = obj->yst_mtime;
 }
 
 void yaffs_attribs_init(struct yaffs_obj *obj, u32 gid, u32 uid, u32 rdev)