Kernel: Add "child added" and "child removed" InodeWatcher events

The child name is not yet accessible to userspace, but will be in a
future patch.
This commit is contained in:
Andreas Kling 2020-07-04 13:36:55 +02:00
parent ea17d2d3da
commit 0d577ab781
Notes: sideshowbarker 2024-07-19 05:11:34 +09:00
6 changed files with 47 additions and 3 deletions

View file

@ -981,6 +981,8 @@ KResult Ext2FSInode::add_child(Inode& child, const StringView& name, mode_t mode
bool success = write_directory(entries);
if (success)
m_lookup_cache.set(name, child.index());
did_add_child(name);
return KSuccess;
}
@ -1022,6 +1024,8 @@ KResult Ext2FSInode::remove_child(const StringView& name)
auto child_inode = fs().get_inode(child_id);
child_inode->decrement_link_count();
did_remove_child(name);
return KSuccess;
}