diff --git a/sys/fs/union/union_vfsops.c b/sys/fs/union/union_vfsops.c index bc77f5044843..a8d131a24b1f 100644 --- a/sys/fs/union/union_vfsops.c +++ b/sys/fs/union/union_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: union_vfsops.c,v 1.78 2017/04/01 19:35:56 riastradh Exp $ */ +/* $NetBSD: union_vfsops.c,v 1.79 2019/02/20 10:05:59 hannken Exp $ */ /* * Copyright (c) 1994 The Regents of the University of California. @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.78 2017/04/01 19:35:56 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: union_vfsops.c,v 1.79 2019/02/20 10:05:59 hannken Exp $"); #include #include @@ -246,14 +246,13 @@ union_mount(struct mount *mp, const char *path, void *data, size_t *data_len) mp->mnt_data = um; vfs_getnewfsid(mp); + mp->mnt_lower = um->um_uppervp->v_mount; error = set_statvfs_info( path, UIO_USERSPACE, NULL, UIO_USERSPACE, mp->mnt_op->vfs_name, mp, l); if (error) goto bad; - mp->mnt_lower = um->um_uppervp->v_mount; - switch (um->um_op) { case UNMNT_ABOVE: cp = ":"; diff --git a/sys/miscfs/nullfs/null_vfsops.c b/sys/miscfs/nullfs/null_vfsops.c index a8ea2bd7bacd..9a3d4d9e028d 100644 --- a/sys/miscfs/nullfs/null_vfsops.c +++ b/sys/miscfs/nullfs/null_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: null_vfsops.c,v 1.94 2017/04/11 07:51:37 hannken Exp $ */ +/* $NetBSD: null_vfsops.c,v 1.95 2019/02/20 10:06:00 hannken Exp $ */ /* * Copyright (c) 1999 National Aeronautics & Space Administration @@ -76,7 +76,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.94 2017/04/11 07:51:37 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: null_vfsops.c,v 1.95 2019/02/20 10:06:00 hannken Exp $"); #include #include @@ -146,6 +146,7 @@ nullfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len) * that the node create call will work. */ vfs_getnewfsid(mp); + mp->mnt_lower = lowerrootvp->v_mount; nmp->nullm_size = sizeof(struct null_node); nmp->nullm_tag = VT_NULL; @@ -175,7 +176,6 @@ nullfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len) if (error) return error; - mp->mnt_lower = lowerrootvp->v_mount; if (mp->mnt_lower->mnt_flag & MNT_LOCAL) mp->mnt_flag |= MNT_LOCAL; return 0; diff --git a/sys/miscfs/overlay/overlay_vfsops.c b/sys/miscfs/overlay/overlay_vfsops.c index e297ac1ba9a3..786b89fa2a08 100644 --- a/sys/miscfs/overlay/overlay_vfsops.c +++ b/sys/miscfs/overlay/overlay_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: overlay_vfsops.c,v 1.67 2017/04/11 07:51:37 hannken Exp $ */ +/* $NetBSD: overlay_vfsops.c,v 1.68 2019/02/20 10:06:00 hannken Exp $ */ /* * Copyright (c) 1999, 2000 National Aeronautics & Space Administration @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.67 2017/04/11 07:51:37 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: overlay_vfsops.c,v 1.68 2019/02/20 10:06:00 hannken Exp $"); #include #include @@ -155,6 +155,7 @@ ov_mount(struct mount *mp, const char *path, void *data, size_t *data_len) * that the node create call will work. */ vfs_getnewfsid(mp); + mp->mnt_lower = lowerrootvp->v_mount; nmp->ovm_size = sizeof (struct overlay_node); nmp->ovm_tag = VT_OVERLAY; @@ -189,7 +190,6 @@ ov_mount(struct mount *mp, const char *path, void *data, size_t *data_len) if (error) return error; - mp->mnt_lower = lowerrootvp->v_mount; if (mp->mnt_lower->mnt_flag & MNT_LOCAL) mp->mnt_flag |= MNT_LOCAL; #ifdef OVERLAYFS_DIAGNOSTIC diff --git a/sys/miscfs/umapfs/umap_vfsops.c b/sys/miscfs/umapfs/umap_vfsops.c index fb4e191d21bd..d0ab99eaa499 100644 --- a/sys/miscfs/umapfs/umap_vfsops.c +++ b/sys/miscfs/umapfs/umap_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: umap_vfsops.c,v 1.99 2017/04/11 07:51:37 hannken Exp $ */ +/* $NetBSD: umap_vfsops.c,v 1.100 2019/02/20 10:06:00 hannken Exp $ */ /* * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.99 2017/04/11 07:51:37 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.100 2019/02/20 10:06:00 hannken Exp $"); #include #include @@ -191,6 +191,8 @@ umapfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len) * that the node create call will work. */ vfs_getnewfsid(mp); + mp->mnt_lower = lowerrootvp->v_mount; + amp->umapm_size = sizeof(struct umap_node); amp->umapm_tag = VT_UMAP; amp->umapm_bypass = umap_bypass; @@ -224,7 +226,6 @@ umapfs_mount(struct mount *mp, const char *path, void *data, size_t *data_len) if (error) return error; - mp->mnt_lower = lowerrootvp->v_mount; if (mp->mnt_lower->mnt_flag & MNT_LOCAL) mp->mnt_flag |= MNT_LOCAL; #ifdef UMAPFS_DIAGNOSTIC