diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-08 02:34:22 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-08 02:34:22 +0100 |
commit | 8731682d0eca68b3dce60e713d5808829c3b5adb (patch) | |
tree | 10584e6a259b6a3cc918471c251571595c388439 /Kernel/FileSystem/VirtualFileSystem.cpp | |
parent | cb97ef5589e8e6bf8ecf7974960a0f7635d95f87 (diff) | |
download | serenity-8731682d0eca68b3dce60e713d5808829c3b5adb.zip |
Kernel: Simplify FS::create_directory() a little bit
None of the clients of this function actually used the returned Inode,
so it can simply return a KResult instead.
Diffstat (limited to 'Kernel/FileSystem/VirtualFileSystem.cpp')
-rw-r--r-- | Kernel/FileSystem/VirtualFileSystem.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Kernel/FileSystem/VirtualFileSystem.cpp b/Kernel/FileSystem/VirtualFileSystem.cpp index c6e7fc9414..02e8930ddb 100644 --- a/Kernel/FileSystem/VirtualFileSystem.cpp +++ b/Kernel/FileSystem/VirtualFileSystem.cpp @@ -355,11 +355,7 @@ KResult VFS::mkdir(StringView path, mode_t mode, Custody& base) #ifdef VFS_DEBUG dbg() << "VFS::mkdir: '" << p.basename() << "' in " << parent_inode.identifier(); #endif - int error; - auto new_dir = parent_inode.fs().create_directory(parent_inode.identifier(), p.basename(), mode, current->process().uid(), current->process().gid(), error); - if (new_dir) - return KSuccess; - return KResult(error); + return parent_inode.fs().create_directory(parent_inode.identifier(), p.basename(), mode, current->process().uid(), current->process().gid()); } KResult VFS::access(StringView path, int mode, Custody& base) |