aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/vfs_mount.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2018-10-23 21:43:41 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2018-10-23 21:43:41 +0000
commit8ff7fad1d70ef7c6c43e1dd688ba1747c81077dd (patch)
treee24dfb24d4701daf71931772d10ea92583b77dcb /sys/kern/vfs_mount.c
parentec888383cff48d90ac65cdbcad1e3f8e152ff8ca (diff)
downloadsrc-8ff7fad1d70ef7c6c43e1dd688ba1747c81077dd.tar.gz
src-8ff7fad1d70ef7c6c43e1dd688ba1747c81077dd.zip
Notes
Diffstat (limited to 'sys/kern/vfs_mount.c')
-rw-r--r--sys/kern/vfs_mount.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c
index 3e325ae7431e..8d98cb199ec3 100644
--- a/sys/kern/vfs_mount.c
+++ b/sys/kern/vfs_mount.c
@@ -808,7 +808,8 @@ sys_mount(struct thread *td, struct mount_args *uap)
free(fstype, M_TEMP);
if (vfsp == NULL)
return (ENOENT);
- if (vfsp->vfc_vfsops->vfs_cmount == NULL)
+ if (vfsp->vfc_vfsops->vfs_cmount == NULL || ((vfsp->vfc_flags &
+ VFCF_SBDRY) != 0 && (vfsp->vfc_vfsops_sd->vfs_cmount == NULL)))
return (EOPNOTSUPP);
ma = mount_argsu(ma, "fstype", uap->type, MFSNAMELEN);
@@ -817,8 +818,9 @@ sys_mount(struct thread *td, struct mount_args *uap)
ma = mount_argb(ma, !(flags & MNT_NOSUID), "nosuid");
ma = mount_argb(ma, !(flags & MNT_NOEXEC), "noexec");
- error = vfsp->vfc_vfsops->vfs_cmount(ma, uap->data, flags);
- return (error);
+ if ((vfsp->vfc_flags & VFCF_SBDRY) != 0)
+ return (vfsp->vfc_vfsops_sd->vfs_cmount(ma, uap->data, flags));
+ return (vfsp->vfc_vfsops->vfs_cmount(ma, uap->data, flags));
}
/*