[PATCH 05/10] have block/scsi_ioctl user GFP_NOIO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Mike Christie <michaelc@xxxxxxxxxxx>

Because user spaces uses block/scsi_ioctl for path testing and to
readd devices, we cannot use GFP_KERNEL.

Signed-off-by: Mike Christie <michaelc@xxxxxxxxxxx>
---
 block/scsi_ioctl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/scsi_ioctl.c b/block/scsi_ioctl.c
index bf97b22..adb3fc9 100644
--- a/block/scsi_ioctl.c
+++ b/block/scsi_ioctl.c
@@ -315,7 +315,7 @@ static int sg_io(struct file *file, struct request_queue *q,
 			break;
 		}
 
-	rq = blk_get_request(q, writing ? WRITE : READ, GFP_KERNEL);
+	rq = blk_get_request(q, writing ? WRITE : READ, GFP_NOIO);
 	if (!rq)
 		return -ENOMEM;
 
@@ -348,7 +348,7 @@ static int sg_io(struct file *file, struct request_queue *q,
 		kfree(iov);
 	} else if (hdr->dxfer_len)
 		ret = blk_rq_setup_transfer(NULL, rq, hdr->dxferp,
-					    hdr->dxfer_len, GFP_KERNEL);
+					    hdr->dxfer_len, GFP_NOIO);
 
 	if (ret)
 		goto out;
-- 
1.5.1.2

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux