mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -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
|
|
@ -991,13 +991,15 @@ static void pkt_iosched_process_queue(struct pktcdvd_device *pd)
|
|||
*/
|
||||
static int pkt_set_segment_merging(struct pktcdvd_device *pd, struct request_queue *q)
|
||||
{
|
||||
if ((pd->settings.size << 9) / CD_FRAMESIZE <= q->max_phys_segments) {
|
||||
if ((pd->settings.size << 9) / CD_FRAMESIZE
|
||||
<= queue_max_phys_segments(q)) {
|
||||
/*
|
||||
* The cdrom device can handle one segment/frame
|
||||
*/
|
||||
clear_bit(PACKET_MERGE_SEGS, &pd->flags);
|
||||
return 0;
|
||||
} else if ((pd->settings.size << 9) / PAGE_SIZE <= q->max_phys_segments) {
|
||||
} else if ((pd->settings.size << 9) / PAGE_SIZE
|
||||
<= queue_max_phys_segments(q)) {
|
||||
/*
|
||||
* We can handle this case at the expense of some extra memory
|
||||
* copies during write operations
|
||||
|
|
|
|||
Loading…
Reference in a new issue