* [PATCH] block: call blk_rq_map_user only for commands with data transfer
@ 2006-11-25 1:22 FUJITA Tomonori
2006-11-25 8:54 ` Jens Axboe
0 siblings, 1 reply; 2+ messages in thread
From: FUJITA Tomonori @ 2006-11-25 1:22 UTC (permalink / raw)
To: linux-scsi; +Cc: jens.axboe
bsg_map_hdr always calls blk_rq_map_user so commands without data
transfer fail.
This is against the bsg branch in the block tree.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
block/bsg.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/block/bsg.c b/block/bsg.c
index 5d23f97..65729fd 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -301,7 +301,7 @@ bsg_map_hdr(struct bsg_device *bd, int r
return ERR_PTR(ret);
}
- if (!hdr->iovec_count) {
+ if (!hdr->iovec_count && hdr->dxfer_len) {
ret = blk_rq_map_user(q, rq, hdr->dxferp, hdr->dxfer_len);
if (ret)
goto out;
--
1.4.1.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] block: call blk_rq_map_user only for commands with data transfer
2006-11-25 1:22 [PATCH] block: call blk_rq_map_user only for commands with data transfer FUJITA Tomonori
@ 2006-11-25 8:54 ` Jens Axboe
0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2006-11-25 8:54 UTC (permalink / raw)
To: FUJITA Tomonori; +Cc: linux-scsi
On Sat, Nov 25 2006, FUJITA Tomonori wrote:
> bsg_map_hdr always calls blk_rq_map_user so commands without data
> transfer fail.
>
> This is against the bsg branch in the block tree.
>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> ---
> block/bsg.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/block/bsg.c b/block/bsg.c
> index 5d23f97..65729fd 100644
> --- a/block/bsg.c
> +++ b/block/bsg.c
> @@ -301,7 +301,7 @@ bsg_map_hdr(struct bsg_device *bd, int r
> return ERR_PTR(ret);
> }
>
> - if (!hdr->iovec_count) {
> + if (!hdr->iovec_count && hdr->dxfer_len) {
> ret = blk_rq_map_user(q, rq, hdr->dxferp, hdr->dxfer_len);
> if (ret)
> goto out;
Good point, thanks!
--
Jens Axboe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-25 8:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-25 1:22 [PATCH] block: call blk_rq_map_user only for commands with data transfer FUJITA Tomonori
2006-11-25 8:54 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.