summaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/catalog.c
diff options
context:
space:
mode:
authorRoman Zippel2006-01-19 02:43:09 +0100
committerLinus Torvalds2006-01-19 04:20:23 +0100
commit9a4cad95c9338077487226e22d4e01bc9edebf21 (patch)
tree7153b1e890ab17910935494c433c23eb9cf94014 /fs/hfsplus/catalog.c
parent[PATCH] hfs: add HFSX support (diff)
downloadkernel-qcow2-linux-9a4cad95c9338077487226e22d4e01bc9edebf21.tar.gz
kernel-qcow2-linux-9a4cad95c9338077487226e22d4e01bc9edebf21.tar.xz
kernel-qcow2-linux-9a4cad95c9338077487226e22d4e01bc9edebf21.zip
[PATCH] hfs: set correct ctime
Read the correct ctime from disk (it was written but never read for some reason). Read also creation date, which is used in the next patch. (Problem found by Olivier Castan <olivier.castan@certa.ssi.gouv.fr>) Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/hfsplus/catalog.c')
-rw-r--r--fs/hfsplus/catalog.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c
index 662d176856d8..04255af34709 100644
--- a/fs/hfsplus/catalog.c
+++ b/fs/hfsplus/catalog.c
@@ -94,8 +94,11 @@ static int hfsplus_cat_build_record(hfsplus_cat_entry *entry, u32 cnid, struct i
memset(folder, 0, sizeof(*folder));
folder->type = cpu_to_be16(HFSPLUS_FOLDER);
folder->id = cpu_to_be32(inode->i_ino);
- folder->create_date = folder->content_mod_date =
- folder->attribute_mod_date = folder->access_date = hfsp_now2mt();
+ HFSPLUS_I(inode).create_date =
+ folder->create_date =
+ folder->content_mod_date =
+ folder->attribute_mod_date =
+ folder->access_date = hfsp_now2mt();
hfsplus_set_perms(inode, &folder->permissions);
if (inode == HFSPLUS_SB(inode->i_sb).hidden_dir)
/* invisible and namelocked */
@@ -109,8 +112,11 @@ static int hfsplus_cat_build_record(hfsplus_cat_entry *entry, u32 cnid, struct i
file->type = cpu_to_be16(HFSPLUS_FILE);
file->flags = cpu_to_be16(HFSPLUS_FILE_THREAD_EXISTS);
file->id = cpu_to_be32(cnid);
- file->create_date = file->content_mod_date =
- file->attribute_mod_date = file->access_date = hfsp_now2mt();
+ HFSPLUS_I(inode).create_date =
+ file->create_date =
+ file->content_mod_date =
+ file->attribute_mod_date =
+ file->access_date = hfsp_now2mt();
if (cnid == inode->i_ino) {
hfsplus_set_perms(inode, &file->permissions);
file->user_info.fdType = cpu_to_be32(HFSPLUS_SB(inode->i_sb).type);