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

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



From: Mike Christie <michaelc 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 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


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