bsg: Remove bogus check against request_queue->max_sectors
Subsystems (3)
PATCH RESEND 1/1 bsg: Remove bogus check against request_queue->max_sectors
bsg submits REQ_TYPE_BLOCK_PC so the right check is max_hw_sectors. But I've removed this check because right after, bsg proceeds with calling blk_rq_map_user() which does all the right checks.
Signed-off-by Boaz Harrosh <[email protected]>
--- block/bsg.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
block/bsg.c +0 -3
@@ -218,9 +218,6 @@ bsg_validate_sgv4_hdr(struct request_queue *q, struct sg_io_v4 *hdr, int *rw)if (hdr->guard !='Q' )return -EINVAL ; -if (hdr->dout_xfer_len > (q->max_sectors <<9 ) || - hdr->din_xfer_len > (q->max_sectors <<9 )) -return -EIO ;switch (hdr->protocol) {case BSG_PROTOCOL_SCSI :
Signature · 1 line
1.6.2.1
Jens Axboe
AppliedQuoted 15 lines · Boaz Harrosh
bsg submits
REQ_TYPE_BLOCK_PCso the right check ismax_hw_sectors. But I've removed this check because right after, bsg proceeds with callingblk_rq_map_user()which does all the right checks.Signed-off-by Boaz Harrosh <[email protected]>--- block/bsg.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)block/bsg.c +0
-0
block/bsg.c bsg_validate_sgv4_hdr(struct request_queue *q, struct sg_io_v4 *hdr, int *rw) · line 223
Quoted 9 lines
block/bsg.c +0
-3@@ -218,9 +218,6 @@ bsg_validate_sgv4_hdr(struct request_queue *q, struct sg_io_v4 *hdr, int *rw)if (hdr->guard !='Q' )return -EINVAL ; -if (hdr->dout_xfer_len > (q->max_sectors <<9 ) || - hdr->din_xfer_len > (q->max_sectors <<9 )) -return -EIO ;switch (hdr->protocol) {case BSG_PROTOCOL_SCSI :
Applied
Signature · 1 line
Jens Axboe