From 559ac49d419058132fa08d206bbf1618df8ff243 Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Sun, 6 Oct 2019 22:16:55 +0000 Subject: devfs: add root vnode caching See r353150. Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21646 --- sys/fs/devfs/devfs_vfsops.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c index c093cfb4c1517..33f967ae85012 100644 --- a/sys/fs/devfs/devfs_vfsops.c +++ b/sys/fs/devfs/devfs_vfsops.c @@ -156,6 +156,7 @@ devfs_mount(struct mount *mp) } VOP_UNLOCK(rvp, 0); + vfs_cache_root_set(mp, rvp); vfs_mountedfrom(mp, "devfs"); @@ -237,7 +238,8 @@ devfs_statfs(struct mount *mp, struct statfs *sbp) static struct vfsops devfs_vfsops = { .vfs_mount = devfs_mount, - .vfs_root = devfs_root, + .vfs_root = vfs_cache_root, + .vfs_cachedroot = devfs_root, .vfs_statfs = devfs_statfs, .vfs_unmount = devfs_unmount, }; -- cgit v1.2.3