svn commit: r339694 - head/sys/kern

Konstantin Belousov kib at FreeBSD.org
Wed Oct 24 19:40:10 UTC 2018


Author: kib
Date: Wed Oct 24 19:40:09 2018
New Revision: 339694
URL: https://svnweb.freebsd.org/changeset/base/339694

Log:
  Correct condition to detect mount(2) support by a filesystem.
  
  Reported and tested by:	cy
  Sponsored by:	The FreeBSD Foundation
  Approved by:	re (rgrimes)

Modified:
  head/sys/kern/vfs_mount.c

Modified: head/sys/kern/vfs_mount.c
==============================================================================
--- head/sys/kern/vfs_mount.c	Wed Oct 24 19:21:04 2018	(r339693)
+++ head/sys/kern/vfs_mount.c	Wed Oct 24 19:40:09 2018	(r339694)
@@ -808,8 +808,10 @@ 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 || ((vfsp->vfc_flags &
-	    VFCF_SBDRY) != 0 && (vfsp->vfc_vfsops_sd->vfs_cmount == NULL)))
+	if (((vfsp->vfc_flags & VFCF_SBDRY) != 0 &&
+	    vfsp->vfc_vfsops_sd->vfs_cmount == NULL) ||
+	    ((vfsp->vfc_flags & VFCF_SBDRY) == 0 &&
+	    vfsp->vfc_vfsops->vfs_cmount == NULL))
 		return (EOPNOTSUPP);
 
 	ma = mount_argsu(ma, "fstype", uap->type, MFSNAMELEN);


More information about the svn-src-all mailing list