aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk.h
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk.h')
-rw-r--r--block/blk.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/block/blk.h b/block/blk.h
index 5dfc41267a08..79c85f7c9ff5 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -114,12 +114,7 @@ static inline int blk_cpu_to_group(int cpu)
114 114
115static inline int blk_do_io_stat(struct request *rq) 115static inline int blk_do_io_stat(struct request *rq)
116{ 116{
117 struct gendisk *disk = rq->rq_disk; 117 return rq->rq_disk && blk_rq_io_stat(rq);
118
119 if (!disk || !disk->queue)
120 return 0;
121
122 return blk_queue_io_stat(disk->queue) && (rq->cmd_flags & REQ_ELVPRIV);
123} 118}
124 119
125#endif 120#endif