summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2003-01-07 17:48:13 -0800
committerTrond Myklebust <trond.myklebust@fys.uio.no>2003-01-07 17:48:13 -0800
commit90c4bb0523a4fa08090f5123400eebc3e6fbeaf1 (patch)
tree8e9bf5ad9cff8c6b4ebc3beb68cbcda46bf785ef
parentbebaf4f07b7438f88e2feb088ec2ecd0c0a71937 (diff)
[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.
-rw-r--r--fs/aio.c1
-rw-r--r--kernel/fork.c1
2 files changed, 1 insertions, 1 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 0e679f93e272..c406f7180d25 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -302,7 +302,6 @@ void wait_for_all_aios(struct kioctx *ctx)
add_wait_queue(&ctx->wait, &wait);
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
while (ctx->reqs_active) {
- printk("ctx->reqs_active = %d\n", ctx->reqs_active);
schedule();
set_task_state(tsk, TASK_UNINTERRUPTIBLE);
}
diff --git a/kernel/fork.c b/kernel/fork.c
index 60d6d54142c6..1850fb64fd5d 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -380,6 +380,7 @@ void mmput(struct mm_struct *mm)
list_del(&mm->mmlist);
mmlist_nr--;
spin_unlock(&mmlist_lock);
+ exit_aio(mm);
exit_mmap(mm);
mmdrop(mm);
}