Use GFP_NOIO in vdev_disk_io_flush()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 10 Jul 2013 21:09:08 +0000 (14:09 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 10 Jul 2013 21:12:21 +0000 (14:12 -0700)
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 <behlendorf1@llnl.gov>
Closes #1508

module/zfs/vdev_disk.c

index 31d1a28..2869716 100644 (file)
@@ -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;