Skip to content

Commit c1ca59a

Browse files
danvettorvalds
authored andcommitted
mm/backing-dev.c: 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. [akpm@linux-foundation.org: include linux/sched/mm.h] Link: https://lkml.kernel.org/r/20210113135009.3606813-2-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>
1 parent 0f2f89b commit c1ca59a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mm/backing-dev.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/fs.h>
99
#include <linux/pagemap.h>
1010
#include <linux/mm.h>
11+
#include <linux/sched/mm.h>
1112
#include <linux/sched.h>
1213
#include <linux/module.h>
1314
#include <linux/writeback.h>
@@ -578,7 +579,7 @@ struct bdi_writeback *wb_get_create(struct backing_dev_info *bdi,
578579
{
579580
struct bdi_writeback *wb;
580581

581-
might_sleep_if(gfpflags_allow_blocking(gfp));
582+
might_alloc(gfp);
582583

583584
if (!memcg_css->parent)
584585
return &bdi->wb;

0 commit comments

Comments
 (0)