diff options
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk.h b/block/blk.h index c863ec2281e0..3fae6add5430 100644 --- a/block/blk.h +++ b/block/blk.h | |||
@@ -156,12 +156,12 @@ static inline int blk_cpu_to_group(int cpu) | |||
156 | * | 156 | * |
157 | * a) it's attached to a gendisk, and | 157 | * a) it's attached to a gendisk, and |
158 | * b) the queue had IO stats enabled when this request was started, and | 158 | * b) the queue had IO stats enabled when this request was started, and |
159 | * c) it's a file system request | 159 | * c) it's a file system request or a discard request |
160 | */ | 160 | */ |
161 | static inline int blk_do_io_stat(struct request *rq) | 161 | static inline int blk_do_io_stat(struct request *rq) |
162 | { | 162 | { |
163 | return rq->rq_disk && blk_rq_io_stat(rq) && blk_fs_request(rq) && | 163 | return rq->rq_disk && blk_rq_io_stat(rq) && |
164 | blk_discard_rq(rq); | 164 | (blk_fs_request(rq) || blk_discard_rq(rq)); |
165 | } | 165 | } |
166 | 166 | ||
167 | #endif | 167 | #endif |