diff options
author | Yunsheng Lin <linyunsheng@huawei.com> | 2024-02-28 17:30:10 +0800 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2024-03-05 11:38:14 +0100 |
commit | a0727489ac22d6fbd2e390d38a51193bba61da83 (patch) | |
tree | 51b3f63e7f2f7cab23e38206adac0ad945fcac70 /include/linux/gfp.h | |
parent | 4bc0d63a23957262b01b5848bd5e1739e98bbf36 (diff) | |
download | linux-a0727489ac22d6fbd2e390d38a51193bba61da83.tar.gz linux-a0727489ac22d6fbd2e390d38a51193bba61da83.tar.bz2 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.h | 1 |
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); |