From: Shin Hong Date: Thu, 11 Jun 2009 00:11:29 +0000 (-0400) Subject: Btrfs: init worker struct fields before kthread-run X-Git-Tag: v2.6.31-rc1~380^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd0fb038d5a308c7faddd1701be5e70aaffec98b;p=pandora-kernel.git Btrfs: init worker struct fields before kthread-run This patch fixes a bug which may result race condition between btrfs_start_workers() and worker_loop(). btrfs_start_workers() executed in a parent thread writes on workers->worker and worker_loop() in a child thread reads workers->worker. However, there is no synchronization enforcing the order of two operations. This patch makes btrfs_start_workers() fill workers->worker before it starts a child thread with worker_loop() Signed-off-by: Chris Mason --- Reading git-diff-tree failed