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 8da3cf6..d2ee2af 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)
kfree(aic);
}
+static void as_trim(struct io_context *ioc)
+{
+ kfree(ioc->aic);
+ ioc->aic = NULL;
+}
+
/* Called when the task exits */
static void exit_as_io_context(struct as_io_context *aic)
{
@@ -1860,6 +1866,7 @@ static struct elevator_type iosched_as = {
.elevator_may_queue_fn = as_may_queue,
.elevator_init_fn = as_init_queue,
.elevator_exit_fn = as_exit_queue,
+ .trim = as_trim,
},
.elevator_ktype = &as_ktype,