Commit 90c4bb05 authored by Andrew Morton's avatar Andrew Morton Committed by Trond Myklebust

[PATCH] AIO exit fix

We need to run exit_aio() when the final user of the mm goes away, else lots
of things leak.

Also remove a printk which comes out when this change is made.

This patch was acked by bcrl.
parent bebaf4f0
...@@ -302,7 +302,6 @@ void wait_for_all_aios(struct kioctx *ctx) ...@@ -302,7 +302,6 @@ void wait_for_all_aios(struct kioctx *ctx)
add_wait_queue(&ctx->wait, &wait); add_wait_queue(&ctx->wait, &wait);
set_task_state(tsk, TASK_UNINTERRUPTIBLE); set_task_state(tsk, TASK_UNINTERRUPTIBLE);
while (ctx->reqs_active) { while (ctx->reqs_active) {
printk("ctx->reqs_active = %d\n", ctx->reqs_active);
schedule(); schedule();
set_task_state(tsk, TASK_UNINTERRUPTIBLE); set_task_state(tsk, TASK_UNINTERRUPTIBLE);
} }
......
...@@ -380,6 +380,7 @@ void mmput(struct mm_struct *mm) ...@@ -380,6 +380,7 @@ void mmput(struct mm_struct *mm)
list_del(&mm->mmlist); list_del(&mm->mmlist);
mmlist_nr--; mmlist_nr--;
spin_unlock(&mmlist_lock); spin_unlock(&mmlist_lock);
exit_aio(mm);
exit_mmap(mm); exit_mmap(mm);
mmdrop(mm); mmdrop(mm);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment