summaryrefslogtreecommitdiffstats
path: root/sys/fs/unionfs/union_vfsops.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2004-07-30 22:08:52 +0000
committerphk <phk@FreeBSD.org>2004-07-30 22:08:52 +0000
commit2d868d02cfcc9af8da398c52add2f28fe1c493bc (patch)
treeaf2a6b4c3e63a13443b647b947b57d5b31690b5a /sys/fs/unionfs/union_vfsops.c
parent941a15ae99cc0252acd241ea5e407eb00a540858 (diff)
downloadFreeBSD-src-2d868d02cfcc9af8da398c52add2f28fe1c493bc.zip
FreeBSD-src-2d868d02cfcc9af8da398c52add2f28fe1c493bc.tar.gz
Put a version element in the VFS filesystem configuration structure
and refuse initializing filesystems with a wrong version. This will aid maintenance activites on the 5-stable branch. s/vfs_mount/vfs_omount/ s/vfs_nmount/vfs_mount/ Name our filesystems mount function consistently. Eliminate the namiedata argument to both vfs_mount and vfs_omount. It was originally there to save stack space. A few places abused it to get hold of some credentials to pass around. Effectively it is unused. Reorganize the root filesystem selection code.
Diffstat (limited to 'sys/fs/unionfs/union_vfsops.c')
-rw-r--r--sys/fs/unionfs/union_vfsops.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c
index e756e18..1b5293e 100644
--- a/sys/fs/unionfs/union_vfsops.c
+++ b/sys/fs/unionfs/union_vfsops.c
@@ -55,7 +55,7 @@ static MALLOC_DEFINE(M_UNIONFSMNT, "UNION mount", "UNION mount structure");
extern vfs_init_t union_init;
static vfs_root_t union_root;
-static vfs_nmount_t union_mount;
+static vfs_mount_t union_mount;
static vfs_statfs_t union_statfs;
static vfs_unmount_t union_unmount;
@@ -63,9 +63,8 @@ static vfs_unmount_t union_unmount;
* Mount union filesystem.
*/
static int
-union_mount(mp, ndp, td)
+union_mount(mp, td)
struct mount *mp;
- struct nameidata *ndp;
struct thread *td;
{
int error = 0;
@@ -79,6 +78,7 @@ union_mount(mp, ndp, td)
int len;
size_t size;
struct componentname fakecn;
+ struct nameidata nd, *ndp = &nd;
UDEBUG(("union_mount(mp = %p)\n", (void *)mp));
@@ -486,7 +486,7 @@ union_statfs(mp, sbp, td)
static struct vfsops union_vfsops = {
.vfs_init = union_init,
- .vfs_nmount = union_mount,
+ .vfs_mount = union_mount,
.vfs_root = union_root,
.vfs_statfs = union_statfs,
.vfs_unmount = union_unmount,
OpenPOWER on IntegriCloud