diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2009-05-22 17:17:50 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-05-22 17:22:54 -0400 |
commit | ae03bf639a5027d27270123f5f6e3ee6a412781d (patch) | |
tree | d705f41a188ad656b1f47f7952626a9f992e3b8f /drivers/block/pktcdvd.c | |
parent | e1defc4ff0cf57aca6c5e3ff99fa503f5943c1f1 (diff) |
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 <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/block/pktcdvd.c')
-rw-r--r-- | drivers/block/pktcdvd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c index 293f5858921d..d57f11759480 100644 --- a/drivers/block/pktcdvd.c +++ b/drivers/block/pktcdvd.c | |||
@@ -991,13 +991,15 @@ static void pkt_iosched_process_queue(struct pktcdvd_device *pd) | |||
991 | */ | 991 | */ |
992 | static int pkt_set_segment_merging(struct pktcdvd_device *pd, struct request_queue *q) | 992 | static int pkt_set_segment_merging(struct pktcdvd_device *pd, struct request_queue *q) |
993 | { | 993 | { |
994 | if ((pd->settings.size << 9) / CD_FRAMESIZE <= q->max_phys_segments) { | 994 | if ((pd->settings.size << 9) / CD_FRAMESIZE |
995 | <= queue_max_phys_segments(q)) { | ||
995 | /* | 996 | /* |
996 | * The cdrom device can handle one segment/frame | 997 | * The cdrom device can handle one segment/frame |
997 | */ | 998 | */ |
998 | clear_bit(PACKET_MERGE_SEGS, &pd->flags); | 999 | clear_bit(PACKET_MERGE_SEGS, &pd->flags); |
999 | return 0; | 1000 | return 0; |
1000 | } else if ((pd->settings.size << 9) / PAGE_SIZE <= q->max_phys_segments) { | 1001 | } else if ((pd->settings.size << 9) / PAGE_SIZE |
1002 | <= queue_max_phys_segments(q)) { | ||
1001 | /* | 1003 | /* |
1002 | * We can handle this case at the expense of some extra memory | 1004 | * We can handle this case at the expense of some extra memory |
1003 | * copies during write operations | 1005 | * copies during write operations |