mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
[SCSI] block: make blk_rq_map_user take a NULL user-space buffer for WRITE
The commit 818827669d (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 <[email protected]>
Acked-by: Jens Axboe <[email protected]>
Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
56c451f4b5
commit
97ae77a1cd
4 changed files with 10 additions and 10 deletions
2
fs/bio.c
2
fs/bio.c
|
|
@ -859,7 +859,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
|
|||
/*
|
||||
* success
|
||||
*/
|
||||
if (!write_to_vm) {
|
||||
if (!write_to_vm && (!map_data || !map_data->null_mapped)) {
|
||||
ret = __bio_copy_iov(bio, bio->bi_io_vec, iov, iov_count, 0, 0);
|
||||
if (ret)
|
||||
goto cleanup;
|
||||
|
|
|
|||
Loading…
Reference in a new issue