1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00

Kernel: Remove unused artifacts of the Custody cache

We'll probably want some kind of Custody caching in the future, but as
it's not used at the moment, let's simplify things a bit.
This commit is contained in:
Andreas Kling 2020-02-26 15:23:55 +01:00
parent 987dbedf4a
commit d5fe839166
3 changed files with 1 additions and 81 deletions

View file

@ -26,7 +26,6 @@
#pragma once
#include <AK/InlineLinkedList.h>
#include <AK/RefCounted.h>
#include <AK/RefPtr.h>
#include <AK/String.h>
@ -37,15 +36,9 @@ namespace Kernel {
// FIXME: Custody needs some locking.
class Custody
: public RefCounted<Custody>
, public InlineLinkedListNode<Custody> {
class Custody : public RefCounted<Custody> {
MAKE_SLAB_ALLOCATED(Custody)
public:
static Custody* get_if_cached(Custody* parent, const StringView& name);
static NonnullRefPtr<Custody> get_or_create(Custody* parent, const StringView& name, Inode&, int mount_flags);
static NonnullRefPtr<Custody> create(Custody* parent, const StringView& name, Inode& inode, int mount_flags)
{
return adopt(*new Custody(parent, name, inode, mount_flags));
@ -60,27 +53,14 @@ public:
const String& name() const { return m_name; }
String absolute_path() const;
bool is_deleted() const { return m_deleted; }
bool is_mounted_on() const { return m_mounted_on; }
int mount_flags() const { return m_mount_flags; }
void did_delete(Badge<VFS>);
void did_mount_on(Badge<VFS>);
void did_rename(Badge<VFS>, const String& name);
// For InlineLinkedListNode.
Custody* m_next { nullptr };
Custody* m_prev { nullptr };
private:
Custody(Custody* parent, const StringView& name, Inode&, int mount_flags);
RefPtr<Custody> m_parent;
String m_name;
NonnullRefPtr<Inode> m_inode;
bool m_deleted { false };
bool m_mounted_on { false };
int m_mount_flags { 0 };
};