Ext2FS: Don't uncache inodes while they are being watched

If an inode is observed by watch_file(), we won't uncache it.
This allows a program to watch a file without keeping it open.
This commit is contained in:
Andreas Kling 2019-11-04 16:31:46 +01:00
commit 721585473b
Notes: sideshowbarker 2024-07-19 11:23:29 +09:00
2 changed files with 6 additions and 0 deletions

View file

@ -77,6 +77,8 @@ public:
static void sync();
bool has_watchers() const { return !m_watchers.is_empty(); }
void register_watcher(Badge<InodeWatcher>, InodeWatcher&);
void unregister_watcher(Badge<InodeWatcher>, InodeWatcher&);