diff options
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 521c56d4fdbc..7102bafc98b3 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -1211,6 +1211,13 @@ static void cfq_free_io_context(struct cfq_io_context *cic) | |||
1211 | kmem_cache_free(cfq_ioc_pool, cic); | 1211 | kmem_cache_free(cfq_ioc_pool, cic); |
1212 | } | 1212 | } |
1213 | 1213 | ||
1214 | static void cfq_trim(struct io_context *ioc) | ||
1215 | { | ||
1216 | ioc->set_ioprio = NULL; | ||
1217 | if (ioc->cic) | ||
1218 | cfq_free_io_context(ioc->cic); | ||
1219 | } | ||
1220 | |||
1214 | /* | 1221 | /* |
1215 | * Called with interrupts disabled | 1222 | * Called with interrupts disabled |
1216 | */ | 1223 | */ |
@@ -2472,6 +2479,7 @@ static struct elevator_type iosched_cfq = { | |||
2472 | .elevator_may_queue_fn = cfq_may_queue, | 2479 | .elevator_may_queue_fn = cfq_may_queue, |
2473 | .elevator_init_fn = cfq_init_queue, | 2480 | .elevator_init_fn = cfq_init_queue, |
2474 | .elevator_exit_fn = cfq_exit_queue, | 2481 | .elevator_exit_fn = cfq_exit_queue, |
2482 | .trim = cfq_trim, | ||
2475 | }, | 2483 | }, |
2476 | .elevator_ktype = &cfq_ktype, | 2484 | .elevator_ktype = &cfq_ktype, |
2477 | .elevator_name = "cfq", | 2485 | .elevator_name = "cfq", |