diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2021-02-25 17:18:45 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-26 09:41:01 -0800 |
commit | c1ca59a1f21e360b26e26c187a4e42f22bb768d3 (patch) | |
tree | 384894115e4010b94217e6cd1aedeab0fe42e4d4 /mm | |
parent | 0f2f89b6de32de49373040eb4ee9d6bc1930ae5a (diff) | |
download | linux-c1ca59a1f21e360b26e26c187a4e42f22bb768d3.tar.bz2 |
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/backing-dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/backing-dev.c b/mm/backing-dev.c index eca555f658d9..576220acd686 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -8,6 +8,7 @@ #include <linux/fs.h> #include <linux/pagemap.h> #include <linux/mm.h> +#include <linux/sched/mm.h> #include <linux/sched.h> #include <linux/module.h> #include <linux/writeback.h> @@ -578,7 +579,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(gfp); if (!memcg_css->parent) return &bdi->wb; |