diff options
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/block/blk.h b/block/blk.h index 22043c2886c7..24fcaeeaf620 100644 --- a/block/blk.h +++ b/block/blk.h | |||
@@ -112,12 +112,14 @@ static inline int blk_cpu_to_group(int cpu) | |||
112 | #endif | 112 | #endif |
113 | } | 113 | } |
114 | 114 | ||
115 | static inline int blk_do_io_stat(struct request_queue *q) | 115 | static inline int blk_do_io_stat(struct request *rq) |
116 | { | 116 | { |
117 | if (q) | 117 | struct gendisk *disk = rq->rq_disk; |
118 | return blk_queue_io_stat(q); | ||
119 | 118 | ||
120 | return 0; | 119 | if (!disk || !disk->queue) |
120 | return 0; | ||
121 | |||
122 | return blk_queue_io_stat(disk->queue) && (rq->cmd_flags & REQ_ELVPRIV); | ||
121 | } | 123 | } |
122 | 124 | ||
123 | #endif | 125 | #endif |