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:
parent
8fb126bec6
commit
251b17085b
Notes:
sideshowbarker
2024-07-17 05:23:40 +09:00
Author: https://github.com/kleinesfilmroellchen
Commit: 251b17085b
Pull-request: https://github.com/SerenityOS/serenity/pull/19668
Reviewed-by: https://github.com/gmta ✅
Reviewed-by: https://github.com/linusg
2 changed files with 30 additions and 3 deletions
|
@ -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 {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue