diff options
Diffstat (limited to 'fs/f2fs')
-rw-r--r-- | fs/f2fs/file.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 08d71330d2ae..c51d0c531213 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -1662,19 +1662,12 @@ static int f2fs_file_flush(struct file *file, fl_owner_t id) static int f2fs_setflags_common(struct inode *inode, u32 iflags, u32 mask) { struct f2fs_inode_info *fi = F2FS_I(inode); - u32 oldflags; /* Is it quota file? Do not allow user to mess with it */ if (IS_NOQUOTA(inode)) return -EPERM; - oldflags = fi->i_flags; - - if ((iflags ^ oldflags) & (F2FS_APPEND_FL | F2FS_IMMUTABLE_FL)) - if (!capable(CAP_LINUX_IMMUTABLE)) - return -EPERM; - - fi->i_flags = iflags | (oldflags & ~mask); + fi->i_flags = iflags | (fi->i_flags & ~mask); if (fi->i_flags & F2FS_PROJINHERIT_FL) set_inode_flag(inode, FI_PROJ_INHERIT); |