mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]>
This commit is contained in:
parent
45c82b5a77
commit
fb8ec18c31
2 changed files with 11 additions and 3 deletions
|
|
@ -108,4 +108,12 @@ static inline int blk_cpu_to_group(int cpu)
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline int blk_do_io_stat(struct request_queue *q)
|
||||
{
|
||||
if (q)
|
||||
return blk_queue_io_stat(q);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue