diff options
Diffstat (limited to 'fs/hfsplus')
-rw-r--r-- | fs/hfsplus/ioctl.c | 9 | ||||
-rw-r--r-- | fs/hfsplus/wrapper.c | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c index c640ba57074b..09addc8615fa 100644 --- a/fs/hfsplus/ioctl.c +++ b/fs/hfsplus/ioctl.c | |||
@@ -31,6 +31,7 @@ static int hfsplus_ioctl_bless(struct file *file, int __user *user_flags) | |||
31 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb); | 31 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb); |
32 | struct hfsplus_vh *vh = sbi->s_vhdr; | 32 | struct hfsplus_vh *vh = sbi->s_vhdr; |
33 | struct hfsplus_vh *bvh = sbi->s_backup_vhdr; | 33 | struct hfsplus_vh *bvh = sbi->s_backup_vhdr; |
34 | u32 cnid = (unsigned long)dentry->d_fsdata; | ||
34 | 35 | ||
35 | if (!capable(CAP_SYS_ADMIN)) | 36 | if (!capable(CAP_SYS_ADMIN)) |
36 | return -EPERM; | 37 | return -EPERM; |
@@ -41,8 +42,12 @@ static int hfsplus_ioctl_bless(struct file *file, int __user *user_flags) | |||
41 | vh->finder_info[0] = bvh->finder_info[0] = | 42 | vh->finder_info[0] = bvh->finder_info[0] = |
42 | cpu_to_be32(parent_ino(dentry)); | 43 | cpu_to_be32(parent_ino(dentry)); |
43 | 44 | ||
44 | /* Bootloader */ | 45 | /* |
45 | vh->finder_info[1] = bvh->finder_info[1] = cpu_to_be32(inode->i_ino); | 46 | * Bootloader. Just using the inode here breaks in the case of |
47 | * hard links - the firmware wants the ID of the hard link file, | ||
48 | * but the inode points at the indirect inode | ||
49 | */ | ||
50 | vh->finder_info[1] = bvh->finder_info[1] = cpu_to_be32(cnid); | ||
46 | 51 | ||
47 | /* Per spec, the OS X system folder - same as finder_info[0] here */ | 52 | /* Per spec, the OS X system folder - same as finder_info[0] here */ |
48 | vh->finder_info[5] = bvh->finder_info[5] = | 53 | vh->finder_info[5] = bvh->finder_info[5] = |
diff --git a/fs/hfsplus/wrapper.c b/fs/hfsplus/wrapper.c index 7daf4b852d1c..90effcccca9a 100644 --- a/fs/hfsplus/wrapper.c +++ b/fs/hfsplus/wrapper.c | |||
@@ -56,7 +56,7 @@ int hfsplus_submit_bio(struct super_block *sb, sector_t sector, | |||
56 | DECLARE_COMPLETION_ONSTACK(wait); | 56 | DECLARE_COMPLETION_ONSTACK(wait); |
57 | struct bio *bio; | 57 | struct bio *bio; |
58 | int ret = 0; | 58 | int ret = 0; |
59 | unsigned int io_size; | 59 | u64 io_size; |
60 | loff_t start; | 60 | loff_t start; |
61 | int offset; | 61 | int offset; |
62 | 62 | ||