mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 17:15:08 +00:00
Kernel: More use of NonnullRefPtrVector in the kernel.
This commit is contained in:
parent
3bd47a2e09
commit
75a24c3a1f
3 changed files with 12 additions and 11 deletions
|
@ -1,3 +1,4 @@
|
|||
#include <AK/NonnullRefPtrVector.h>
|
||||
#include <AK/StringBuilder.h>
|
||||
#include <Kernel/FileSystem/Inode.h>
|
||||
#include <Kernel/Net/LocalSocket.h>
|
||||
|
@ -13,7 +14,7 @@ HashTable<Inode*>& all_inodes()
|
|||
|
||||
void Inode::sync()
|
||||
{
|
||||
Vector<NonnullRefPtr<Inode>, 32> inodes;
|
||||
NonnullRefPtrVector<Inode, 32> inodes;
|
||||
{
|
||||
InterruptDisabler disabler;
|
||||
for (auto* inode : all_inodes()) {
|
||||
|
@ -23,8 +24,8 @@ void Inode::sync()
|
|||
}
|
||||
|
||||
for (auto& inode : inodes) {
|
||||
ASSERT(inode->is_metadata_dirty());
|
||||
inode->flush_metadata();
|
||||
ASSERT(inode.is_metadata_dirty());
|
||||
inode.flush_metadata();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue