mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 06:48:12 +00:00
Kernel/Ext2FS: Don't hog FS lock when calling base class flush_writes()
Once we've finalized all the file system metadata in flush_writes(), we no longer need to hold the file system lock during the call to BlockBasedFileSystem::flush_writes().
This commit is contained in:
parent
98c230b370
commit
abbd237ec1
1 changed files with 43 additions and 41 deletions
|
@ -688,6 +688,7 @@ void Ext2FS::flush_block_group_descriptor_table()
|
|||
|
||||
void Ext2FS::flush_writes()
|
||||
{
|
||||
{
|
||||
Locker locker(m_lock);
|
||||
if (m_super_block_dirty) {
|
||||
flush_super_block();
|
||||
|
@ -708,8 +709,6 @@ void Ext2FS::flush_writes()
|
|||
}
|
||||
}
|
||||
|
||||
BlockBasedFileSystem::flush_writes();
|
||||
|
||||
// Uncache Inodes that are only kept alive by the index-to-inode lookup cache.
|
||||
// We don't uncache Inodes that are being watched by at least one InodeWatcher.
|
||||
|
||||
|
@ -733,6 +732,9 @@ void Ext2FS::flush_writes()
|
|||
}
|
||||
for (auto index : unused_inodes)
|
||||
uncache_inode(index);
|
||||
}
|
||||
|
||||
BlockBasedFileSystem::flush_writes();
|
||||
}
|
||||
|
||||
Ext2FSInode::Ext2FSInode(Ext2FS& fs, InodeIndex index)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue