]> git.hungrycats.org Git - linux/commitdiff
[PATCH] AIO exit fix
authorAndrew Morton <akpm@digeo.com>
Wed, 8 Jan 2003 01:48:13 +0000 (17:48 -0800)
committerTrond Myklebust <trond.myklebust@fys.uio.no>
Wed, 8 Jan 2003 01:48:13 +0000 (17:48 -0800)
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
kernel/fork.c

index 0e679f93e272ab008580d66d97e0ec71d467b6dc..c406f7180d25ee768f8661a8f5e799fd38e429ee 100644 (file)
--- 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);
        }
index 60d6d54142c64e4cd8645015439efd423573af25..1850fb64fd5d66f803e665c42f18f4d9b9c511b7 100644 (file)
@@ -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);
        }