diff options
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/cd9660/cd9660_vfsops.c | 16 | ||||
-rw-r--r-- | sys/fs/coda/coda_vfsops.c | 27 | ||||
-rw-r--r-- | sys/fs/devfs/devfs_vfsops.c | 9 | ||||
-rw-r--r-- | sys/fs/fdescfs/fdesc_vfsops.c | 9 | ||||
-rw-r--r-- | sys/fs/hpfs/hpfs_vfsops.c | 23 | ||||
-rw-r--r-- | sys/fs/msdosfs/msdosfs_vfsops.c | 18 | ||||
-rw-r--r-- | sys/fs/ntfs/ntfs_vfsops.c | 17 | ||||
-rw-r--r-- | sys/fs/nullfs/null_vfsops.c | 10 | ||||
-rw-r--r-- | sys/fs/nwfs/nwfs_vfsops.c | 8 | ||||
-rw-r--r-- | sys/fs/portalfs/portal_vfsops.c | 7 | ||||
-rw-r--r-- | sys/fs/pseudofs/pseudofs.c | 3 | ||||
-rw-r--r-- | sys/fs/pseudofs/pseudofs.h | 9 | ||||
-rw-r--r-- | sys/fs/smbfs/smbfs_vfsops.c | 7 | ||||
-rw-r--r-- | sys/fs/udf/udf_vfsops.c | 7 | ||||
-rw-r--r-- | sys/fs/umapfs/umap_vfsops.c | 6 | ||||
-rw-r--r-- | sys/fs/unionfs/union_vfsops.c | 8 |
16 files changed, 88 insertions, 96 deletions
diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c index 7c8344934d7f..639dc75cbf77 100644 --- a/sys/fs/cd9660/cd9660_vfsops.c +++ b/sys/fs/cd9660/cd9660_vfsops.c @@ -65,7 +65,7 @@ MALLOC_DEFINE(M_ISOFSNODE, "ISOFS node", "ISOFS vnode private part"); struct iconv_functions *cd9660_iconv = NULL; -static vfs_mount_t cd9660_mount; +static vfs_omount_t cd9660_omount; static vfs_unmount_t cd9660_unmount; static vfs_root_t cd9660_root; static vfs_statfs_t cd9660_statfs; @@ -76,7 +76,7 @@ static vfs_vptofh_t cd9660_vptofh; static struct vfsops cd9660_vfsops = { .vfs_fhtovp = cd9660_fhtovp, .vfs_init = cd9660_init, - .vfs_mount = cd9660_mount, + .vfs_omount = cd9660_omount, .vfs_root = cd9660_root, .vfs_statfs = cd9660_statfs, .vfs_uninit = cd9660_uninit, @@ -179,11 +179,10 @@ iso_mountroot(mp, td) * mount system call */ static int -cd9660_mount(mp, path, data, ndp, td) +cd9660_omount(mp, path, data, td) struct mount *mp; char *path; caddr_t data; - struct nameidata *ndp; struct thread *td; { struct vnode *devvp; @@ -192,6 +191,7 @@ cd9660_mount(mp, path, data, ndp, td) int error; mode_t accessmode; struct iso_mnt *imp = 0; + struct nameidata ndp; if (path == NULL) /* We are doing the initial root mount */ return (iso_mountroot(mp, td)); @@ -214,11 +214,11 @@ cd9660_mount(mp, path, data, ndp, td) * 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); - if ((error = namei(ndp))) + NDINIT(&ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td); + if ((error = namei(&ndp))) return (error); - NDFREE(ndp, NDF_ONLY_PNBUF); - devvp = ndp->ni_vp; + NDFREE(&ndp, NDF_ONLY_PNBUF); + devvp = ndp.ni_vp; if (!vn_isdisk(devvp, &error)) { vrele(devvp); diff --git a/sys/fs/coda/coda_vfsops.c b/sys/fs/coda/coda_vfsops.c index de84eb076f1d..189ee92487fc 100644 --- a/sys/fs/coda/coda_vfsops.c +++ b/sys/fs/coda/coda_vfsops.c @@ -83,6 +83,8 @@ struct coda_op_stats coda_vfsopstats[CODA_VFSOPS_SIZE]; extern int coda_nc_initialized; /* Set if cache has been initialized */ extern int vc_nb_open(struct cdev *, int, int, struct thread *); +static vfs_omount_t coda_omount; + int coda_vfsopstats_init(void) { @@ -105,11 +107,10 @@ coda_vfsopstats_init(void) */ /*ARGSUSED*/ int -coda_mount(vfsp, path, data, ndp, td) +coda_omount(vfsp, path, data, td) struct mount *vfsp; /* Allocated and initialized by mount(2) */ char *path; /* path covered: ignored by the fs-layer */ caddr_t data; /* Need to define a data type for this in netbsd? */ - struct nameidata *ndp; /* Clobber this to lookup the device name */ struct thread *td; { struct vnode *dvp; @@ -120,7 +121,7 @@ coda_mount(vfsp, path, data, ndp, td) CodaFid rootfid = INVAL_FID; CodaFid ctlfid = CTL_FID; int error; - + struct nameidata ndp; ENTRY; coda_vfsopstats_init(); @@ -133,9 +134,9 @@ coda_mount(vfsp, path, data, ndp, td) } /* Validate mount device. Similar to getmdev(). */ - NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, data, td); - error = namei(ndp); - dvp = ndp->ni_vp; + NDINIT(&ndp, LOOKUP, FOLLOW, UIO_USERSPACE, data, td); + error = namei(&ndp); + dvp = ndp.ni_vp; if (error) { MARK_INT_FAIL(CODA_MOUNT_STATS); @@ -144,12 +145,12 @@ coda_mount(vfsp, path, data, ndp, td) if (dvp->v_type != VCHR) { MARK_INT_FAIL(CODA_MOUNT_STATS); vrele(dvp); - NDFREE(ndp, NDF_ONLY_PNBUF); + NDFREE(&ndp, NDF_ONLY_PNBUF); return(ENXIO); } dev = dvp->v_rdev; vrele(dvp); - NDFREE(ndp, NDF_ONLY_PNBUF); + NDFREE(&ndp, NDF_ONLY_PNBUF); /* * See if the device table matches our expectations. @@ -216,7 +217,7 @@ coda_mount(vfsp, path, data, ndp, td) /* error is currently guaranteed to be zero, but in case some code changes... */ CODADEBUG(1, - myprintf(("coda_mount returned %d\n",error));); + myprintf(("coda_omount returned %d\n",error));); if (error) MARK_INT_FAIL(CODA_MOUNT_STATS); else @@ -300,10 +301,10 @@ coda_root(vfsp, vpp, td) /* * Cache the root across calls. We only need to pass the request * on to Venus if the root vnode is the dummy we installed in - * coda_mount() with all c_fid members zeroed. + * coda_omount() with all c_fid members zeroed. * - * XXX In addition, if we are called between coda_mount() and - * coda_start(), we assume that the request is from vfs_mount() + * XXX In addition, if we are called between coda_omount() and + * coda_start(), we assume that the request is from vfs_omount() * (before the call to checkdirs()) and return the dummy root * node to avoid a deadlock. This bug is fixed in the Coda CVS * repository but not in any released versions as of 6 Mar 2003. @@ -543,7 +544,7 @@ struct mount *devtomp(dev) } struct vfsops coda_vfsops = { - .vfs_mount = coda_mount, + .vfs_omount = coda_omount, .vfs_root = coda_root, .vfs_start = coda_start, .vfs_statfs = coda_nb_statfs, diff --git a/sys/fs/devfs/devfs_vfsops.c b/sys/fs/devfs/devfs_vfsops.c index f23d6603facc..27a759f00f6b 100644 --- a/sys/fs/devfs/devfs_vfsops.c +++ b/sys/fs/devfs/devfs_vfsops.c @@ -51,7 +51,7 @@ MALLOC_DEFINE(M_DEVFS, "DEVFS", "DEVFS data"); -static vfs_nmount_t devfs_nmount; +static vfs_mount_t devfs_mount; static vfs_unmount_t devfs_unmount; static vfs_root_t devfs_root; static vfs_statfs_t devfs_statfs; @@ -60,10 +60,7 @@ static vfs_statfs_t devfs_statfs; * Mount the filesystem */ static int -devfs_nmount(mp, ndp, td) - struct mount *mp; - struct nameidata *ndp; - struct thread *td; +devfs_mount(struct mount *mp, struct thread *td) { int error; struct devfs_mount *fmp; @@ -187,7 +184,7 @@ devfs_statfs(mp, sbp, td) } static struct vfsops devfs_vfsops = { - .vfs_nmount = devfs_nmount, + .vfs_mount = devfs_mount, .vfs_root = devfs_root, .vfs_statfs = devfs_statfs, .vfs_unmount = devfs_unmount, diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c index 2cd56f549d98..01e895660c03 100644 --- a/sys/fs/fdescfs/fdesc_vfsops.c +++ b/sys/fs/fdescfs/fdesc_vfsops.c @@ -54,7 +54,7 @@ static MALLOC_DEFINE(M_FDESCMNT, "FDESC mount", "FDESC mount structure"); -static vfs_nmount_t fdesc_mount; +static vfs_mount_t fdesc_mount; static vfs_unmount_t fdesc_unmount; static vfs_statfs_t fdesc_statfs; @@ -62,10 +62,7 @@ static vfs_statfs_t fdesc_statfs; * Mount the per-process file descriptors (/dev/fd) */ static int -fdesc_mount(mp, ndp, td) - struct mount *mp; - struct nameidata *ndp; - struct thread *td; +fdesc_mount(struct mount *mp, struct thread *td) { int error = 0; struct fdescmount *fmp; @@ -203,7 +200,7 @@ fdesc_statfs(mp, sbp, td) static struct vfsops fdesc_vfsops = { .vfs_init = fdesc_init, - .vfs_nmount = fdesc_mount, + .vfs_mount = fdesc_mount, .vfs_root = fdesc_root, .vfs_statfs = fdesc_statfs, .vfs_unmount = fdesc_unmount, diff --git a/sys/fs/hpfs/hpfs_vfsops.c b/sys/fs/hpfs/hpfs_vfsops.c index 9ea6cfba965f..e002feb60b64 100644 --- a/sys/fs/hpfs/hpfs_vfsops.c +++ b/sys/fs/hpfs/hpfs_vfsops.c @@ -62,7 +62,7 @@ static vfs_init_t hpfs_init; static vfs_uninit_t hpfs_uninit; static vfs_fhtovp_t hpfs_fhtovp; static vfs_vget_t hpfs_vget; -static vfs_mount_t hpfs_mount; +static vfs_omount_t hpfs_omount; static vfs_root_t hpfs_root; static vfs_statfs_t hpfs_statfs; static vfs_unmount_t hpfs_unmount; @@ -87,11 +87,10 @@ hpfs_uninit (vfsp) } static int -hpfs_mount ( +hpfs_omount ( struct mount *mp, char *path, caddr_t data, - struct nameidata *ndp, struct thread *td ) { size_t size; @@ -99,8 +98,9 @@ hpfs_mount ( struct vnode *devvp; struct hpfs_args args; struct hpfsmount *hpmp = 0; + struct nameidata ndp; - dprintf(("hpfs_mount():\n")); + dprintf(("hpfs_omount():\n")); /* *** * Mounting non-root filesystem or updating a filesystem @@ -117,7 +117,7 @@ hpfs_mount ( * read/write; if there is no device name, that's all we do. */ if (mp->mnt_flag & MNT_UPDATE) { - dprintf(("hpfs_mount: MNT_UPDATE: ")); + dprintf(("hpfs_omount: MNT_UPDATE: ")); hpmp = VFSTOHPFS(mp); @@ -125,7 +125,7 @@ hpfs_mount ( dprintf(("export 0x%x\n",args.export.ex_flags)); err = vfs_export(mp, &args.export); if (err) { - printf("hpfs_mount: vfs_export failed %d\n", + printf("hpfs_omount: vfs_export failed %d\n", err); } goto success; @@ -141,14 +141,14 @@ hpfs_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; } - devvp = ndp->ni_vp; + devvp = ndp.ni_vp; if (!vn_isdisk(devvp, &err)) goto error_2; @@ -163,7 +163,7 @@ hpfs_mount ( * Since this is a new mount, we want the names for * the device and the mount point copied in. If an * error occurs, the mountpoint is discarded by the - * upper level code. Note that vfs_mount() handles + * upper level code. Note that vfs_omount() handles * copying the mountpoint f_mntonname for us, so we * don't have to do it here unless we want to set it * to something other than "path" for some rason. @@ -196,6 +196,7 @@ error_2: /* error with devvp held*/ vrele(devvp); error_1: /* no state to back out*/ + /* XXX: Missing NDFREE(&ndp, ...) */ success: return( err); @@ -573,7 +574,7 @@ hpfs_vget( static struct vfsops hpfs_vfsops = { .vfs_fhtovp = hpfs_fhtovp, .vfs_init = hpfs_init, - .vfs_mount = hpfs_mount, + .vfs_omount = hpfs_omount, .vfs_root = hpfs_root, .vfs_statfs = hpfs_statfs, .vfs_uninit = hpfs_uninit, diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c index b54f6ecfef2c..ccf4b7ba43ac 100644 --- a/sys/fs/msdosfs/msdosfs_vfsops.c +++ b/sys/fs/msdosfs/msdosfs_vfsops.c @@ -96,7 +96,7 @@ static int update_mp(struct mount *mp, struct msdosfs_args *argp, static int mountmsdosfs(struct vnode *devvp, struct mount *mp, struct thread *td, struct msdosfs_args *argp); static vfs_fhtovp_t msdosfs_fhtovp; -static vfs_mount_t msdosfs_mount; +static vfs_omount_t msdosfs_omount; static vfs_root_t msdosfs_root; static vfs_statfs_t msdosfs_statfs; static vfs_sync_t msdosfs_sync; @@ -158,17 +158,17 @@ update_mp(mp, argp, td) * special file to treat as a filesystem. */ static int -msdosfs_mount(mp, path, data, ndp, td) +msdosfs_omount(mp, path, data, td) struct mount *mp; char *path; caddr_t data; - struct nameidata *ndp; struct thread *td; { struct vnode *devvp; /* vnode for blk device to mount */ struct msdosfs_args args; /* will hold data from mount request */ /* msdosfs specific mount control block */ struct msdosfsmount *pmp = NULL; + struct nameidata ndp; size_t size; int error, flags; mode_t accessmode; @@ -241,12 +241,12 @@ msdosfs_mount(mp, path, data, ndp, td) * Not an update, or updating the name: look up the name * and verify that it refers to a sensible disk device. */ - NDINIT(ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td); - error = namei(ndp); + NDINIT(&ndp, LOOKUP, FOLLOW, UIO_USERSPACE, args.fspec, td); + error = namei(&ndp); if (error) return (error); - devvp = ndp->ni_vp; - NDFREE(ndp, NDF_ONLY_PNBUF); + devvp = ndp.ni_vp; + NDFREE(&ndp, NDF_ONLY_PNBUF); if (!vn_isdisk(devvp, &error)) { vrele(devvp); @@ -294,7 +294,7 @@ msdosfs_mount(mp, path, data, ndp, td) bzero(mp->mnt_stat.f_mntfromname + size, MNAMELEN - size); (void) msdosfs_statfs(mp, &mp->mnt_stat, td); #ifdef MSDOSFS_DEBUG - printf("msdosfs_mount(): mp %p, pmp %p, inusemap %p\n", mp, pmp, pmp->pm_inusemap); + printf("msdosfs_omount(): mp %p, pmp %p, inusemap %p\n", mp, pmp, pmp->pm_inusemap); #endif return (0); } @@ -900,7 +900,7 @@ msdosfs_vptofh(vp, fhp) static struct vfsops msdosfs_vfsops = { .vfs_fhtovp = msdosfs_fhtovp, .vfs_init = msdosfs_init, - .vfs_mount = msdosfs_mount, + .vfs_omount = msdosfs_omount, .vfs_root = msdosfs_root, .vfs_statfs = msdosfs_statfs, .vfs_sync = msdosfs_sync, diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c index a9a9c7a77d11..3bd803c347bb 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, diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index 25c16518cf77..ea49163bfcd0 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -57,7 +57,7 @@ static MALLOC_DEFINE(M_NULLFSMNT, "NULLFS mount", "NULLFS mount structure"); static vfs_fhtovp_t nullfs_fhtovp; static vfs_checkexp_t nullfs_checkexp; -static vfs_nmount_t nullfs_mount; +static vfs_mount_t nullfs_mount; static vfs_quotactl_t nullfs_quotactl; static vfs_root_t nullfs_root; static vfs_start_t nullfs_start; @@ -72,10 +72,7 @@ static vfs_extattrctl_t nullfs_extattrctl; * Mount null layer */ static int -nullfs_mount(mp, ndp, td) - struct mount *mp; - struct nameidata *ndp; - struct thread *td; +nullfs_mount(struct mount *mp, struct thread *td) { int error = 0; struct vnode *lowerrootvp, *vp; @@ -84,6 +81,7 @@ nullfs_mount(mp, ndp, td) char *target; size_t size; int isvnunlocked = 0, len; + struct nameidata nd, *ndp = &nd; NULLFSDEBUG("nullfs_mount(mp = %p)\n", (void *)mp); @@ -403,7 +401,7 @@ static struct vfsops null_vfsops = { .vfs_extattrctl = nullfs_extattrctl, .vfs_fhtovp = nullfs_fhtovp, .vfs_init = nullfs_init, - .vfs_nmount = nullfs_mount, + .vfs_mount = nullfs_mount, .vfs_quotactl = nullfs_quotactl, .vfs_root = nullfs_root, .vfs_start = nullfs_start, diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c index 824ef4eb1ce6..290004812aeb 100644 --- a/sys/fs/nwfs/nwfs_vfsops.c +++ b/sys/fs/nwfs/nwfs_vfsops.c @@ -70,7 +70,7 @@ SYSCTL_INT(_vfs_nwfs, OID_AUTO, debuglevel, CTLFLAG_RW, &nwfs_debuglevel, 0, "") MODULE_DEPEND(nwfs, ncp, 1, 1, 1); MODULE_DEPEND(nwfs, libmchain, 1, 1, 1); -static vfs_mount_t nwfs_mount; +static vfs_omount_t nwfs_omount; static vfs_quotactl_t nwfs_quotactl; static vfs_root_t nwfs_root; static vfs_start_t nwfs_start; @@ -81,7 +81,7 @@ static vfs_uninit_t nwfs_uninit; static struct vfsops nwfs_vfsops = { .vfs_init = nwfs_init, - .vfs_mount = nwfs_mount, + .vfs_omount = nwfs_omount, .vfs_quotactl = nwfs_quotactl, .vfs_root = nwfs_root, .vfs_start = nwfs_start, @@ -136,8 +136,8 @@ nwfs_initnls(struct nwmount *nmp) { * mp - path - addr in user space of mount point (ie /usr or whatever) * data - addr in user space of mount params */ -static int nwfs_mount(struct mount *mp, char *path, caddr_t data, - struct nameidata *ndp, struct thread *td) +static int nwfs_omount(struct mount *mp, char *path, caddr_t data, + struct thread *td) { struct nwfs_args args; /* will hold data from mount request */ int error; diff --git a/sys/fs/portalfs/portal_vfsops.c b/sys/fs/portalfs/portal_vfsops.c index 3b2d8be9a9a0..dea2d397ad24 100644 --- a/sys/fs/portalfs/portal_vfsops.c +++ b/sys/fs/portalfs/portal_vfsops.c @@ -58,7 +58,7 @@ static MALLOC_DEFINE(M_PORTALFSMNT, "PORTAL mount", "PORTAL mount structure"); -static vfs_mount_t portal_mount; +static vfs_omount_t portal_omount; static vfs_unmount_t portal_unmount; static vfs_root_t portal_root; static vfs_statfs_t portal_statfs; @@ -67,11 +67,10 @@ static vfs_statfs_t portal_statfs; * Mount the per-process file descriptors (/dev/fd) */ static int -portal_mount(mp, path, data, ndp, td) +portal_omount(mp, path, data, td) struct mount *mp; char *path; caddr_t data; - struct nameidata *ndp; struct thread *td; { struct file *fp; @@ -236,7 +235,7 @@ portal_statfs(mp, sbp, td) } static struct vfsops portal_vfsops = { - .vfs_mount = portal_mount, + .vfs_omount = portal_omount, .vfs_root = portal_root, .vfs_statfs = portal_statfs, .vfs_unmount = portal_unmount, diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c index 22d62860e17b..140a993c15da 100644 --- a/sys/fs/pseudofs/pseudofs.c +++ b/sys/fs/pseudofs/pseudofs.c @@ -257,8 +257,7 @@ pfs_destroy(struct pfs_node *node) * Mount a pseudofs instance */ int -pfs_mount(struct pfs_info *pi, struct mount *mp, struct nameidata *ndp, - struct thread *td) +pfs_mount(struct pfs_info *pi, struct mount *mp, struct thread *td) { struct statfs *sbp; diff --git a/sys/fs/pseudofs/pseudofs.h b/sys/fs/pseudofs/pseudofs.h index 1bac49ca6831..c2bb9b334e36 100644 --- a/sys/fs/pseudofs/pseudofs.h +++ b/sys/fs/pseudofs/pseudofs.h @@ -198,7 +198,7 @@ struct pfs_node { * VFS interface */ int pfs_mount (struct pfs_info *pi, struct mount *mp, - struct nameidata *ndp, struct thread *td); + struct thread *td); int pfs_unmount (struct mount *mp, int mntflags, struct thread *td); int pfs_root (struct mount *mp, struct vnode **vpp, @@ -236,9 +236,8 @@ static struct pfs_info name##_info = { \ }; \ \ static int \ -_##name##_mount(struct mount *mp, struct nameidata *ndp, \ - struct thread *td) { \ - return pfs_mount(&name##_info, mp, ndp, td); \ +_##name##_mount(struct mount *mp, struct thread *td) { \ + return pfs_mount(&name##_info, mp, td); \ } \ \ static int \ @@ -253,7 +252,7 @@ _##name##_uninit(struct vfsconf *vfc) { \ \ static struct vfsops name##_vfsops = { \ .vfs_init = _##name##_init, \ - .vfs_nmount = _##name##_mount, \ + .vfs_mount = _##name##_mount, \ .vfs_root = pfs_root, \ .vfs_statfs = pfs_statfs, \ .vfs_uninit = _##name##_uninit, \ diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c index ec674456aaf8..d8d90e407f7b 100644 --- a/sys/fs/smbfs/smbfs_vfsops.c +++ b/sys/fs/smbfs/smbfs_vfsops.c @@ -78,7 +78,7 @@ static MALLOC_DEFINE(M_SMBFSHASH, "SMBFS hash", "SMBFS hash table"); static vfs_init_t smbfs_init; static vfs_uninit_t smbfs_uninit; -static vfs_mount_t smbfs_mount; +static vfs_omount_t smbfs_omount; static vfs_start_t smbfs_start; static vfs_root_t smbfs_root; static vfs_quotactl_t smbfs_quotactl; @@ -87,7 +87,7 @@ static vfs_unmount_t smbfs_unmount; static struct vfsops smbfs_vfsops = { .vfs_init = smbfs_init, - .vfs_mount = smbfs_mount, + .vfs_omount = smbfs_omount, .vfs_quotactl = smbfs_quotactl, .vfs_root = smbfs_root, .vfs_start = smbfs_start, @@ -107,8 +107,7 @@ MODULE_DEPEND(smbfs, libmchain, 1, 1, 1); int smbfs_pbuf_freecnt = -1; /* start out unlimited */ static int -smbfs_mount(struct mount *mp, char *path, caddr_t data, - struct nameidata *ndp, struct thread *td) +smbfs_omount(struct mount *mp, char *path, caddr_t data, struct thread *td) { struct smbfs_args args; /* will hold data from mount request */ struct smbmount *smp = NULL; diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index 2b2501a8b377..89f38ba6aa8e 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -108,7 +108,7 @@ uma_zone_t udf_zone_ds = NULL; static vfs_init_t udf_init; static vfs_uninit_t udf_uninit; -static vfs_nmount_t udf_mount; +static vfs_mount_t udf_mount; static vfs_root_t udf_root; static vfs_statfs_t udf_statfs; static vfs_unmount_t udf_unmount; @@ -120,7 +120,7 @@ static int udf_find_partmaps(struct udf_mnt *, struct logvol_desc *); static struct vfsops udf_vfsops = { .vfs_fhtovp = udf_fhtovp, .vfs_init = udf_init, - .vfs_nmount = udf_mount, + .vfs_mount = udf_mount, .vfs_root = udf_root, .vfs_statfs = udf_statfs, .vfs_uninit = udf_uninit, @@ -184,7 +184,7 @@ udf_uninit(struct vfsconf *foo) } static int -udf_mount(struct mount *mp, struct nameidata *ndp, struct thread *td) +udf_mount(struct mount *mp, struct thread *td) { struct vnode *devvp; /* vnode of the mount device */ struct udf_mnt *imp = 0; @@ -193,6 +193,7 @@ udf_mount(struct mount *mp, struct nameidata *ndp, struct thread *td) char *fspec, *cs_disk, *cs_local; size_t size; int error, len, *udf_flags; + struct nameidata nd, *ndp = &nd; opts = mp->mnt_optnew; diff --git a/sys/fs/umapfs/umap_vfsops.c b/sys/fs/umapfs/umap_vfsops.c index c6f0e5799a02..c9da7f7d2108 100644 --- a/sys/fs/umapfs/umap_vfsops.c +++ b/sys/fs/umapfs/umap_vfsops.c @@ -53,7 +53,7 @@ static MALLOC_DEFINE(M_UMAPFSMNT, "UMAP mount", "UMAP mount structure"); -static vfs_mount_t umapfs_mount; +static vfs_omount_t umapfs_omount; static vfs_start_t umapfs_start; static vfs_root_t umapfs_root; static vfs_quotactl_t umapfs_quotactl; @@ -69,7 +69,7 @@ static vfs_extattrctl_t umapfs_extattrctl; * Mount umap layer */ static int -umapfs_mount(mp, path, data, ndp, td) +umapfs_omount(mp, path, data, ndp, td) struct mount *mp; char *path; caddr_t data; @@ -430,7 +430,7 @@ static struct vfsops umap_vfsops = { .vfs_extattrctl = umapfs_extattrctl, .vfs_fhtovp = umapfs_fhtovp, .vfs_init = umapfs_init, - .vfs_mount = umapfs_mount, + .vfs_omount = umapfs_omount, .vfs_quotactl = umapfs_quotactl, .vfs_root = umapfs_root, .vfs_start = umapfs_start, diff --git a/sys/fs/unionfs/union_vfsops.c b/sys/fs/unionfs/union_vfsops.c index e756e18ca978..1b5293e14314 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, |