[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080307091321.EB68F1B419C@basil.firstfloor.org>
Date: Fri, 7 Mar 2008 10:13:21 +0100 (CET)
From: Andi Kleen <andi@...stfloor.org>
To: axboe@...nel.dk, linux-kernel@...r.kernel.org
Subject: [PATCH] [1/7] Convert a few direct bounce_gfp users over to the blk_* wrappers
Signed-off-by: Andi Kleen <ak@...e.de>
---
block/scsi_ioctl.c | 6 ++++--
fs/bio.c | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
Index: linux/block/scsi_ioctl.c
===================================================================
--- linux.orig/block/scsi_ioctl.c
+++ linux/block/scsi_ioctl.c
@@ -433,10 +433,12 @@ int sg_scsi_ioctl(struct file *file, str
bytes = max(in_len, out_len);
if (bytes) {
- buffer = kzalloc(bytes, q->bounce_gfp | GFP_USER| __GFP_NOWARN);
+ /* RED-PEN GFP_NOIO really needed? */
+ buffer = blk_kmalloc(q, bytes,
+ GFP_NOIO | GFP_USER | __GFP_NOWARN);
if (!buffer)
return -ENOMEM;
-
+ memset(buffer, 0, bytes);
}
rq = blk_get_request(q, in_len ? WRITE : READ, __GFP_WAIT);
Index: linux/fs/bio.c
===================================================================
--- linux.orig/fs/bio.c
+++ linux/fs/bio.c
@@ -545,7 +545,7 @@ struct bio *bio_copy_user(struct request
if (bytes > len)
bytes = len;
- page = alloc_page(q->bounce_gfp | GFP_KERNEL);
+ page = blk_alloc_pages(q, GFP_KERNEL, PAGE_SIZE);
if (!page) {
ret = -ENOMEM;
break;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists