Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211591
b: refs/heads/master
c: 722c55d
h: refs/heads/master
i:
  211589: bf70fcb
  211587: 8933be2
  211583: b6c4a79
v: v3
  • Loading branch information
Christoph Hellwig authored and Christoph Hellwig committed Oct 14, 2010
1 parent 177780c commit 40f4827
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 18 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: f6089ff87d309a8ddb7b0d4dd92a570f1b0f689b
refs/heads/master: 722c55d13e7296cc62ed8a38f926a915ff32e4ea
1 change: 0 additions & 1 deletion trunk/fs/hfsplus/catalog.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ static void hfsplus_set_perms(struct inode *inode, struct hfsplus_perm *perms)
perms->rootflags |= HFSPLUS_FLG_APPEND;
else
perms->rootflags &= ~HFSPLUS_FLG_APPEND;
HFSPLUS_I(inode)->rootflags = perms->rootflags;
HFSPLUS_I(inode)->userflags = perms->userflags;
perms->mode = cpu_to_be16(inode->i_mode);
perms->owner = cpu_to_be32(inode->i_uid);
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/hfsplus/hfsplus_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ struct hfsplus_inode_info {
* Protected by i_mutex.
*/
sector_t fs_blocks;
u8 rootflags, userflags; /* BSD system and user file flags */
u8 userflags; /* BSD user file flags */
struct list_head open_dir_list;
loff_t phys_size;

Expand Down
1 change: 0 additions & 1 deletion trunk/fs/hfsplus/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ static void hfsplus_get_perms(struct inode *inode, struct hfsplus_perm *perms, i
mode = S_IFREG | ((S_IRUGO|S_IWUGO) & ~(sbi->umask));
inode->i_mode = mode;

HFSPLUS_I(inode)->rootflags = perms->rootflags;
HFSPLUS_I(inode)->userflags = perms->userflags;
if (perms->rootflags & HFSPLUS_FLG_IMMUTABLE)
inode->i_flags |= S_IMMUTABLE;
Expand Down
25 changes: 11 additions & 14 deletions trunk/fs/hfsplus/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ static int hfsplus_ioctl_getflags(struct file *file, int __user *user_flags)
struct hfsplus_inode_info *hip = HFSPLUS_I(inode);
unsigned int flags = 0;

if (hip->rootflags & HFSPLUS_FLG_IMMUTABLE)
if (inode->i_flags & S_IMMUTABLE)
flags |= FS_IMMUTABLE_FL;
if (hip->rootflags & HFSPLUS_FLG_APPEND)
if (inode->i_flags |= S_APPEND)
flags |= FS_APPEND_FL;
if (hip->userflags & HFSPLUS_FLG_NODUMP)
flags |= FS_NODUMP_FL;
Expand Down Expand Up @@ -59,8 +59,8 @@ static int hfsplus_ioctl_setflags(struct file *file, int __user *user_flags)

mutex_lock(&inode->i_mutex);

if (flags & (FS_IMMUTABLE_FL|FS_APPEND_FL) ||
hip->rootflags & (HFSPLUS_FLG_IMMUTABLE|HFSPLUS_FLG_APPEND)) {
if ((flags & (FS_IMMUTABLE_FL|FS_APPEND_FL)) ||
inode->i_flags & (S_IMMUTABLE|S_APPEND)) {
if (!capable(CAP_LINUX_IMMUTABLE)) {
err = -EPERM;
goto out_unlock_inode;
Expand All @@ -72,20 +72,17 @@ static int hfsplus_ioctl_setflags(struct file *file, int __user *user_flags)
err = -EOPNOTSUPP;
goto out_unlock_inode;
}
if (flags & FS_IMMUTABLE_FL) {

if (flags & FS_IMMUTABLE_FL)
inode->i_flags |= S_IMMUTABLE;
hip->rootflags |= HFSPLUS_FLG_IMMUTABLE;
} else {
else
inode->i_flags &= ~S_IMMUTABLE;
hip->rootflags &= ~HFSPLUS_FLG_IMMUTABLE;
}
if (flags & FS_APPEND_FL) {

if (flags & FS_APPEND_FL)
inode->i_flags |= S_APPEND;
hip->rootflags |= HFSPLUS_FLG_APPEND;
} else {
else
inode->i_flags &= ~S_APPEND;
hip->rootflags &= ~HFSPLUS_FLG_APPEND;
}

if (flags & FS_NODUMP_FL)
hip->userflags |= HFSPLUS_FLG_NODUMP;
else
Expand Down

0 comments on commit 40f4827

Please sign in to comment.