mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:58:11 +00:00
Ext2FS: Clean up prepare_to_unmount() a little bit
This commit is contained in:
parent
6778abb999
commit
da7ae52eee
1 changed files with 4 additions and 4 deletions
|
@ -1398,13 +1398,13 @@ unsigned Ext2FS::free_inode_count() const
|
||||||
|
|
||||||
KResult Ext2FS::prepare_to_unmount() const
|
KResult Ext2FS::prepare_to_unmount() const
|
||||||
{
|
{
|
||||||
LOCKER(m_lock); // Acquire lock for this FS
|
LOCKER(m_lock);
|
||||||
for (auto it = m_inode_cache.begin(); it != m_inode_cache.end(); ++it) {
|
|
||||||
if (it->value.ptr()->ref_count() > 1)
|
for (auto& it : m_inode_cache) {
|
||||||
|
if (it.value->ref_count() > 1)
|
||||||
return KResult(-EBUSY);
|
return KResult(-EBUSY);
|
||||||
}
|
}
|
||||||
|
|
||||||
dbg() << "here!";
|
|
||||||
m_inode_cache.clear();
|
m_inode_cache.clear();
|
||||||
return KSuccess;
|
return KSuccess;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue