| 209 | } |
| 210 | |
| 211 | static inline void |
| 212 | khelp_remove_osd(struct helper *h, struct osd *hosd) |
| 213 | { |
| 214 | void *hdata; |
| 215 | |
| 216 | if (h->h_flags & HELPER_NEEDS_OSD) { |
| 217 | /* |
| 218 | * If the current helper uses OSD and calling osd_get() |
| 219 | * on the helper's h_id returns non-NULL, the helper has |
| 220 | * OSD attached to 'hosd' which needs to be cleaned up. |
| 221 | */ |
| 222 | hdata = osd_get(OSD_KHELP, hosd, h->h_id); |
| 223 | if (hdata != NULL) { |
| 224 | uma_zfree(h->h_zone, hdata); |
| 225 | osd_del(OSD_KHELP, hosd, h->h_id); |
| 226 | refcount_release(&h->h_refcount); |
| 227 | } |
| 228 | } |
| 229 | } |
| 230 | |
| 231 | void * |
| 232 | khelp_get_osd(struct osd *hosd, int32_t id) |
no test coverage detected