diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-02-02 02:42:32 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-02-02 02:42:32 -0500 |
commit | fb8ec18c316d869271137c97320dbfd2def56569 (patch) | |
tree | 8cf6a84747e10f0cf78a1cb73b1ea69681da0d70 /block/blk.h | |
parent | 45c82b5a770be66845687a7d027c8b52946d59af (diff) |
block: fix oops in blk_queue_io_stat()
Some initial probe requests don't have disk->queue mapped yet, so we
can't rely on a non-NULL queue in blk_queue_io_stat(). Wrap it in
blk_do_io_stat().
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk.h')
-rw-r--r-- | block/blk.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/block/blk.h b/block/blk.h index 6e1ed40534e9..0dce92c37496 100644 --- a/block/blk.h +++ b/block/blk.h | |||
@@ -108,4 +108,12 @@ static inline int blk_cpu_to_group(int cpu) | |||
108 | #endif | 108 | #endif |
109 | } | 109 | } |
110 | 110 | ||
111 | static inline int blk_do_io_stat(struct request_queue *q) | ||
112 | { | ||
113 | if (q) | ||
114 | return blk_queue_io_stat(q); | ||
115 | |||
116 | return 0; | ||
117 | } | ||
118 | |||
111 | #endif | 119 | #endif |