Lines Matching refs:bufp
2388 xnf_buf_t *bufp;
2398 bufp = kmem_cache_alloc(xnfp->xnf_buf_cache, flags);
2399 if (bufp == NULL) {
2404 ASSERT(bufp->grant_ref == INVALID_GRANT_REF);
2406 bufp->grant_ref = gref;
2408 if (bufp->gen != xnfp->xnf_gen)
2409 xnf_buf_refresh(bufp);
2411 gnttab_grant_foreign_access_ref(bufp->grant_ref,
2412 xvdi_get_oeid(bufp->xnfp->xnf_devinfo),
2413 bufp->buf_mfn, readonly ? 1 : 0);
2417 return (bufp);
2421 xnf_buf_put(xnf_t *xnfp, xnf_buf_t *bufp, boolean_t readonly)
2423 if (bufp->grant_ref != INVALID_GRANT_REF) {
2425 bufp->grant_ref, readonly ? 1 : 0);
2426 gref_put(xnfp, bufp->grant_ref);
2427 bufp->grant_ref = INVALID_GRANT_REF;
2430 kmem_cache_free(xnfp->xnf_buf_cache, bufp);