diff options
author | Christoph Hellwig <hch@lst.de> | 2020-08-17 19:17:20 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-09-25 06:20:40 +0200 |
commit | 43ee5b6daa6c45246098493dab2c229d196c9cf6 (patch) | |
tree | ca800ef096f1bc9861943c3eda3fea6e8a769afd | |
parent | 8c1c6c7588b2faf9dd45fb3cfb7497fd09bbfe7c (diff) |
mm: turn alloc_pages into an inline function
To prevent a compiler error when a method call alloc_pages is
added (which I plan to for the dma_map_ops).
Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r-- | include/linux/gfp.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/gfp.h b/include/linux/gfp.h index 67a0774e080b..dd2577c54071 100644 --- a/include/linux/gfp.h +++ b/include/linux/gfp.h @@ -550,8 +550,10 @@ extern struct page *alloc_pages_vma(gfp_t gfp_mask, int order, #define alloc_hugepage_vma(gfp_mask, vma, addr, order) \ alloc_pages_vma(gfp_mask, order, vma, addr, numa_node_id(), true) #else -#define alloc_pages(gfp_mask, order) \ - alloc_pages_node(numa_node_id(), gfp_mask, order) +static inline struct page *alloc_pages(gfp_t gfp_mask, unsigned int order) +{ + return alloc_pages_node(numa_node_id(), gfp_mask, order); +} #define alloc_pages_vma(gfp_mask, order, vma, addr, node, false)\ alloc_pages(gfp_mask, order) #define alloc_hugepage_vma(gfp_mask, vma, addr, order) \ |