summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/fs/fdescfs/fdesc_vfsops.c11
-rw-r--r--sys/fs/pseudofs/pseudofs.c9
-rw-r--r--sys/fs/pseudofs/pseudofs.h4
-rw-r--r--sys/kern/vfs_mount.c3
4 files changed, 24 insertions, 3 deletions
diff --git a/sys/fs/fdescfs/fdesc_vfsops.c b/sys/fs/fdescfs/fdesc_vfsops.c
index c175d0a..6356147 100644
--- a/sys/fs/fdescfs/fdesc_vfsops.c
+++ b/sys/fs/fdescfs/fdesc_vfsops.c
@@ -54,12 +54,22 @@
static MALLOC_DEFINE(M_FDESCMNT, "fdesc_mount", "FDESC mount structure");
+static vfs_cmount_t fdesc_cmount;
static vfs_mount_t fdesc_mount;
static vfs_unmount_t fdesc_unmount;
static vfs_statfs_t fdesc_statfs;
static vfs_root_t fdesc_root;
/*
+ * Compatibility shim for old mount(2) system call.
+ */
+int
+fdesc_cmount(struct mntarg *ma, void *data, int flags, struct thread *td)
+{
+ return kernel_mount(ma, flags);
+}
+
+/*
* Mount the per-process file descriptors (/dev/fd)
*/
static int
@@ -193,6 +203,7 @@ fdesc_statfs(mp, sbp, td)
}
static struct vfsops fdesc_vfsops = {
+ .vfs_cmount = fdesc_cmount,
.vfs_init = fdesc_init,
.vfs_mount = fdesc_mount,
.vfs_root = fdesc_root,
diff --git a/sys/fs/pseudofs/pseudofs.c b/sys/fs/pseudofs/pseudofs.c
index 1fe0371..da1758b 100644
--- a/sys/fs/pseudofs/pseudofs.c
+++ b/sys/fs/pseudofs/pseudofs.c
@@ -285,6 +285,15 @@ pfs_mount(struct pfs_info *pi, struct mount *mp, struct thread *td)
}
/*
+ * Compatibility shim for old mount(2) system call.
+ */
+int
+pfs_cmount(struct mntarg *ma, void *data, int flags, struct thread *td)
+{
+ return kernel_mount(ma, flags);
+}
+
+/*
* Unmount a pseudofs instance
*/
int
diff --git a/sys/fs/pseudofs/pseudofs.h b/sys/fs/pseudofs/pseudofs.h
index 8eaa137..b9701bc 100644
--- a/sys/fs/pseudofs/pseudofs.h
+++ b/sys/fs/pseudofs/pseudofs.h
@@ -34,6 +34,7 @@
/*
* Opaque structures
*/
+struct mntarg;
struct mount;
struct nameidata;
struct proc;
@@ -199,6 +200,8 @@ struct pfs_node {
*/
int pfs_mount (struct pfs_info *pi, struct mount *mp,
struct thread *td);
+int pfs_cmount (struct mntarg *ma, void *data, int flags,
+ struct thread *td);
int pfs_unmount (struct mount *mp, int mntflags,
struct thread *td);
int pfs_root (struct mount *mp, int flags,
@@ -251,6 +254,7 @@ _##name##_uninit(struct vfsconf *vfc) { \
} \
\
static struct vfsops name##_vfsops = { \
+ .vfs_cmount = pfs_cmount, \
.vfs_init = _##name##_init, \
.vfs_mount = _##name##_mount, \
.vfs_root = pfs_root, \
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 1d1cc6c..2f60942 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -736,9 +736,6 @@ mount(td, uap)
/* Kick out MNT_ROOTFS early as it is legal internally */
uap->flags &= ~MNT_ROOTFS;
- if (uap->data == NULL)
- return (EINVAL);
-
fstype = malloc(MFSNAMELEN, M_TEMP, M_WAITOK);
error = copyinstr(uap->type, fstype, MFSNAMELEN, NULL);
if (!error) {
OpenPOWER on IntegriCloud