summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem/TmpFS.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-12-28 12:33:27 +0100
committerAndreas Kling <kling@serenityos.org>2021-12-28 13:00:28 +0100
commit416b0374fb59827db45dfac2d67e7e637b2d5fff (patch)
tree340104502d81f31e6e1174ace42e57c57ceaff84 /Kernel/FileSystem/TmpFS.h
parentb24dc84ad923d409e55c6c5f2ffb6d5c1836ba43 (diff)
downloadserenity-416b0374fb59827db45dfac2d67e7e637b2d5fff.zip
Kernel: Fix race condition in TmpFSInode::notify_watchers()
We were doing this dance in notify_watchers(): set_metadata_dirty(true); set_metadata_dirty(false); This was done in order to force out inode watcher events immediately. Unfortunately, this was racy, as if SyncTask got scheduled at the wrong moment, it would try to flush metadata for a clean inode. This then got trapped by the VERIFY() statement in Inode::sync_all(): VERIFY(inode.is_metadata_dirty()); This patch fixes the issue by replacing notify_watchers() with lazy metadata notifications like all other filesystems.
Diffstat (limited to 'Kernel/FileSystem/TmpFS.h')
-rw-r--r--Kernel/FileSystem/TmpFS.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/Kernel/FileSystem/TmpFS.h b/Kernel/FileSystem/TmpFS.h
index eca20a43e3..741575f2ca 100644
--- a/Kernel/FileSystem/TmpFS.h
+++ b/Kernel/FileSystem/TmpFS.h
@@ -73,7 +73,6 @@ private:
TmpFSInode(TmpFS& fs, const InodeMetadata& metadata, InodeIdentifier parent);
static ErrorOr<NonnullRefPtr<TmpFSInode>> try_create(TmpFS&, InodeMetadata const& metadata, InodeIdentifier parent);
static ErrorOr<NonnullRefPtr<TmpFSInode>> try_create_root(TmpFS&);
- void notify_watchers();
struct Child {
NonnullOwnPtr<KString> name;