From 5a3d3b25c6ae1d51977f560a46e1d07e3d682f76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Tigeot?= Date: Sun, 14 Aug 2011 15:13:30 +0200 Subject: [PATCH 08/41] Fix a bug in nullfs_mount() All filesystems populate the name of their mount point at mount time. nullfs did not. --- sys/vfs/nullfs/null_vfsops.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/sys/vfs/nullfs/null_vfsops.c b/sys/vfs/nullfs/null_vfsops.c index 520fd1c..eb6d5e9 100644 --- a/sys/vfs/nullfs/null_vfsops.c +++ b/sys/vfs/nullfs/null_vfsops.c @@ -194,6 +194,13 @@ nullfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred) NULLFSDEBUG("nullfs_mount: lower %s, alias at %s\n", mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntfromname); + /* nullfs_statfs doesn't populate f_mntonname */ + bzero(mp->mnt_stat.f_mntonname, MNAMELEN); + if (path != NULL) { + (void) copyinstr(path, mp->mnt_stat.f_mntonname, MNAMELEN - 1, + &size); + } + /* * Set NCALIASED so unmount won't complain about namecache refs * still existing. -- 1.7.5.4