mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:07:34 +00:00
VFS: Move Ext2FSInode::m_lock up to Inode so all inodes can have locking.
This commit is contained in:
parent
730c14e647
commit
db35d59994
2 changed files with 4 additions and 3 deletions
|
@ -4,7 +4,6 @@
|
||||||
#include "UnixTypes.h"
|
#include "UnixTypes.h"
|
||||||
#include <AK/Buffer.h>
|
#include <AK/Buffer.h>
|
||||||
#include <AK/OwnPtr.h>
|
#include <AK/OwnPtr.h>
|
||||||
#include <AK/Lock.h>
|
|
||||||
#include "ext2_fs.h"
|
#include "ext2_fs.h"
|
||||||
|
|
||||||
struct ext2_group_desc;
|
struct ext2_group_desc;
|
||||||
|
@ -48,7 +47,6 @@ private:
|
||||||
const Ext2FS& fs() const;
|
const Ext2FS& fs() const;
|
||||||
Ext2FSInode(Ext2FS&, unsigned index, const ext2_inode&);
|
Ext2FSInode(Ext2FS&, unsigned index, const ext2_inode&);
|
||||||
|
|
||||||
Lock m_lock;
|
|
||||||
Vector<unsigned> m_block_list;
|
Vector<unsigned> m_block_list;
|
||||||
HashMap<String, unsigned> m_lookup_cache;
|
HashMap<String, unsigned> m_lookup_cache;
|
||||||
ext2_inode m_raw_inode;
|
ext2_inode m_raw_inode;
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#include <AK/AKString.h>
|
#include <AK/AKString.h>
|
||||||
#include <AK/Function.h>
|
#include <AK/Function.h>
|
||||||
#include <AK/kstdio.h>
|
#include <AK/kstdio.h>
|
||||||
|
#include <AK/Lock.h>
|
||||||
|
|
||||||
static const dword mepoch = 476763780;
|
static const dword mepoch = 476763780;
|
||||||
|
|
||||||
|
@ -106,8 +107,10 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Inode(FS& fs, unsigned index);
|
Inode(FS& fs, unsigned index);
|
||||||
|
|
||||||
void set_metadata_dirty(bool b) { m_metadata_dirty = b; }
|
void set_metadata_dirty(bool b) { m_metadata_dirty = b; }
|
||||||
|
|
||||||
|
Lock m_lock;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FS& m_fs;
|
FS& m_fs;
|
||||||
unsigned m_index { 0 };
|
unsigned m_index { 0 };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue