projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59bd71a
)
cfq-iosched: free cic_index if blkio_alloc_blkg_stats fails
author
majianpeng
<majianpeng@gmail.com>
Wed, 30 Nov 2011 14:47:48 +0000
(15:47 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Wed, 30 Nov 2011 14:47:48 +0000
(15:47 +0100)
If we fail allocating the blkpg stats, we free cfqd and cfgq.
But we need to free the IDA cfqd->cic_index as well.
Signed-off-by: majianpeng <majianpeng@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/cfq-iosched.c
patch
|
blob
|
blame
|
history
diff --git
a/block/cfq-iosched.c
b/block/cfq-iosched.c
index 16ace89613bc6e4ce343cdd2f1da85218b7dc5e7..3beed83437a3268242e1bb33a10076644dd7b338 100644
(file)
--- a/
block/cfq-iosched.c
+++ b/
block/cfq-iosched.c
@@
-4036,6
+4036,11
@@
static void *cfq_init_queue(struct request_queue *q)
if (blkio_alloc_blkg_stats(&cfqg->blkg)) {
kfree(cfqg);
+
+ spin_lock(&cic_index_lock);
+ ida_remove(&cic_index_ida, cfqd->cic_index);
+ spin_unlock(&cic_index_lock);
+
kfree(cfqd);
return NULL;
}