mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-08 01:27:31 +00:00
Kernel+FileManager: Disallow watch_file() in unsupported file systems
Currently only Ext2FS and TmpFS supports InodeWatchers. We now fail with ENOTSUPP if watch_file() is called on e.g ProcFS. This fixes an issue with FileManager chewing up all the CPU when /proc was opened. Watchers don't keep the watched Inode open, and when they close, the watcher FD will EOF. Since nothing else kept /proc open in FileManager, the watchers created for it would EOF immediately, causing a refresh over and over. Fixes #879.
This commit is contained in:
@@ -74,6 +74,8 @@ public:
|
||||
|
||||
virtual KResult prepare_to_unmount() const override;
|
||||
|
||||
virtual bool supports_watchers() const override { return true; }
|
||||
|
||||
private:
|
||||
typedef unsigned BlockIndex;
|
||||
typedef unsigned GroupIndex;
|
||||
|
||||
Reference in New Issue
Block a user