From a8cb74daa4fde54e32c79a5843165ed50be5bf58 Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Wed, 18 Jan 2006 17:43:09 -0800 Subject: [PATCH] --- yaml --- r: 18940 b: refs/heads/master c: 9a4cad95c9338077487226e22d4e01bc9edebf21 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/hfsplus/catalog.c | 14 ++++++++++---- trunk/fs/hfsplus/hfsplus_fs.h | 1 + trunk/fs/hfsplus/inode.c | 6 ++++-- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index e457476e6258..07e13dc2fa2d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2179d372d9f8b5fc5c189c89bc6a565a42151b23 +refs/heads/master: 9a4cad95c9338077487226e22d4e01bc9edebf21 diff --git a/trunk/fs/hfsplus/catalog.c b/trunk/fs/hfsplus/catalog.c index 662d176856d8..04255af34709 100644 --- a/trunk/fs/hfsplus/catalog.c +++ b/trunk/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); diff --git a/trunk/fs/hfsplus/hfsplus_fs.h b/trunk/fs/hfsplus/hfsplus_fs.h index 4608171f45d3..7ae393637a0c 100644 --- a/trunk/fs/hfsplus/hfsplus_fs.h +++ b/trunk/fs/hfsplus/hfsplus_fs.h @@ -166,6 +166,7 @@ struct hfsplus_inode_info { struct inode *rsrc_inode; unsigned long flags; + __be32 create_date; /* Device number in hfsplus_permissions in catalog */ u32 dev; /* BSD system and user file flags */ diff --git a/trunk/fs/hfsplus/inode.c b/trunk/fs/hfsplus/inode.c index 182eb3177975..12ed2b7d046b 100644 --- a/trunk/fs/hfsplus/inode.c +++ b/trunk/fs/hfsplus/inode.c @@ -431,7 +431,8 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd) inode->i_size = 2 + be32_to_cpu(folder->valence); inode->i_atime = hfsp_mt2ut(folder->access_date); inode->i_mtime = hfsp_mt2ut(folder->content_mod_date); - inode->i_ctime = inode->i_mtime; + inode->i_ctime = hfsp_mt2ut(folder->attribute_mod_date); + HFSPLUS_I(inode).create_date = folder->create_date; HFSPLUS_I(inode).fs_blocks = 0; inode->i_op = &hfsplus_dir_inode_operations; inode->i_fop = &hfsplus_dir_operations; @@ -462,7 +463,8 @@ int hfsplus_cat_read_inode(struct inode *inode, struct hfs_find_data *fd) } inode->i_atime = hfsp_mt2ut(file->access_date); inode->i_mtime = hfsp_mt2ut(file->content_mod_date); - inode->i_ctime = inode->i_mtime; + inode->i_ctime = hfsp_mt2ut(file->attribute_mod_date); + HFSPLUS_I(inode).create_date = file->create_date; } else { printk(KERN_ERR "hfs: bad catalog entry used to create inode\n"); res = -EIO;