aboutsummaryrefslogtreecommitdiff
path: root/block/bsg.c
diff options
context:
space:
mode:
authorTony Battersby <tonyb@cybernetics.com>2018-07-11 10:46:03 -0400
committerJens Axboe <axboe@kernel.dk>2018-07-11 08:48:28 -0600
commit70dbcc2254fa2a9add74a122b9dac954c4736e01 (patch)
treed68a78ec09666e1e9e142a4bc587c18059674a4f /block/bsg.c
parent9fea4b395260175de4016b42982f45a3e6e03d0b (diff)
downloadlinux-stericsson-70dbcc2254fa2a9add74a122b9dac954c4736e01.tar.gz
bsg: fix bogus EINVAL on non-data commands
Fix a regression introduced in Linux kernel 4.17 where sending a SCSI command that does not transfer data (such as TEST UNIT READY) via /dev/bsg/* results in EINVAL. Fixes: 17cb960f29c2 ("bsg: split handling of SCSI CDBs vs transport requeues") Cc: <stable@vger.kernel.org> # 4.17+ Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Tony Battersby <tonyb@cybernetics.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bsg.c')
-rw-r--r--block/bsg.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/block/bsg.c b/block/bsg.c
index 66602c489956..3da540faf673 100644
--- a/block/bsg.c
+++ b/block/bsg.c
@@ -267,8 +267,6 @@ bsg_map_hdr(struct request_queue *q, struct sg_io_v4 *hdr, fmode_t mode)
} else if (hdr->din_xfer_len) {
ret = blk_rq_map_user(q, rq, NULL, uptr64(hdr->din_xferp),
hdr->din_xfer_len, GFP_KERNEL);
- } else {
- ret = blk_rq_map_user(q, rq, NULL, NULL, 0, GFP_KERNEL);
}
if (ret)