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);
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;
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;
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;
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