1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-16 19:55:06 +00:00

Kernel: Assert on attempt to mark inode metadata dirty on read-only FS

This commit is contained in:
Andreas Kling 2021-01-17 21:32:59 +01:00
parent 121594ace2
commit a6917465d7

View file

@ -230,6 +230,12 @@ NonnullRefPtr<FIFO> Inode::fifo()
void Inode::set_metadata_dirty(bool metadata_dirty)
{
LOCKER(m_lock);
if (metadata_dirty) {
// Sanity check.
ASSERT(!fs().is_readonly());
}
if (m_metadata_dirty == metadata_dirty)
return;