if (error == 0) {
*ap->a_vpp = vp;
}
- }
-
- /* if we got lvp, drop the iocount from VNOP_LOOKUP */
- if (lvp != NULL) {
- vnode_put(lvp);
+ /* if we got lvp, drop the iocount from VNOP_LOOKUP */
+ if (lvp != NULL) {
+ vnode_put(lvp);
+ }
}
return error;
struct dirent *dep;
size_t bytesread;
bufsize = 3 * MIN((user_size_t)uio_resid(uio), 87371u) / 8;
- MALLOC(bufptr, void *, bufsize, M_TEMP, M_WAITOK);
+ bufptr = kheap_alloc(KHEAP_TEMP, bufsize, Z_WAITOK);
if (bufptr == NULL) {
return ENOMEM;
}
uio_setoffset(uio, uio_offset(auio));
}
uio_free(auio);
- FREE(bufptr, M_TEMP);
+ kheap_free(KHEAP_TEMP, bufptr, bufsize);
} else {
error = VNOP_READDIR(lvp, ap->a_uio, ap->a_flags, ap->a_eofflag, ap->a_numdirent, ap->a_context);
vnode_put(lvp);