/proc/stat was in the wrong place.
Move it.

Signed-off-by: Benoît Canet <ben...@scylladb.com>
---
 fs/procfs/procfs_vnops.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/procfs/procfs_vnops.cc b/fs/procfs/procfs_vnops.cc
index dc66ff59..437f8302 100644
--- a/fs/procfs/procfs_vnops.cc
+++ b/fs/procfs/procfs_vnops.cc
@@ -357,9 +357,8 @@ procfs_mount(mount* mp, const char *dev, int flags, const 
void* data)
 
     auto self = make_shared<proc_dir_node>(inode_count++);
     self->add("maps", inode_count++, mmu::procfs_maps);
-    self->add("stat", inode_count++, procfs_stats);
-
     auto* root = new proc_dir_node(vp->v_ino);
+    root->add("stat", inode_count++, procfs_stats);
     root->add("self", self);
     root->add("0", self); // our standard pid
     root->add("mounts", inode_count++, procfs_mounts);
-- 
2.13.5

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to