瀏覽代碼

[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 <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Giancarlo Formicuccia 20 年之前
父節點
當前提交
4b5d37ac02
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      kernel/fork.c

+ 1 - 0
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) */
 	/* One for us, one for whoever does the "release_task()" (usually parent) */
 	atomic_set(&tsk->usage,2);
 	atomic_set(&tsk->usage,2);
+	atomic_set(&tsk->fs_excl, 0);
 	return tsk;
 	return tsk;
 }
 }