summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem
diff options
context:
space:
mode:
authorBrian Gianforcaro <bgianf@serenityos.org>2022-01-03 03:20:39 -0800
committerAndreas Kling <kling@serenityos.org>2022-01-05 14:04:18 +0100
commit24066ba5efd3d7f1d233d629ccca33f734786ef6 (patch)
treeefc0682cde3419e1982546bd9907e20c9561d5ad /Kernel/FileSystem
parent8bcce82887f0961f41e24227c060240136c9171c (diff)
downloadserenity-24066ba5efd3d7f1d233d629ccca33f734786ef6.zip
Kernel: Use MUST + Vector::try_append instead of Vector::append
In preparation for making Vector::append unavailable during compilation of the Kernel.
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r--Kernel/FileSystem/Ext2FileSystem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp
index 08b9924860..ca25978cf3 100644
--- a/Kernel/FileSystem/Ext2FileSystem.cpp
+++ b/Kernel/FileSystem/Ext2FileSystem.cpp
@@ -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);