diff options
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/block/blk.h b/block/blk.h index 9b2c324e4407..404c10b25ca1 100644 --- a/block/blk.h +++ b/block/blk.h | |||
@@ -149,9 +149,16 @@ static inline int blk_cpu_to_group(int cpu) | |||
149 | #endif | 149 | #endif |
150 | } | 150 | } |
151 | 151 | ||
152 | /* | ||
153 | * Contribute to IO statistics IFF: | ||
154 | * | ||
155 | * a) it's attached to a gendisk, and | ||
156 | * b) the queue had IO stats enabled when this request was started, and | ||
157 | * c) it's a file system request | ||
158 | */ | ||
152 | static inline int blk_do_io_stat(struct request *rq) | 159 | static inline int blk_do_io_stat(struct request *rq) |
153 | { | 160 | { |
154 | return rq->rq_disk && blk_rq_io_stat(rq); | 161 | return rq->rq_disk && blk_rq_io_stat(rq) && blk_fs_request(rq); |
155 | } | 162 | } |
156 | 163 | ||
157 | #endif | 164 | #endif |