alistair23-linux/fs/hfsplus
Christoph Hellwig f6089ff87d hfsplus: fix link corruption
HFS implements hardlink by using indirect catalog entries that refer to a hidden
directly.  The link target is cached in the dev field in the HFS+ specific
inode, which is also used for the device number for device files, and inside
for passing the nlink value of the indirect node from hfsplus_cat_write_inode
to a helper function.  Now if we happen to write out the indirect node while
hfsplus_link is creating the catalog entry we'll get a link pointing to the
linkid of the current nlink value.  This can easily be reproduced by a large
enough loop of local git-clone operations.

Stop abusing the dev field in the HFS+ inode for short term storage by
refactoring the way the permission structure in the catalog entry is
set up, and rename the dev field to linkid to avoid any confusion.

While we're at it also prevent creating hard links to special files, as
the HFS+ dev and linkid share the same space in the on-disk structure.

Signed-off-by: Christoph Hellwig <hch@tuxera.com>
2010-10-14 09:54:28 -04:00
..
bfind.c hfsplus: handle more on-disk corruptions without oopsing 2010-10-14 09:53:48 -04:00
bitmap.c hfsplus: fix HFSPLUS_SB calling convention 2010-10-01 05:42:59 +02:00
bnode.c
brec.c hfsplus: validate btree flags 2010-10-14 09:54:23 -04:00
btree.c hfsplus: validate btree flags 2010-10-14 09:54:23 -04:00
catalog.c hfsplus: fix link corruption 2010-10-14 09:54:28 -04:00
dir.c hfsplus: fix link corruption 2010-10-14 09:54:28 -04:00
extents.c hfsplus: add missing extent locking in hfsplus_write_inode 2010-10-01 05:46:31 +02:00
hfsplus_fs.h hfsplus: fix link corruption 2010-10-14 09:54:28 -04:00
hfsplus_raw.h hfsplus: handle more on-disk corruptions without oopsing 2010-10-14 09:53:48 -04:00
inode.c hfsplus: fix link corruption 2010-10-14 09:54:28 -04:00
ioctl.c hfsplus: fix HFSPLUS_I calling convention 2010-10-01 05:43:31 +02:00
Kconfig fs/Kconfig: move hfs, hfsplus out 2009-01-22 13:15:57 +03:00
Makefile
options.c hfsplus: use atomic bitops for the superblock flags 2010-10-01 05:45:20 +02:00
part_tbl.c hfsplus: fix HFSPLUS_SB calling convention 2010-10-01 05:42:59 +02:00
super.c hfsplus: use atomic bitops for the superblock flags 2010-10-01 05:45:20 +02:00
tables.c
unicode.c hfsplus: use atomic bitops for the superblock flags 2010-10-01 05:45:20 +02:00
wrapper.c hfsplus: use atomic bitops for the superblock flags 2010-10-01 05:45:20 +02:00