projects
/
linux-2.6-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
bfq-iosched: Ensure bio->bi_blkg is valid before using it
[linux-2.6-block.git]
/
block
/
bfq-cgroup.c
diff --git
a/block/bfq-cgroup.c
b/block/bfq-cgroup.c
index cea0ae12f93783df801a2b85fc2d73cbea994f3c..e1419edde2ec5473f8c7b6868056019cc6df4c2c 100644
(file)
--- a/
block/bfq-cgroup.c
+++ b/
block/bfq-cgroup.c
@@
-351,6
+351,9
@@
void bfqg_stats_update_legacy_io(struct request_queue *q, struct request *rq)
{
struct bfq_group *bfqg = blkg_to_bfqg(rq->bio->bi_blkg);
+ if (!bfqg)
+ return;
+
blkg_rwstat_add(&bfqg->stats.bytes, rq->cmd_flags, blk_rq_bytes(rq));
blkg_rwstat_add(&bfqg->stats.ios, rq->cmd_flags, 1);
}