mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:38:11 +00:00
Kernel: Use Vector::unstable_remove() in a couple of places
This commit is contained in:
parent
575664cda3
commit
e23536d682
3 changed files with 5 additions and 5 deletions
|
@ -73,7 +73,7 @@ KResult VFS::unmount(InodeIdentifier guest_inode_id)
|
|||
return result;
|
||||
}
|
||||
dbg() << "VFS: found fs " << mount.guest_fs().fsid() << " at mount index " << i << "! Unmounting...";
|
||||
m_mounts.remove(i);
|
||||
m_mounts.unstable_remove(i);
|
||||
return KSuccess;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ bool Process::deallocate_region(Region& region)
|
|||
InterruptDisabler disabler;
|
||||
for (int i = 0; i < m_regions.size(); ++i) {
|
||||
if (&m_regions[i] == ®ion) {
|
||||
m_regions.remove(i);
|
||||
m_regions.unstable_remove(i);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ void SharedBuffer::deref_for_process(Process& process)
|
|||
dbgprintf("Releasing shared buffer reference on %d of size %d by PID %d\n", m_shared_buffer_id, size(), process.pid());
|
||||
#endif
|
||||
process.deallocate_region(*ref.region);
|
||||
m_refs.remove(i);
|
||||
m_refs.unstable_remove(i);
|
||||
#ifdef SHARED_BUFFER_DEBUG
|
||||
dbgprintf("Released shared buffer reference on %d of size %d by PID %d\n", m_shared_buffer_id, size(), process.pid());
|
||||
#endif
|
||||
|
@ -124,7 +124,7 @@ void SharedBuffer::disown(pid_t pid)
|
|||
dbgprintf("Disowning shared buffer %d of size %d by PID %d\n", m_shared_buffer_id, size(), pid);
|
||||
#endif
|
||||
m_total_refs -= ref.count;
|
||||
m_refs.remove(i);
|
||||
m_refs.unstable_remove(i);
|
||||
#ifdef SHARED_BUFFER_DEBUG
|
||||
dbgprintf("Disowned shared buffer %d of size %d by PID %d\n", m_shared_buffer_id, size(), pid);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue