Lines Matching refs:nc
3336 static struct page *__page_frag_refill(struct page_frag_cache *nc, in __page_frag_refill() argument
3347 nc->size = page ? PAGE_FRAG_CACHE_MAX_SIZE : PAGE_SIZE; in __page_frag_refill()
3352 nc->va = page ? page_address(page) : NULL; in __page_frag_refill()
3357 void *__alloc_page_frag(struct page_frag_cache *nc, in __alloc_page_frag() argument
3364 if (unlikely(!nc->va)) { in __alloc_page_frag()
3366 page = __page_frag_refill(nc, gfp_mask); in __alloc_page_frag()
3372 size = nc->size; in __alloc_page_frag()
3380 nc->pfmemalloc = page_is_pfmemalloc(page); in __alloc_page_frag()
3381 nc->pagecnt_bias = size; in __alloc_page_frag()
3382 nc->offset = size; in __alloc_page_frag()
3385 offset = nc->offset - fragsz; in __alloc_page_frag()
3387 page = virt_to_page(nc->va); in __alloc_page_frag()
3389 if (!atomic_sub_and_test(nc->pagecnt_bias, &page->_count)) in __alloc_page_frag()
3394 size = nc->size; in __alloc_page_frag()
3400 nc->pagecnt_bias = size; in __alloc_page_frag()
3404 nc->pagecnt_bias--; in __alloc_page_frag()
3405 nc->offset = offset; in __alloc_page_frag()
3407 return nc->va + offset; in __alloc_page_frag()