| 137 | } |
| 138 | |
| 139 | struct vfsconf * |
| 140 | vfs_byname_kld(const char *fstype, struct thread *td, int *error) |
| 141 | { |
| 142 | struct vfsconf *vfsp; |
| 143 | int fileid, loaded; |
| 144 | |
| 145 | vfsp = vfs_byname(fstype); |
| 146 | if (vfsp != NULL) |
| 147 | return (vfsp); |
| 148 | |
| 149 | /* Try to load the respective module. */ |
| 150 | *error = kern_kldload(td, fstype, &fileid); |
| 151 | loaded = (*error == 0); |
| 152 | if (*error == EEXIST) |
| 153 | *error = 0; |
| 154 | if (*error) |
| 155 | return (NULL); |
| 156 | |
| 157 | /* Look up again to see if the VFS was loaded. */ |
| 158 | vfsp = vfs_byname(fstype); |
| 159 | if (vfsp == NULL) { |
| 160 | if (loaded) |
| 161 | (void)kern_kldunload(td, fileid, LINKER_UNLOAD_FORCE); |
| 162 | *error = ENODEV; |
| 163 | return (NULL); |
| 164 | } |
| 165 | return (vfsp); |
| 166 | } |
| 167 | |
| 168 | static int |
| 169 | vfs_mount_sigdefer(struct mount *mp) |
no test coverage detected