Kernel: Propagate a few KResults properly in FileSystem subsystems

Propagating un-obsevered KResults up the stack.
This commit is contained in:
Brian Gianforcaro 2020-08-05 02:07:31 -07:00 committed by Andreas Kling
parent c4c6d9367d
commit d67069d922
Notes: sideshowbarker 2024-07-19 04:16:58 +09:00
5 changed files with 20 additions and 8 deletions

View file

@ -1023,7 +1023,9 @@ KResult Ext2FSInode::remove_child(const StringView& name)
m_lookup_cache.remove(name);
auto child_inode = fs().get_inode(child_id);
child_inode->decrement_link_count();
result = child_inode->decrement_link_count();
if (result.is_error())
return result;
did_remove_child(name);
return KSuccess;