summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sg.c
diff options
context:
space:
mode:
authorFUJITA Tomonori2008-12-18 06:49:38 +0100
committerJames Bottomley2009-01-02 18:10:35 +0100
commit97ae77a1cd332c7b011d71315c8faabce6840c72 (patch)
treefc243ca28ea474eaf81729079eeb3b259cd1b81b /drivers/scsi/sg.c
parent[SCSI] block: fix the partial mappings with struct rq_map_data (diff)
downloadkernel-qcow2-linux-97ae77a1cd332c7b011d71315c8faabce6840c72.tar.gz
kernel-qcow2-linux-97ae77a1cd332c7b011d71315c8faabce6840c72.tar.xz
kernel-qcow2-linux-97ae77a1cd332c7b011d71315c8faabce6840c72.zip
[SCSI] block: make blk_rq_map_user take a NULL user-space buffer for WRITE
The commit 818827669d85b84241696ffef2de485db46b0b5e (block: make blk_rq_map_user take a NULL user-space buffer) extended blk_rq_map_user to accept a NULL user-space buffer with a READ command. It was necessary to convert sg to use the block layer mapping API. This patch extends blk_rq_map_user again for a WRITE command. It is necessary to convert st and osst drivers to use the block layer apping API. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/sg.c')
-rw-r--r--drivers/scsi/sg.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
index 7d0b3d9ee43b..8f0bd3f7a59f 100644
--- a/drivers/scsi/sg.c
+++ b/drivers/scsi/sg.c
@@ -1670,6 +1670,7 @@ static int sg_start_req(Sg_request *srp, unsigned char *cmd)
md->page_order = req_schp->page_order;
md->nr_entries = req_schp->k_use_sg;
md->offset = 0;
+ md->null_mapped = hp->dxferp ? 0 : 1;
}
if (iov_count)