ladybird/Kernel/FileSystem
Daniel Bertalan d7b6cc6421 Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr
Our existing implementation did not check the element type of the other
pointer in the constructors and move assignment operators. This meant
that some operations that would require explicit casting on raw pointers
were done implicitly, such as:
- downcasting a base class to a derived class (e.g. `Kernel::Inode` =>
  `Kernel::ProcFSDirectoryInode` in Kernel/ProcFS.cpp),
- casting to an unrelated type (e.g. `Promise<bool>` => `Promise<Empty>`
  in LibIMAP/Client.cpp)

This, of course, allows gross violations of the type system, and makes
the need to type-check less obvious before downcasting. Luckily, while
adding the `static_ptr_cast`s, only two truly incorrect usages were
found; in the other instances, our casts just needed to be made
explicit.
2021-09-03 23:20:23 +02:00
..
AnonymousFile.cpp Kernel: Rename Process::space() => Process::address_space() 2021-08-06 14:05:58 +02:00
AnonymousFile.h Kernel: Rename Range => VirtualRange 2021-08-06 14:05:58 +02:00
BlockBasedFileSystem.cpp Kernel: Make FileSystem::initialize() return KResult 2021-08-14 15:19:00 +02:00
BlockBasedFileSystem.h Kernel: Rename ProtectedValue<T> => MutexProtected<T> 2021-08-22 03:34:09 +02:00
Custody.cpp Kernel: Rename ProtectedValue<T> => MutexProtected<T> 2021-08-22 03:34:09 +02:00
Custody.h Kernel: Cache Custody objects (weakly) to avoid expensive reconstruction 2021-08-15 23:30:52 +02:00
DevFS.cpp Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
DevFS.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
DevPtsFS.cpp Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
DevPtsFS.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
ext2_fs.h Everywhere: "file name" => "filename" 2021-04-29 22:16:18 +02:00
ext2_types.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Ext2FileSystem.cpp Kernel/Ext2FS: Avoid temporary String allocation during inode creation 2021-08-29 01:09:19 +02:00
Ext2FileSystem.h Kernel/Ext2FS: Avoid temporary String allocation during inode creation 2021-08-29 01:09:19 +02:00
FIFO.cpp Kernel: Remove an obviously redundant check in FIFO::read() 2021-08-29 01:09:19 +02:00
FIFO.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
File.cpp Kernel: Rename FileDescription::create() => try_create() 2021-08-29 01:09:19 +02:00
File.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
FileBackedFileSystem.cpp Kernel: Rename FileBackedFS => FileBackedFileSystem 2021-07-11 00:33:27 +02:00
FileBackedFileSystem.h Kernel: Rename FileBackedFS => FileBackedFileSystem 2021-07-11 00:33:27 +02:00
FileDescription.cpp Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
FileDescription.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
FileSystem.cpp Everywhere: Replace AK::Singleton => Singleton 2021-08-08 00:03:45 +02:00
FileSystem.h Kernel: Make FileSystem::initialize() return KResult 2021-08-14 15:19:00 +02:00
Inode.cpp Kernel: Rename SpinLock => Spinlock 2021-08-22 03:34:10 +02:00
Inode.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
InodeFile.cpp Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
InodeFile.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
InodeIdentifier.h Kernel: Rename FS => FileSystem 2021-07-11 00:20:38 +02:00
InodeMetadata.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
InodeWatcher.cpp Kernel: Convert UserOrKernelBuffer callbacks to use AK::Bytes 2021-09-01 18:06:14 +02:00
InodeWatcher.h Revert "Kernel: Use IntrusiveList for keeping track of InodeWatchers" 2021-07-21 21:24:26 +02:00
ISO9660FileSystem.cpp Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
ISO9660FileSystem.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
Mount.cpp Kernel: Make VirtualFileSystem::Mount a top-level class 2021-07-11 00:51:06 +02:00
Mount.h Kernel/Ext2FS: Cache the root inode in a member variable 2021-07-18 01:53:04 +02:00
Plan9FileSystem.cpp Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
Plan9FileSystem.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
ProcFS.cpp Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
ProcFS.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
SysFS.cpp Kernel/SysFS: Remove unnecessary mutex lockers in SysFS metadata getters 2021-08-29 01:09:19 +02:00
SysFS.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
SysFSComponent.cpp Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
SysFSComponent.h Everywhere: Prevent risky implicit casts of (Nonnull)RefPtr 2021-09-03 23:20:23 +02:00
TmpFS.cpp Kernel: Pass InodeMetadata by reference in TmpFSInode::create 2021-09-01 18:06:14 +02:00
TmpFS.h Kernel: Pass InodeMetadata by reference in TmpFSInode::create 2021-09-01 18:06:14 +02:00
UnveilNode.h Kernel: Move UnveilNode.h into Kernel/FileSystem/ 2021-08-06 14:11:45 +02:00
VirtualFileSystem.cpp Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00
VirtualFileSystem.h Kernel: Strongly typed user & group ID's 2021-08-29 01:09:19 +02:00