mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
Kernel: Use MUST + Vector::try_append instead of Vector::append
In preparation for making Vector::append unavailable during compilation of the Kernel.
This commit is contained in:
parent
8bcce82887
commit
24066ba5ef
Notes:
sideshowbarker
2024-07-17 21:36:12 +09:00
Author: https://github.com/bgianfo
Commit: 24066ba5ef
Pull-request: https://github.com/SerenityOS/serenity/pull/11588
5 changed files with 8 additions and 8 deletions
|
@ -709,14 +709,14 @@ void Ext2FS::flush_writes()
|
|||
// to not exist, we remember the fact that it doesn't exist by caching a nullptr.
|
||||
// This seems like a reasonable time to uncache ideas about unknown inodes, so do that.
|
||||
if (!it.value) {
|
||||
unused_inodes.append(it.key);
|
||||
MUST(unused_inodes.try_append(it.key));
|
||||
continue;
|
||||
}
|
||||
if (it.value->ref_count() != 1)
|
||||
continue;
|
||||
if (it.value->has_watchers())
|
||||
continue;
|
||||
unused_inodes.append(it.key);
|
||||
MUST(unused_inodes.try_append(it.key));
|
||||
}
|
||||
for (auto index : unused_inodes)
|
||||
uncache_inode(index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue