summaryrefslogtreecommitdiff
path: root/include/linux/mempool.h
diff options
context:
space:
mode:
authorDavid Rientjes <rientjes@google.com>2015-04-14 15:48:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 16:49:06 -0700
commit11d83360452ea2a95e699da01f8e1bcc4676a5de (patch)
tree22d85ebbc47a9152cafc9373a8300d0abf92106b /include/linux/mempool.h
parent2415b9f5cb048a803b30b790af994ba71ff0bd4c (diff)
mm, mempool: do not allow atomic resizing
Allocating a large number of elements in atomic context could quickly deplete memory reserves, so just disallow atomic resizing entirely. Nothing currently uses mempool_resize() with anything other than GFP_KERNEL, so convert existing callers to drop the gfp_mask. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: David Rientjes <rientjes@google.com> Acked-by: Steffen Maier <maier@linux.vnet.ibm.com> [zfcp] Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: Heiko Carstens <heiko.carstens@de.ibm.com> Cc: Steve French <sfrench@samba.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mempool.h')
-rw-r--r--include/linux/mempool.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/mempool.h b/include/linux/mempool.h
index 39ed62ab5b8a..b19b3023c880 100644
--- a/include/linux/mempool.h
+++ b/include/linux/mempool.h
@@ -29,7 +29,7 @@ extern mempool_t *mempool_create_node(int min_nr, mempool_alloc_t *alloc_fn,
mempool_free_t *free_fn, void *pool_data,
gfp_t gfp_mask, int nid);
-extern int mempool_resize(mempool_t *pool, int new_min_nr, gfp_t gfp_mask);
+extern int mempool_resize(mempool_t *pool, int new_min_nr);
extern void mempool_destroy(mempool_t *pool);
extern void * mempool_alloc(mempool_t *pool, gfp_t gfp_mask);
extern void mempool_free(void *element, mempool_t *pool);