diff options
author | Roman Zippel <zippel@linux-m68k.org> | 2006-01-18 20:43:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-18 22:20:23 -0500 |
commit | 9a4cad95c9338077487226e22d4e01bc9edebf21 (patch) | |
tree | 7153b1e890ab17910935494c433c23eb9cf94014 /fs/hfsplus/inode.c | |
parent | 2179d372d9f8b5fc5c189c89bc6a565a42151b23 (diff) |
[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/inode.c')
-rw-r--r-- | fs/hfsplus/inode.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c index 182eb3177975..12ed2b7d046b 100644 --- a/fs/hfsplus/inode.c +++ b/fs/hfsplus/inode.c | |||
@@ -431,7 +431,8 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd) | |||
431 | inode->i_size = 2 + be32_to_cpu(folder->valence); | 431 | inode->i_size = 2 + be32_to_cpu(folder->valence); |
432 | inode->i_atime = hfsp_mt2ut(folder->access_date); | 432 | inode->i_atime = hfsp_mt2ut(folder->access_date); |
433 | inode->i_mtime = hfsp_mt2ut(folder->content_mod_date); | 433 | inode->i_mtime = hfsp_mt2ut(folder->content_mod_date); |
434 | inode->i_ctime = inode->i_mtime; | 434 | inode->i_ctime = hfsp_mt2ut(folder->attribute_mod_date); |
435 | HFSPLUS_I(inode).create_date = folder->create_date; | ||
435 | HFSPLUS_I(inode).fs_blocks = 0; | 436 | HFSPLUS_I(inode).fs_blocks = 0; |
436 | inode->i_op = &hfsplus_dir_inode_operations; | 437 | inode->i_op = &hfsplus_dir_inode_operations; |
437 | inode->i_fop = &hfsplus_dir_operations; | 438 | inode->i_fop = &hfsplus_dir_operations; |
@@ -462,7 +463,8 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd) | |||
462 | } | 463 | } |
463 | inode->i_atime = hfsp_mt2ut(file->access_date); | 464 | inode->i_atime = hfsp_mt2ut(file->access_date); |
464 | inode->i_mtime = hfsp_mt2ut(file->content_mod_date); | 465 | inode->i_mtime = hfsp_mt2ut(file->content_mod_date); |
465 | inode->i_ctime = inode->i_mtime; | 466 | inode->i_ctime = hfsp_mt2ut(file->attribute_mod_date); |
467 | HFSPLUS_I(inode).create_date = file->create_date; | ||
466 | } else { | 468 | } else { |
467 | printk(KERN_ERR "hfs: bad catalog entry used to create inode\n"); | 469 | printk(KERN_ERR "hfs: bad catalog entry used to create inode\n"); |
468 | res = -EIO; | 470 | res = -EIO; |