Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311038
b: refs/heads/master
c: 7dea966
h: refs/heads/master
v: v3
  • Loading branch information
Matthew Garrett authored and Linus Torvalds committed Jun 17, 2012
1 parent 351a01c commit ddf0db8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6dc8c04218eb752ff79cdc24a995cf51866caed
refs/heads/master: 7dea9665fee828fb56db3bae5b9685d9fa006d33
9 changes: 7 additions & 2 deletions trunk/fs/hfsplus/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ static int hfsplus_ioctl_bless(struct file *file, int __user *user_flags)
struct hfsplus_sb_info *sbi = HFSPLUS_SB(inode->i_sb);
struct hfsplus_vh *vh = sbi->s_vhdr;
struct hfsplus_vh *bvh = sbi->s_backup_vhdr;
u32 cnid = (unsigned long)dentry->d_fsdata;

if (!capable(CAP_SYS_ADMIN))
return -EPERM;
Expand All @@ -41,8 +42,12 @@ static int hfsplus_ioctl_bless(struct file *file, int __user *user_flags)
vh->finder_info[0] = bvh->finder_info[0] =
cpu_to_be32(parent_ino(dentry));

/* Bootloader */
vh->finder_info[1] = bvh->finder_info[1] = cpu_to_be32(inode->i_ino);
/*
* Bootloader. Just using the inode here breaks in the case of
* hard links - the firmware wants the ID of the hard link file,
* but the inode points at the indirect inode
*/
vh->finder_info[1] = bvh->finder_info[1] = cpu_to_be32(cnid);

/* Per spec, the OS X system folder - same as finder_info[0] here */
vh->finder_info[5] = bvh->finder_info[5] =
Expand Down

0 comments on commit ddf0db8

Please sign in to comment.