From: Jens Axboe <jens.axboe@oracle.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] block: call blk_rq_map_user only for commands with data transfer
Date: Sat, 25 Nov 2006 09:54:29 +0100 [thread overview]
Message-ID: <20061125085427.GH5400@kernel.dk> (raw)
In-Reply-To: <200611250122.kAP1MvHi021546@r-dd.iij4u.or.jp>
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
prev parent reply other threads:[~2006-11-25 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20061125085427.GH5400@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.