]> err.no Git - linux-2.6/commitdiff
[PATCH] Clear task_struct->fs_excl on fork()
authorGiancarlo Formicuccia <giancarlo.formicuccia@gmail.com>
Fri, 9 Sep 2005 20:01:22 +0000 (13:01 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 9 Sep 2005 20:56:43 +0000 (13:56 -0700)
An oversight.  We don't want to carry the IO scheduler's "we hold exclusive fs
resources" hint over to the child across fork().

Acked-by: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/fork.c

index 7e1ead9a6ba453bbfafab739df3690e69684e769..dfeadf466f185b9eb1192a94044d710adaa991e0 100644 (file)
@@ -176,6 +176,7 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
 
        /* One for us, one for whoever does the "release_task()" (usually parent) */
        atomic_set(&tsk->usage,2);
+       atomic_set(&tsk->fs_excl, 0);
        return tsk;
 }