summaryrefslogtreecommitdiffstats
path: root/sys/fs/ntfs/ntfs_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/ntfs/ntfs_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/ntfs/ntfs_vfsops.c')
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index a9a9c7a..3bd803c 100644
--- a/sys/fs/ntfs/ntfs_vfsops.c
+++ b/sys/fs/ntfs/ntfs_vfsops.c
@@ -71,7 +71,7 @@ static vfs_init_t ntfs_init;
static vfs_uninit_t ntfs_uninit;
static vfs_vget_t ntfs_vget;
static vfs_fhtovp_t ntfs_fhtovp;
-static vfs_mount_t ntfs_mount;
+static vfs_omount_t ntfs_omount;
static vfs_root_t ntfs_root;
static vfs_statfs_t ntfs_statfs;
static vfs_unmount_t ntfs_unmount;
@@ -96,17 +96,17 @@ ntfs_uninit (
}
static int
-ntfs_mount (
+ntfs_omount (
struct mount *mp,
char *path,
caddr_t data,
- struct nameidata *ndp,
struct thread *td )
{
size_t size;
int err = 0;
struct vnode *devvp, *rootvp;
struct ntfs_args args;
+ struct nameidata ndp;
/*
* Use NULL path to flag a root mount
@@ -174,14 +174,14 @@ ntfs_mount (
* Not an update, or updating the name: look up the name
* and verify that it refers to a sensible block device.
*/
- NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td);
- err = namei(ndp);
+ NDINIT(&ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td);
+ err = namei(&ndp);
if (err) {
/* can't get devvp!*/
goto error_1;
}
- NDFREE(ndp, NDF_ONLY_PNBUF);
- devvp = ndp->ni_vp;
+ NDFREE(&ndp, NDF_ONLY_PNBUF);
+ devvp = ndp.ni_vp;
if (!vn_isdisk(devvp, &err))
goto error_2;
@@ -256,6 +256,7 @@ error_2: /* error with devvp held*/
vrele(devvp);
error_1: /* no state to back out*/
+ /* XXX: missing NDFREE(&ndp, ...) */
success:
return(err);
@@ -786,7 +787,7 @@ ntfs_vget(
static struct vfsops ntfs_vfsops = {
.vfs_fhtovp = ntfs_fhtovp,
.vfs_init = ntfs_init,
- .vfs_mount = ntfs_mount,
+ .vfs_omount = ntfs_omount,
.vfs_root = ntfs_root,
.vfs_statfs = ntfs_statfs,
.vfs_uninit = ntfs_uninit,
OpenPOWER on IntegriCloud