diff mbox series

[2/2] bdi: Use might_alloc()

Message ID 20210113134033.3569683-2-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show
Series [1/2] mm/dmapool: Use might_alloc() | expand

Commit Message

Daniel Vetter Jan. 13, 2021, 1:40 p.m. UTC
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.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org
---
 mm/backing-dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index e33797579338..3bb7807c2f0c 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -580,7 +580,7 @@  struct bdi_writeback *wb_get_create(struct backing_dev_info *bdi,
 {
 	struct bdi_writeback *wb;
 
-	might_sleep_if(gfpflags_allow_blocking(gfp));
+	might_alloc(mem_flags);
 
 	if (!memcg_css->parent)
 		return &bdi->wb;