aboutsummaryrefslogtreecommitdiffstats
path: root/block/as-iosched.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/as-iosched.c')
-rw-r--r--block/as-iosched.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/block/as-iosched.c b/block/as-iosched.c
index 8da3cf66894c..d2ee2af44b58 100644
--- a/block/as-iosched.c
+++ b/block/as-iosched.c
@@ -195,6 +195,12 @@ static void free_as_io_context(struct as_io_context *aic)
195 kfree(aic); 195 kfree(aic);
196} 196}
197 197
198static void as_trim(struct io_context *ioc)
199{
200 kfree(ioc->aic);
201 ioc->aic = NULL;
202}
203
198/* Called when the task exits */ 204/* Called when the task exits */
199static void exit_as_io_context(struct as_io_context *aic) 205static void exit_as_io_context(struct as_io_context *aic)
200{ 206{
@@ -1860,6 +1866,7 @@ static struct elevator_type iosched_as = {
1860 .elevator_may_queue_fn = as_may_queue, 1866 .elevator_may_queue_fn = as_may_queue,
1861 .elevator_init_fn = as_init_queue, 1867 .elevator_init_fn = as_init_queue,
1862 .elevator_exit_fn = as_exit_queue, 1868 .elevator_exit_fn = as_exit_queue,
1869 .trim = as_trim,
1863 }, 1870 },
1864 1871
1865 .elevator_ktype = &as_ktype, 1872 .elevator_ktype = &as_ktype,