bsg: fix bogus EINVAL on non-data commands
authorTony Battersby <tonyb@cybernetics.com>
Wed, 11 Jul 2018 14:46:03 +0000 (10:46 -0400)
committerJens Axboe <axboe@kernel.dk>
Wed, 11 Jul 2018 14:48:28 +0000 (08:48 -0600)
commit70dbcc2254fa2a9add74a122b9dac954c4736e01
treed68a78ec09666e1e9e142a4bc587c18059674a4f
parent9fea4b395260175de4016b42982f45a3e6e03d0b
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>
block/bsg.c