vfs: fix build error with gcc 12

Fixes #4839
This commit is contained in:
Christian Prochaska 2023-04-05 11:30:20 +02:00 committed by Christian Helmuth
parent aa44ada2d4
commit c2aacfa9c4

View File

@ -753,11 +753,11 @@ class Vfs::Ram_file_system : public Vfs::File_system
Vfs_ram::Node &node = ram_handle->node; Vfs_ram::Node &node = ram_handle->node;
bool node_modified = ram_handle->modifying; bool node_modified = ram_handle->modifying;
ram_handle->node.close(*ram_handle); node.close(*ram_handle);
destroy(vfs_handle->alloc(), ram_handle); destroy(vfs_handle->alloc(), ram_handle);
if (ram_handle->node.unlinked() && !ram_handle->node.opened()) { if (node.unlinked() && !node.opened()) {
destroy(_env.alloc(), &ram_handle->node); destroy(_env.alloc(), &node);
} else if (node_modified) { } else if (node_modified) {
node.notify(); node.notify();
} }