From: Joe Thornber Date: Thu, 19 Nov 2015 13:36:45 +0000 (+0000) Subject: dm btree: use GFP_NOFS in dm_btree_del() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f9ef0657d53d988dc07b096052b3dd07d6e3c46;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dm btree: use GFP_NOFS in dm_btree_del() dm_btree_del() is called from an ioctl so don't recurse into FS. Signed-off-by: Joe Thornber Signed-off-by: Mike Snitzer --- diff --git a/drivers/md/persistent-data/dm-btree.c b/drivers/md/persistent-data/dm-btree.c index 20a40329d84a..1744f3618a55 100644 --- a/drivers/md/persistent-data/dm-btree.c +++ b/drivers/md/persistent-data/dm-btree.c @@ -272,7 +272,12 @@ int dm_btree_del(struct dm_btree_info *info, dm_block_t root) int r; struct del_stack *s; - s = kmalloc(sizeof(*s), GFP_NOIO); + /* + * dm_btree_del() is called via an ioctl, as such should be + * considered an FS op. We can't recurse back into the FS, so we + * allocate GFP_NOFS. + */ + s = kmalloc(sizeof(*s), GFP_NOFS); if (!s) return -ENOMEM; s->info = info;