dm btree: silence lockdep lock inversion in dm_btree_del()
authorJoe Thornber <ejt@redhat.com>
Fri, 3 Jul 2015 13:51:32 +0000 (14:51 +0100)
committerDanny Wood <danwood76@gmail.com>
Tue, 29 Jan 2019 13:09:19 +0000 (13:09 +0000)
commit 1c7518794a3647eb345d59ee52844e8a40405198 upstream.

Allocate memory using GFP_NOIO when deleting a btree.  dm_btree_del()
can be called via an ioctl and we don't want to recurse into the FS or
block layer.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/persistent-data/dm-btree.c

index 0a7592e88811e8aa45d9b89225bc98a459e0ee64..e3ecb0b824b55ff44423f652c34a7079c99be7e0 100644 (file)
@@ -240,7 +240,7 @@ int dm_btree_del(struct dm_btree_info *info, dm_block_t root)
        int r;
        struct del_stack *s;
 
-       s = kmalloc(sizeof(*s), GFP_KERNEL);
+       s = kmalloc(sizeof(*s), GFP_NOIO);
        if (!s)
                return -ENOMEM;
        s->tm = info->tm;