[dm-devel] [PATCH 05/10] have block/scsi_ioctl user GFP_NOIO

michaelc at cs.wisc.edu michaelc at cs.wisc.edu
Sat Oct 20 05:44:39 UTC 2007


From: Mike Christie <michaelc at cs.wisc.edu>

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 at cs.wisc.edu>
---
 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




More information about the dm-devel mailing list