| 185 | } |
| 186 | |
| 187 | int |
| 188 | khelp_destroy_osd(struct osd *hosd) |
| 189 | { |
| 190 | struct helper *h; |
| 191 | int error; |
| 192 | |
| 193 | KASSERT(hosd != NULL, ("struct osd not initialised!")); |
| 194 | |
| 195 | error = 0; |
| 196 | |
| 197 | KHELP_LIST_RLOCK(); |
| 198 | /* |
| 199 | * Clean up all khelp related OSD. |
| 200 | * |
| 201 | * XXXLAS: Would be nice to use something like osd_exit() here but it |
| 202 | * doesn't have the right semantics for this purpose. |
| 203 | */ |
| 204 | TAILQ_FOREACH(h, &helpers, h_next) |
| 205 | khelp_remove_osd(h, hosd); |
| 206 | KHELP_LIST_RUNLOCK(); |
| 207 | |
| 208 | return (error); |
| 209 | } |
| 210 | |
| 211 | static inline void |
| 212 | khelp_remove_osd(struct helper *h, struct osd *hosd) |
no test coverage detected