summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/fs/fdescfs/fdesc_vfsops.c4
-rw-r--r--sys/fs/nullfs/null_vfsops.c7
2 files changed, 3 insertions, 8 deletions
diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c
index d3b0be7..2492fef 100644
--- a/sys/fs/fdescfs/fdesc_vfsops.c
+++ b/sys/fs/fdescfs/fdesc_vfsops.c
@@ -88,9 +88,7 @@ fdesc_mount(struct mount *mp, struct thread *td)
mp->mnt_data = (qaddr_t) fmp;
vfs_getnewfsid(mp);
- bzero(mp->mnt_stat.f_mntfromname, MNAMELEN);
- bcopy("fdescfs", mp->mnt_stat.f_mntfromname, sizeof("fdescfs"));
- (void)fdesc_statfs(mp, &mp->mnt_stat, td);
+ vfs_mountedfrom(mp, "fdescfs");
return (0);
}
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c
index fc8967a..21ee962 100644
--- a/sys/fs/nullfs/null_vfsops.c
+++ b/sys/fs/nullfs/null_vfsops.c
@@ -78,7 +78,6 @@ nullfs_mount(struct mount *mp, struct thread *td)
struct vnode *nullm_rootvp;
struct null_mount *xmp;
char *target;
- size_t size;
int isvnunlocked = 0, len;
struct nameidata nd, *ndp = &nd;
@@ -184,10 +183,8 @@ nullfs_mount(struct mount *mp, struct thread *td)
mp->mnt_data = (qaddr_t) xmp;
vfs_getnewfsid(mp);
- (void) copystr(target, mp->mnt_stat.f_mntfromname,
- MNAMELEN - 1, &size);
- bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size);
- (void)nullfs_statfs(mp, &mp->mnt_stat, td);
+ vfs_mountedfrom(mp, target);
+
NULLFSDEBUG("nullfs_mount: lower %s, alias at %s\n",
mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname);
return (0);
OpenPOWER on IntegriCloud