block: Use accessor functions for queue limits

Convert all external users of queue limits to using wrapper functions
instead of poking the request queue variables directly.

Signed-off-by: Martin K. Petersen <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Martin K. Petersen 2009-05-22 17:17:50 -04:00 • committed by Jens Axboe
commit ae03bf639a
25 changed files with 147 additions and 97 deletions

View file

@ -115,7 +115,7 @@ int blk_rq_map_user(struct request_queue *q, struct request *rq,
struct bio *bio = NULL;
int ret;
if (len > (q->max_hw_sectors << 9))
if (len > (queue_max_hw_sectors(q) << 9))
return -EINVAL;
if (!len)
return -EINVAL;
@ -292,7 +292,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
struct bio *bio;
int ret;
if (len > (q->max_hw_sectors << 9))
if (len > (queue_max_hw_sectors(q) << 9))
return -EINVAL;
if (!len || !kbuf)
return -EINVAL;