From 90c4bb0523a4fa08090f5123400eebc3e6fbeaf1 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Tue, 7 Jan 2003 17:48:13 -0800 Subject: [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. --- fs/aio.c | 1 - kernel/fork.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit v1.2.3