diff options
| author | Lukas Oesch <lukasoesch20@gmail.com> | 2026-03-24 18:52:41 +0100 |
|---|---|---|
| committer | Lukas Oesch <lukasoesch20@gmail.com> | 2026-03-26 21:19:03 +0100 |
| commit | 7351349f296f100f10db62b5a834a971fbe51473 (patch) | |
| tree | 297c9cd647c36fad6909ce71ce714a8d737498da /kernel/src/filesystem/mount_table.cpp | |
| parent | a2ac8770937a28d0d4c674e25c9b3c77802a5c9e (diff) | |
| download | teachos-7351349f296f100f10db62b5a834a971fbe51473.tar.xz teachos-7351349f296f100f10db62b5a834a971fbe51473.zip | |
small refactoring
Diffstat (limited to 'kernel/src/filesystem/mount_table.cpp')
| -rw-r--r-- | kernel/src/filesystem/mount_table.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/src/filesystem/mount_table.cpp b/kernel/src/filesystem/mount_table.cpp index 0e9a53d..b4a906b 100644 --- a/kernel/src/filesystem/mount_table.cpp +++ b/kernel/src/filesystem/mount_table.cpp @@ -18,11 +18,11 @@ namespace filesystem auto mount_table::find_mount_by_dentry(kstd::shared_ptr<dentry> const & dentry) -> kstd::shared_ptr<mount> { - auto found = + auto it = std::ranges::find_if(m_mounts, [&](auto const & mount) { return mount->get_dentry().get() == dentry.get(); }); - if (found != m_mounts.end()) + if (it != m_mounts.end()) { - return *found; + return *it; } kapi::system::panic("[FILESYSTEM] dentry has mount flag set but no corresponding mount found."); } |
