mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
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:
parent
e1defc4ff0
commit
ae03bf639a
25 changed files with 147 additions and 97 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue