MCPcopy Create free account
hub / github.com/F-Stack/f-stack / khelp_remove_osd

Function khelp_remove_osd

freebsd/kern/kern_khelp.c:211–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209}
210
211static inline void
212khelp_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
231void *
232khelp_get_osd(struct osd *hosd, int32_t id)

Callers 2

khelp_init_osdFunction · 0.85
khelp_destroy_osdFunction · 0.85

Calls 4

osd_getFunction · 0.85
osd_delFunction · 0.85
refcount_releaseFunction · 0.85
uma_zfreeFunction · 0.50

Tested by

no test coverage detected