From af8c85bb6d4e5352551277edd8448c4dfb2328ab Mon Sep 17 00:00:00 2001 From: Roman Zippel Date: Wed, 18 Jan 2006 17:43:10 -0800 Subject: [PATCH] hfs: set correct create date for links HFS+ also requires the correct creation date so recent version of OS X recognize it as link. Improve link handling: - if something is wrong with the link, ignore the link attribute and treat it as regular file (this also fixes a missing unlock during lookup). - check for incorrect link counts during unlink. Signed-off-by: Roman Zippel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/hfsplus/catalog.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/hfsplus/catalog.c') diff --git a/fs/hfsplus/catalog.c b/fs/hfsplus/catalog.c index 04255af34709..04058c8096d1 100644 --- a/fs/hfsplus/catalog.c +++ b/fs/hfsplus/catalog.c @@ -127,6 +127,7 @@ static int hfsplus_cat_build_record(hfsplus_cat_entry *entry, u32 cnid, struct i file->user_info.fdType = cpu_to_be32(HFSP_HARDLINK_TYPE); file->user_info.fdCreator = cpu_to_be32(HFSP_HFSPLUS_CREATOR); file->user_info.fdFlags = cpu_to_be16(0x100); + file->create_date = HFSPLUS_I(HFSPLUS_SB(inode->i_sb).hidden_dir).create_date; file->permissions.dev = cpu_to_be32(HFSPLUS_I(inode).dev); } return sizeof(*file); -- cgit v1.2.3-59-g8ed1b