diff --git a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc
index 9e0e205025..e3daffa78b 100644
--- a/repos/dde_linux/src/lib/vfs/lxip/vfs.cc
+++ b/repos/dde_linux/src/lib/vfs/lxip/vfs.cc
@@ -1718,7 +1718,8 @@ struct Lxip_factory : Vfs::File_system_factory
Vfs::File_system *create(Genode::Env &env,
Genode::Allocator &alloc,
Genode::Xml_node config,
- Vfs::Io_response_handler &io_handler) override
+ Vfs::Io_response_handler &io_handler,
+ Vfs::File_system &) override
{
static Init inst(env, alloc);
return new (alloc) Vfs::Lxip_file_system(env, alloc, config, io_handler);
diff --git a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc
index d63b8c6756..26a28569ef 100644
--- a/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc
+++ b/repos/dde_rump/src/lib/vfs/rump/vfs_rump.cc
@@ -713,7 +713,8 @@ class Rump_factory : public Vfs::File_system_factory
Vfs::File_system *create(Genode::Env &env,
Genode::Allocator &alloc,
Genode::Xml_node config,
- Vfs::Io_response_handler &) override
+ Vfs::Io_response_handler &,
+ Vfs::File_system &) override
{
return new (alloc) Vfs::Rump_file_system(env, config);
}
@@ -727,10 +728,11 @@ extern "C" Vfs::File_system_factory *vfs_file_system_factory(void)
Vfs::File_system *create(Genode::Env &env,
Genode::Allocator &alloc,
Genode::Xml_node node,
- Vfs::Io_response_handler &io_handler) override
+ Vfs::Io_response_handler &io_handler,
+ Vfs::File_system &root_dir) override
{
static Rump_factory factory(env, alloc);
- return factory.create(env, alloc, node, io_handler);
+ return factory.create(env, alloc, node, io_handler, root_dir);
}
};
diff --git a/repos/gems/include/gems/vfs.h b/repos/gems/include/gems/vfs.h
index 9c2aa8252e..7eaef84ae8 100644
--- a/repos/gems/include/gems/vfs.h
+++ b/repos/gems/include/gems/vfs.h
@@ -224,7 +224,7 @@ struct Genode::Root_directory : public Vfs::Io_response_handler,
Root_directory(Env &env, Allocator &alloc, Xml_node config)
:
Vfs::Global_file_system_factory(alloc),
- Vfs::Dir_file_system(env, alloc, config, *this, *this, Dir_file_system::Root()),
+ Vfs::Dir_file_system(env, alloc, config, *this, *this),
Directory(*this, env.ep(), alloc)
{ }
diff --git a/repos/libports/src/lib/libc/task.cc b/repos/libports/src/lib/libc/task.cc
index 132db90c9b..d398ff5860 100644
--- a/repos/libports/src/lib/libc/task.cc
+++ b/repos/libports/src/lib/libc/task.cc
@@ -97,7 +97,7 @@ class Libc::Env_implementation : public Libc::Env
:
_env(env), _file_system_factory(alloc),
_vfs(_env, alloc, _vfs_config(), io_response_handler,
- _file_system_factory, Vfs::Dir_file_system::Root())
+ _file_system_factory)
{ }
diff --git a/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc b/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc
index 21e9075513..7636616a06 100644
--- a/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc
+++ b/repos/libports/src/lib/vfs/fatfs/vfs_fatfs.cc
@@ -637,23 +637,25 @@ struct Fatfs_factory : Vfs::File_system_factory
Inner(Genode::Env &env, Genode::Allocator &alloc) {
Fatfs::block_init(env, alloc); }
- Vfs::File_system *create(Genode::Env &env,
- Genode::Allocator &alloc,
- Genode::Xml_node node,
- Vfs::Io_response_handler &) override
+ Vfs::File_system *create(Genode::Env &env,
+ Genode::Allocator &alloc,
+ Genode::Xml_node node,
+ Vfs::Io_response_handler &,
+ Vfs::File_system &) override
{
return new (alloc)
Fatfs::File_system(env, alloc, node);
}
};
- Vfs::File_system *create(Genode::Env &env,
- Genode::Allocator &alloc,
- Genode::Xml_node node,
- Vfs::Io_response_handler &io_handler) override
+ Vfs::File_system *create(Genode::Env &env,
+ Genode::Allocator &alloc,
+ Genode::Xml_node node,
+ Vfs::Io_response_handler &io_handler,
+ Vfs::File_system &root_dir) override
{
static Inner factory(env, alloc);
- return factory.create(env, alloc, node, io_handler);
+ return factory.create(env, alloc, node, io_handler, root_dir);
}
};
diff --git a/repos/libports/src/lib/vfs/jitterentropy/vfs.cc b/repos/libports/src/lib/vfs/jitterentropy/vfs.cc
index 91f4b38997..55214f64a3 100644
--- a/repos/libports/src/lib/vfs/jitterentropy/vfs.cc
+++ b/repos/libports/src/lib/vfs/jitterentropy/vfs.cc
@@ -22,7 +22,7 @@ struct Jitterentropy_factory : Vfs::File_system_factory
{
Vfs::File_system *create(Genode::Env&, Genode::Allocator &alloc,
Genode::Xml_node node,
- Vfs::Io_response_handler &) override
+ Vfs::Io_response_handler &, Vfs::File_system &) override
{
return new (alloc) Jitterentropy_file_system(alloc, node);
}
diff --git a/repos/os/include/vfs/dir_file_system.h b/repos/os/include/vfs/dir_file_system.h
index 05c6d8c5d6..49595f57ff 100644
--- a/repos/os/include/vfs/dir_file_system.h
+++ b/repos/os/include/vfs/dir_file_system.h
@@ -30,8 +30,6 @@ class Vfs::Dir_file_system : public File_system
enum { MAX_NAME_LEN = 128 };
- struct Root { };
-
private:
/*
@@ -45,7 +43,9 @@ class Vfs::Dir_file_system : public File_system
*
* Additionally, the root has an empty _name.
*/
- bool _vfs_root;
+ bool _vfs_root = false;
+
+ Dir_file_system &_root_dir;
struct Dir_vfs_handle : Vfs_handle
{
@@ -95,7 +95,7 @@ class Vfs::Dir_file_system : public File_system
};
/* pointer to first child file system */
- File_system *_first_file_system;
+ File_system *_first_file_system = nullptr;
/* add new file system to the list of children */
void _append_file_system(File_system *fs)
@@ -326,10 +326,10 @@ class Vfs::Dir_file_system : public File_system
Genode::Allocator &alloc,
Genode::Xml_node node,
Io_response_handler &io_handler,
- File_system_factory &fs_factory)
+ File_system_factory &fs_factory,
+ Dir_file_system &root_dir)
:
- _vfs_root(false),
- _first_file_system(0)
+ _root_dir(root_dir)
{
using namespace Genode;
@@ -346,11 +346,14 @@ class Vfs::Dir_file_system : public File_system
/* traverse into
nodes */
if (sub_node.has_type("dir")) {
_append_file_system(new (alloc)
- Dir_file_system(env, alloc, sub_node, io_handler, fs_factory));
+ Dir_file_system(env, alloc, sub_node, io_handler,
+ fs_factory, _root_dir));
continue;
}
- File_system *fs = fs_factory.create(env, alloc, sub_node, io_handler);
+ File_system * const fs =
+ fs_factory.create(env, alloc, sub_node, io_handler, _root_dir);
+
if (fs) {
_append_file_system(fs);
continue;
@@ -369,15 +372,19 @@ class Vfs::Dir_file_system : public File_system
}
}
+ /**
+ * Constructor used for creating the root directory
+ */
Dir_file_system(Genode::Env &env,
Genode::Allocator &alloc,
Genode::Xml_node node,
Io_response_handler &io_handler,
- File_system_factory &fs_factory,
- Dir_file_system::Root)
+ File_system_factory &fs_factory)
:
- Dir_file_system(env, alloc, node, io_handler, fs_factory)
- { _vfs_root = true; }
+ Dir_file_system(env, alloc, node, io_handler, fs_factory, *this)
+ {
+ _vfs_root = true;
+ }
/*********************************
** Directory-service interface **
diff --git a/repos/os/include/vfs/file_system_factory.h b/repos/os/include/vfs/file_system_factory.h
index 2daeea3ab2..1f073b1b3c 100644
--- a/repos/os/include/vfs/file_system_factory.h
+++ b/repos/os/include/vfs/file_system_factory.h
@@ -28,15 +28,17 @@ struct Vfs::File_system_factory : Interface
/**
* Create and return a new file-system
*
- * \param env Env for service connections
- * \param alloc internal file-system allocator
- * \param config file-system configuration
+ * \param env Env for service connections
+ * \param alloc internal file-system allocator
+ * \param config file-system configuration
* \param io_handler callback handler
+ * \param root_dir VFS root directory
*/
- virtual File_system *create(Genode::Env &env,
- Genode::Allocator &alloc,
- Xml_node config,
- Io_response_handler &io_handler) = 0;
+ virtual File_system *create(Genode::Env &env,
+ Genode::Allocator &alloc,
+ Xml_node config,
+ Io_response_handler &io_handler,
+ File_system &root_dir) = 0;
};
@@ -64,10 +66,11 @@ class Vfs::Global_file_system_factory : public Vfs::File_system_factory
template
void _add_builtin_fs();
- Vfs::File_system *_try_create(Genode::Env &env,
- Genode::Allocator &alloc,
- Genode::Xml_node node,
- Io_response_handler &io_handler);
+ Vfs::File_system *_try_create(Genode::Env &env,
+ Genode::Allocator &alloc,
+ Genode::Xml_node node,
+ Io_response_handler &io_handler,
+ Vfs::File_system &root_dir);
/**
* Return name of factory provided by the shared library
@@ -112,17 +115,11 @@ class Vfs::Global_file_system_factory : public Vfs::File_system_factory
Global_file_system_factory(Genode::Allocator &md_alloc);
/**
- * Create and return a new file-system
- *
- * \param env Env for service connections
- * \param alloc internal file-system allocator
- * \param config file-system configuration
- * \param io_handler callback handler
+ * File_system_factory interface
*/
- Vfs::File_system *create(Genode::Env &env,
- Genode::Allocator &alloc,
- Genode::Xml_node node,
- Io_response_handler &io_handler) override;
+ File_system *create(Genode::Env &, Genode::Allocator &,
+ Genode::Xml_node, Io_response_handler &,
+ File_system &) override;
/**
* Register an additional factory for new file-system type
diff --git a/repos/os/src/app/cli_monitor/main.cc b/repos/os/src/app/cli_monitor/main.cc
index 55334bdf57..a2cb0c52e6 100644
--- a/repos/os/src/app/cli_monitor/main.cc
+++ b/repos/os/src/app/cli_monitor/main.cc
@@ -157,7 +157,7 @@ struct Cli_monitor::Main
/* initialize virtual file system */
Vfs::Dir_file_system _root_dir { _env, _heap, _vfs_config(), io_response_handler,
- _global_file_system_factory, Vfs::Dir_file_system::Root() };
+ _global_file_system_factory };
Subsystem_config_registry _subsystem_config_registry { _root_dir, _heap, _env.ep() };
diff --git a/repos/os/src/lib/vfs/block_file_system.h b/repos/os/src/lib/vfs/block_file_system.h
index c56aec5577..f8ff30d554 100644
--- a/repos/os/src/lib/vfs/block_file_system.h
+++ b/repos/os/src/lib/vfs/block_file_system.h
@@ -337,7 +337,8 @@ class Vfs::Block_file_system : public Single_file_system
Block_file_system(Genode::Env &env,
Genode::Allocator &alloc,
Genode::Xml_node config,
- Io_response_handler &)
+ Io_response_handler &,
+ File_system &)
:
Single_file_system(NODE_TYPE_BLOCK_DEVICE, name(), config),
_alloc(alloc),
diff --git a/repos/os/src/lib/vfs/file_system_factory.cc b/repos/os/src/lib/vfs/file_system_factory.cc
index 47d7fdf7f6..112c3762aa 100644
--- a/repos/os/src/lib/vfs/file_system_factory.cc
+++ b/repos/os/src/lib/vfs/file_system_factory.cc
@@ -66,12 +66,13 @@ struct Vfs::Builtin_entry : Vfs::Global_file_system_factory::Entry_base
{
Builtin_entry() : Entry_base(FILE_SYSTEM::name()) { }
- Vfs::File_system *create(Genode::Env &env,
- Genode::Allocator &alloc,
- Genode::Xml_node node,
- Vfs::Io_response_handler &io_handler) override
+ Vfs::File_system *create(Genode::Env &env,
+ Genode::Allocator &alloc,
+ Genode::Xml_node node,
+ Io_response_handler &io_handler,
+ File_system &root_dir) override
{
- return new (alloc) FILE_SYSTEM(env, alloc, node, io_handler);
+ return new (alloc) FILE_SYSTEM(env, alloc, node, io_handler, root_dir);
}
};
@@ -80,16 +81,19 @@ struct Vfs::External_entry : Vfs::Global_file_system_factory::Entry_base
{
File_system_factory &_fs_factory;
- External_entry(Fs_type_name const &name,
- Vfs::File_system_factory &fs_factory)
+ External_entry(Fs_type_name const &name,
+ File_system_factory &fs_factory)
:
Entry_base(name), _fs_factory(fs_factory) { }
- Vfs::File_system *create(Genode::Env &env,
- Genode::Allocator &alloc,
- Genode::Xml_node node,
- Vfs::Io_response_handler &io_handler) override {
- return _fs_factory.create(env, alloc, node, io_handler); }
+ File_system *create(Genode::Env &env,
+ Genode::Allocator &alloc,
+ Genode::Xml_node node,
+ Io_response_handler &io_handler,
+ File_system &root_dir) override
+ {
+ return _fs_factory.create(env, alloc, node, io_handler, root_dir);
+ }
};
@@ -106,14 +110,15 @@ void Vfs::Global_file_system_factory::_add_builtin_fs()
/**
* Lookup and create File_system instance
*/
-Vfs::File_system *Vfs::Global_file_system_factory::_try_create(Genode::Env &env,
- Genode::Allocator &alloc,
- Genode::Xml_node node,
- Io_response_handler &io_handler)
+Vfs::File_system *Vfs::Global_file_system_factory::_try_create(Genode::Env &env,
+ Genode::Allocator &alloc,
+ Genode::Xml_node node,
+ Io_response_handler &io_handler,
+ File_system &root_dir)
{
for (Entry_base *e = _list.first(); e; e = e->next()) {
if (e->matches(node)) {
- return e->create(env, alloc, node, io_handler);
+ return e->create(env, alloc, node, io_handler, root_dir);
}
}
@@ -206,11 +211,12 @@ bool Vfs::Global_file_system_factory::_probe_external_factory(Genode::Env
Vfs::File_system *Vfs::Global_file_system_factory::create(Genode::Env &env,
Genode::Allocator &alloc,
Genode::Xml_node node,
- Io_response_handler &io_handler)
+ Io_response_handler &io_handler,
+ File_system &root_dir)
{
try {
/* try if type is handled by the currently registered fs types */
- if (Vfs::File_system *fs = _try_create(env, alloc, node, io_handler))
+ if (Vfs::File_system *fs = _try_create(env, alloc, node, io_handler, root_dir))
return fs;
/* if the builtin fails, do not try loading an external */
} catch (...) { return 0; }
@@ -219,7 +225,7 @@ Vfs::File_system *Vfs::Global_file_system_factory::create(Genode::Env &e
/* probe for file system implementation available as shared lib */
if (_probe_external_factory(env, alloc, node)) {
/* try again with the new file system type loaded */
- if (Vfs::File_system *fs = _try_create(env, alloc, node, io_handler))
+ if (Vfs::File_system *fs = _try_create(env, alloc, node, io_handler, root_dir))
return fs;
}
} catch (...) { }
diff --git a/repos/os/src/lib/vfs/fs_file_system.h b/repos/os/src/lib/vfs/fs_file_system.h
index 78ad1ef661..bece8499b1 100644
--- a/repos/os/src/lib/vfs/fs_file_system.h
+++ b/repos/os/src/lib/vfs/fs_file_system.h
@@ -577,7 +577,8 @@ class Vfs::Fs_file_system : public File_system
Fs_file_system(Genode::Env &env,
Genode::Allocator &alloc,
Genode::Xml_node config,
- Io_response_handler &io_handler)
+ Io_response_handler &io_handler,
+ File_system &)
:
_env(env),
_fs_packet_alloc(&alloc),
diff --git a/repos/os/src/lib/vfs/inline_file_system.h b/repos/os/src/lib/vfs/inline_file_system.h
index c640a6329b..ae8023a0c9 100644
--- a/repos/os/src/lib/vfs/inline_file_system.h
+++ b/repos/os/src/lib/vfs/inline_file_system.h
@@ -101,10 +101,11 @@ class Vfs::Inline_file_system : public Single_file_system
public:
- Inline_file_system(Genode::Env&,
- Genode::Allocator&,
+ Inline_file_system(Genode::Env &,
+ Genode::Allocator &,
Genode::Xml_node config,
- Io_response_handler &)
+ Io_response_handler &,
+ File_system &)
:
Single_file_system(NODE_TYPE_FILE, name(), config),
_base(config.content_base()),
diff --git a/repos/os/src/lib/vfs/log_file_system.h b/repos/os/src/lib/vfs/log_file_system.h
index f2c273925e..b2a0b46be2 100644
--- a/repos/os/src/lib/vfs/log_file_system.h
+++ b/repos/os/src/lib/vfs/log_file_system.h
@@ -94,7 +94,8 @@ class Vfs::Log_file_system : public Single_file_system
Log_file_system(Genode::Env &env,
Genode::Allocator&,
Genode::Xml_node config,
- Io_response_handler &)
+ Io_response_handler &,
+ File_system &)
:
Single_file_system(NODE_TYPE_CHAR_DEVICE, name(), config),
_label(config.attribute_value("label", Label())),
diff --git a/repos/os/src/lib/vfs/null_file_system.h b/repos/os/src/lib/vfs/null_file_system.h
index cfb675d909..349901e8e0 100644
--- a/repos/os/src/lib/vfs/null_file_system.h
+++ b/repos/os/src/lib/vfs/null_file_system.h
@@ -22,10 +22,9 @@ namespace Vfs { class Null_file_system; }
struct Vfs::Null_file_system : Single_file_system
{
- Null_file_system(Genode::Env&,
- Genode::Allocator&,
+ Null_file_system(Genode::Env&, Genode::Allocator&,
Genode::Xml_node config,
- Io_response_handler &)
+ Io_response_handler &, File_system &)
:
Single_file_system(NODE_TYPE_CHAR_DEVICE, name(), config)
{ }
diff --git a/repos/os/src/lib/vfs/ram_file_system.h b/repos/os/src/lib/vfs/ram_file_system.h
index fc89fe89b3..f125d89469 100644
--- a/repos/os/src/lib/vfs/ram_file_system.h
+++ b/repos/os/src/lib/vfs/ram_file_system.h
@@ -507,7 +507,7 @@ class Vfs::Ram_file_system : public Vfs::File_system
Ram_file_system(Genode::Env &env,
Genode::Allocator &alloc,
Genode::Xml_node,
- Io_response_handler &)
+ Io_response_handler &, File_system &)
: _env(env), _alloc(alloc) { }
~Ram_file_system() { _root.empty(_alloc); }
diff --git a/repos/os/src/lib/vfs/rom_file_system.h b/repos/os/src/lib/vfs/rom_file_system.h
index a2467122ea..89f1ca238a 100644
--- a/repos/os/src/lib/vfs/rom_file_system.h
+++ b/repos/os/src/lib/vfs/rom_file_system.h
@@ -105,7 +105,8 @@ class Vfs::Rom_file_system : public Single_file_system
Rom_file_system(Genode::Env &env,
Genode::Allocator&,
Genode::Xml_node config,
- Io_response_handler &)
+ Io_response_handler &,
+ File_system &)
:
Single_file_system(NODE_TYPE_FILE, name(), config),
_label(config),
diff --git a/repos/os/src/lib/vfs/rtc_file_system.h b/repos/os/src/lib/vfs/rtc_file_system.h
index e4aafac724..0b456a3092 100644
--- a/repos/os/src/lib/vfs/rtc_file_system.h
+++ b/repos/os/src/lib/vfs/rtc_file_system.h
@@ -89,7 +89,8 @@ class Vfs::Rtc_file_system : public Single_file_system
Rtc_file_system(Genode::Env &env,
Genode::Allocator&,
Genode::Xml_node config,
- Io_response_handler &)
+ Io_response_handler &,
+ File_system &)
:
Single_file_system(NODE_TYPE_CHAR_DEVICE, name(), config),
_rtc(env)
diff --git a/repos/os/src/lib/vfs/symlink_file_system.h b/repos/os/src/lib/vfs/symlink_file_system.h
index 28e811cde2..c2904b0fb7 100644
--- a/repos/os/src/lib/vfs/symlink_file_system.h
+++ b/repos/os/src/lib/vfs/symlink_file_system.h
@@ -31,10 +31,9 @@ class Vfs::Symlink_file_system : public Single_file_system
public:
- Symlink_file_system(Genode::Env&,
- Genode::Allocator&,
+ Symlink_file_system(Genode::Env &, Genode::Allocator &,
Genode::Xml_node config,
- Io_response_handler&)
+ Io_response_handler &, File_system &)
:
Single_file_system(NODE_TYPE_SYMLINK, "symlink", config),
_target(config.attribute_value("target", Target()))
diff --git a/repos/os/src/lib/vfs/tar_file_system.h b/repos/os/src/lib/vfs/tar_file_system.h
index 34b4da62a6..828a239cf6 100644
--- a/repos/os/src/lib/vfs/tar_file_system.h
+++ b/repos/os/src/lib/vfs/tar_file_system.h
@@ -515,7 +515,8 @@ class Vfs::Tar_file_system : public File_system
Tar_file_system(Genode::Env &env,
Genode::Allocator &alloc,
Genode::Xml_node config,
- Io_response_handler &)
+ Io_response_handler &,
+ File_system &)
:
_env(env), _alloc(alloc),
_rom_name(config.attribute_value("name", Rom_name())),
diff --git a/repos/os/src/lib/vfs/terminal_file_system.h b/repos/os/src/lib/vfs/terminal_file_system.h
index 670da0176e..2bf0fd0058 100644
--- a/repos/os/src/lib/vfs/terminal_file_system.h
+++ b/repos/os/src/lib/vfs/terminal_file_system.h
@@ -106,9 +106,10 @@ class Vfs::Terminal_file_system : public Single_file_system
public:
Terminal_file_system(Genode::Env &env,
- Genode::Allocator&,
+ Genode::Allocator &,
Genode::Xml_node config,
- Io_response_handler &io_handler)
+ Io_response_handler &io_handler,
+ File_system &)
:
Single_file_system(NODE_TYPE_CHAR_DEVICE, name(), config),
_label(config.attribute_value("label", Label())),
diff --git a/repos/os/src/lib/vfs/zero_file_system.h b/repos/os/src/lib/vfs/zero_file_system.h
index 600b8b248b..2330ade7cc 100644
--- a/repos/os/src/lib/vfs/zero_file_system.h
+++ b/repos/os/src/lib/vfs/zero_file_system.h
@@ -22,10 +22,9 @@ namespace Vfs { class Zero_file_system; }
struct Vfs::Zero_file_system : Single_file_system
{
- Zero_file_system(Genode::Env&,
- Genode::Allocator&,
+ Zero_file_system(Genode::Env &, Genode::Allocator &,
Genode::Xml_node config,
- Io_response_handler &)
+ Io_response_handler &, File_system &)
:
Single_file_system(NODE_TYPE_CHAR_DEVICE, name(), config)
{ }
diff --git a/repos/os/src/server/fs_report/main.cc b/repos/os/src/server/fs_report/main.cc
index 09ce8ab579..d13989e5d2 100644
--- a/repos/os/src/server/fs_report/main.cc
+++ b/repos/os/src/server/fs_report/main.cc
@@ -208,8 +208,7 @@ class Fs_report::Root : public Genode::Root_component
Vfs::Dir_file_system _vfs {
_env, _heap, vfs_config(),
_io_response_handler,
- _global_file_system_factory,
- Vfs::Dir_file_system::Root() };
+ _global_file_system_factory };
Genode::Signal_handler _config_dispatcher {
_env.ep(), *this, &Root::_config_update };
diff --git a/repos/os/src/server/vfs/main.cc b/repos/os/src/server/vfs/main.cc
index 8b4f93d5bb..23223f2bdc 100644
--- a/repos/os/src/server/vfs/main.cc
+++ b/repos/os/src/server/vfs/main.cc
@@ -682,7 +682,7 @@ class Vfs_server::Root : public Genode::Root_component
Vfs::Dir_file_system _vfs {
_env, _vfs_heap, vfs_config(), _io_response_handler,
- _global_file_system_factory, Vfs::Dir_file_system::Root() };
+ _global_file_system_factory };
Genode::Signal_handler _config_handler {
_env.ep(), *this, &Root::_config_update };
diff --git a/repos/os/src/test/vfs_stress/main.cc b/repos/os/src/test/vfs_stress/main.cc
index 58eb018e72..69fad21779 100644
--- a/repos/os/src/test/vfs_stress/main.cc
+++ b/repos/os/src/test/vfs_stress/main.cc
@@ -531,10 +531,9 @@ void Component::construct(Genode::Env &env)
Vfs::Global_file_system_factory global_file_system_factory(heap);
- Vfs::Dir_file_system vfs_root(env, heap, config_xml.sub_node("vfs"),
- io_response_handler,
- global_file_system_factory,
- Vfs::Dir_file_system::Root());
+ Vfs::Dir_file_system vfs_root { env, heap, config_xml.sub_node("vfs"),
+ io_response_handler,
+ global_file_system_factory };
Vfs::Vfs_handle *vfs_root_handle;
vfs_root.opendir("/", false, &vfs_root_handle, heap);
diff --git a/repos/ports/src/noux/main.cc b/repos/ports/src/noux/main.cc
index 73be9ad2b9..9fd4a04a14 100644
--- a/repos/ports/src/noux/main.cc
+++ b/repos/ports/src/noux/main.cc
@@ -235,9 +235,7 @@ struct Noux::Main
} _io_response_handler;
Vfs::Dir_file_system _root_dir { _env, _heap, _config.xml().sub_node("fstab"),
- _io_response_handler,
- _global_file_system_factory,
- Vfs::Dir_file_system::Root() };
+ _io_response_handler, _global_file_system_factory };
Vfs_handle_context _vfs_handle_context;