aboutsummaryrefslogtreecommitdiffstats
path: root/block/as-iosched.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2006-03-18 13:21:20 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2006-03-18 18:34:12 -0500
commite17a9489b4a686bb5e9615e1d375c67619cb99c5 (patch)
treee6574d24ad8f16fefe7663c91cf19109e48f8c6c /block/as-iosched.c
parent25975f863b0fd42c58109e253e7a4c65d9fdaf48 (diff)
downloadmrst-s0i3-test-e17a9489b4a686bb5e9615e1d375c67619cb99c5.tar.gz
mrst-s0i3-test-e17a9489b4a686bb5e9615e1d375c67619cb99c5.tar.xz
mrst-s0i3-test-e17a9489b4a686bb5e9615e1d375c67619cb99c5.zip
[PATCH] stop elv_unregister() from rogering other iosched's data, fix locking
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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 8da3cf66894..d2ee2af44b5 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,