From: Giancarlo Formicuccia Date: Fri, 9 Sep 2005 20:01:22 +0000 (-0700) Subject: [PATCH] Clear task_struct->fs_excl on fork() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=4b5d37ac02954572e80e09255bb5737277aaee8e;p=openwrt%2Fstaging%2Fblogic.git [PATCH] Clear task_struct->fs_excl on fork() 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/fork.c b/kernel/fork.c index 7e1ead9a6ba4..dfeadf466f18 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -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; }