aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/gfp.h
diff options
context:
space:
mode:
authorYunsheng Lin <linyunsheng@huawei.com>2024-02-28 17:30:10 +0800
committerPaolo Abeni <pabeni@redhat.com>2024-03-05 11:38:14 +0100
commita0727489ac22d6fbd2e390d38a51193bba61da83 (patch)
tree51b3f63e7f2f7cab23e38206adac0ad945fcac70 /include/linux/gfp.h
parentpage_frag: unify gfp bits for order 3 page allocation (diff)
downloadwireguard-linux-a0727489ac22d6fbd2e390d38a51193bba61da83.tar.xz
wireguard-linux-a0727489ac22d6fbd2e390d38a51193bba61da83.zip
net: introduce page_frag_cache_drain()
When draining a page_frag_cache, most user are doing the similar steps, so introduce an API to avoid code duplication. Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Acked-by: Jason Wang <jasowang@redhat.com> Reviewed-by: Alexander Duyck <alexanderduyck@fb.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux/gfp.h')
-rw-r--r--include/linux/gfp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h
index 28aea17fa59b..6cef1c241180 100644
--- a/include/linux/gfp.h
+++ b/include/linux/gfp.h
@@ -311,6 +311,7 @@ extern void __free_pages(struct page *page, unsigned int order);
extern void free_pages(unsigned long addr, unsigned int order);
struct page_frag_cache;
+void page_frag_cache_drain(struct page_frag_cache *nc);
extern void __page_frag_cache_drain(struct page *page, unsigned int count);
void *__page_frag_alloc_align(struct page_frag_cache *nc, unsigned int fragsz,
gfp_t gfp_mask, unsigned int align_mask);