aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2021-02-25 17:18:41 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2021-02-26 09:41:01 -0800
commit0f2f89b6de32de49373040eb4ee9d6bc1930ae5a (patch)
tree18457106c2df3532b0048bdbebed5b811b9daf4f
parent4be408cec257d1156d35647db57726f5ef977630 (diff)
downloadlinux-leds-0f2f89b6de32de49373040eb4ee9d6bc1930ae5a.tar.gz
mm/dmapool: use might_alloc()
Now that my little helper has landed, use it more. On top of the existing check this also uses lockdep through the fs_reclaim annotations. Link: https://lkml.kernel.org/r/20210113135009.3606813-1-daniel.vetter@ffwll.ch Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--mm/dmapool.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/dmapool.c b/mm/dmapool.c
index a97c97232337d5..f3791532fef22a 100644
--- a/mm/dmapool.c
+++ b/mm/dmapool.c
@@ -28,6 +28,7 @@
#include <linux/mutex.h>
#include <linux/poison.h>
#include <linux/sched.h>
+#include <linux/sched/mm.h>
#include <linux/slab.h>
#include <linux/stat.h>
#include <linux/spinlock.h>
@@ -319,7 +320,7 @@ void *dma_pool_alloc(struct dma_pool *pool, gfp_t mem_flags,
size_t offset;
void *retval;
- might_sleep_if(gfpflags_allow_blocking(mem_flags));
+ might_alloc(mem_flags);
spin_lock_irqsave(&pool->lock, flags);
list_for_each_entry(page, &pool->page_list, page_list) {