--- a/fs/ubifs/ioctl.c +++ b/fs/ubifs/ioctl.c @@ -132,7 +132,8 @@ static int setflags(struct inode *inode, } } - ui->flags = ioctl2ubifs(flags); + ui->flags &= ~ioctl2ubifs(UBIFS_SUPPORTED_IOCTL_FLAGS); + ui->flags |= ioctl2ubifs(flags); ubifs_set_inode_flags(inode); inode->i_ctime = current_time(inode); release = ui->dirty;