1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 02:13:56 +09:00

Kernel/Ext2: Check and set file system state

This is supposed to detect whether a file system was unmounted
cleanly or not.
This commit is contained in:
kleines Filmröllchen 2023-07-02 14:25:16 +02:00 committed by Jelle Raaijmakers
parent 8fb126bec6
commit 251b17085b
Notes: sideshowbarker 2024-07-17 05:23:40 +09:00
2 changed files with 30 additions and 3 deletions

View file

@ -30,6 +30,7 @@ FileSystem::~FileSystem()
ErrorOr<void> FileSystem::prepare_to_unmount(Inode& mount_guest_inode)
{
return m_attach_count.with([&](auto& attach_count) -> ErrorOr<void> {
dbgln_if(VFS_DEBUG, "VFS: File system {} (id {}) is attached {} time(s)", class_name(), m_fsid.value(), attach_count);
if (attach_count == 1)
return prepare_to_clear_last_mount(mount_guest_inode);
return {};