projects/linux·commit 4b5d37ac

[PATCH] Clear task_struct->fs_excl on fork()

4b5d37ac · Giancarlo Formicuccia <[email protected]> · 2005-09-09 13:01:22 -07:00

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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
4b5d37ac02954572e80e09255bb5737277aaee8e
Parents
1299232b

Changes

1 files changed · +1 −0

FileStatusAddDelContent
kernel/fork.cmodified+1−0View file

kernel/fork.c

View file
diff --git a/kernel/fork.c b/kernel/fork.c
index 7e1ead9..dfeadf4 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;
}