Merge branches 'master' and 'suser_to_priv'
[dragonfly.git] / sys / kern / vfs_syscalls.c
index 3d01f14..f888def 100644 (file)
@@ -261,10 +261,7 @@ sys_mount(struct mount_args *uap)
                vput(vp);
                return (error);
        }
-       for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) {
-               if (!strcmp(vfsp->vfc_name, fstypename))
-                       break;
-       }
+       vfsp = vfsconf_find_by_name(fstypename);
        if (vfsp == NULL) {
                linker_file_t lf;
 
@@ -284,10 +281,7 @@ sys_mount(struct mount_args *uap)
                }
                lf->userrefs++;
                /* lookup again, see if the VFS was loaded */
-               for (vfsp = vfsconf; vfsp; vfsp = vfsp->vfc_next) {
-                       if (!strcmp(vfsp->vfc_name, fstypename))
-                               break;
-               }
+               vfsp = vfsconf_find_by_name(fstypename);
                if (vfsp == NULL) {
                        lf->userrefs--;
                        linker_file_unload(lf);