mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 17:05:10 +00:00
ProcFS: Take the "all inodes" lock when generating /proc/inodes
Otherwise the kernel asserts.
This commit is contained in:
parent
086522537e
commit
dfce9051fa
3 changed files with 8 additions and 0 deletions
|
@ -41,6 +41,11 @@ namespace Kernel {
|
|||
static SpinLock s_all_inodes_lock;
|
||||
static AK::Singleton<InlineLinkedList<Inode>> s_list;
|
||||
|
||||
SpinLock<u32>& Inode::all_inodes_lock()
|
||||
{
|
||||
return s_all_inodes_lock;
|
||||
}
|
||||
|
||||
InlineLinkedList<Inode>& Inode::all_with_lock()
|
||||
{
|
||||
ASSERT(s_all_inodes_lock.is_locked());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue