1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:27:35 +00:00

Kernel: Fick infinite recursion when filling up disk cache

We can't be calling the virtual FS::flush_writes() in order to flush
the disk cache from within the disk cache, since an FS subclass may
try to do cache stuff in its flush_writes() implementation.

Instead, separate out the implementation of DiskBackedFS's flushing
logic into a flush_writes_impl() and call that from the cache code.
This commit is contained in:
Andreas Kling 2019-11-03 00:21:17 +01:00
parent 1e36d899f1
commit dcf8d359f3
2 changed files with 12 additions and 4 deletions

View file

@ -16,6 +16,8 @@ public:
virtual void flush_writes() override;
void flush_writes_impl();
protected:
explicit DiskBackedFS(NonnullRefPtr<DiskDevice>&&);