aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Oesch <lukasoesch20@gmail.com>2026-03-21 16:35:01 +0100
committerLukas Oesch <lukasoesch20@gmail.com>2026-03-26 21:17:39 +0100
commit9d23a9fb6ae774bf3b1345d0b7adcb88f9627dc0 (patch)
treee20ba2fae539bd08e5408f5039bea8907e860602
parent6c172389b562a08a6540574d6fbdf6a5bdce37b8 (diff)
downloadteachos-9d23a9fb6ae774bf3b1345d0b7adcb88f9627dc0.tar.xz
teachos-9d23a9fb6ae774bf3b1345d0b7adcb88f9627dc0.zip
refactoring, node cannot be null
-rw-r--r--kernel/src/filesystem/vfs.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/kernel/src/filesystem/vfs.cpp b/kernel/src/filesystem/vfs.cpp
index 86991ea..c448618 100644
--- a/kernel/src/filesystem/vfs.cpp
+++ b/kernel/src/filesystem/vfs.cpp
@@ -68,12 +68,7 @@ namespace filesystem
{
if (auto custody = resolve_path(path))
{
- if (auto node = custody->get_inode())
- {
- return kstd::make_shared<open_file_description>(node);
- }
-
- kapi::system::panic("[FILESYSTEM] inode::open_file returned null file.");
+ return kstd::make_shared<open_file_description>(custody->get_inode());
}
return nullptr;