From abc41ac7c78c6f218a226a746f5d92a41fe53285 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 10 Jul 2013 14:09:08 -0700 Subject: [PATCH] Use GFP_NOIO in vdev_disk_io_flush() To avoid a potential deadlock when using a zvol as a swap device prevent vdev_disk_io_flush() from performing IO during the bio_alloc(). Signed-off-by: Brian Behlendorf Closes #1508 --- module/zfs/vdev_disk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/vdev_disk.c b/module/zfs/vdev_disk.c index 31d1a28bd..286971615 100644 --- a/module/zfs/vdev_disk.c +++ b/module/zfs/vdev_disk.c @@ -632,7 +632,7 @@ vdev_disk_io_flush(struct block_device *bdev, zio_t *zio) if (!q) return ENXIO; - bio = bio_alloc(GFP_KERNEL, 0); + bio = bio_alloc(GFP_NOIO, 0); if (!bio) return ENOMEM;