From: Chris Mason Date: Wed, 16 Sep 2009 00:02:33 +0000 (-0400) Subject: Btrfs: Fix async thread shutdown race X-Git-Tag: v2.6.32-rc1~57^2^2~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e74057c4686dc12ea767b4bdc50a63876056e1c;p=pandora-kernel.git Btrfs: Fix async thread shutdown race It was possible for an async worker thread to be selected to receive a new work item, but exit before the work item was actually placed into that thread's work list. This commit fixes the race by incrementing the num_pending counter earlier, and making sure to check the number of pending work items before a thread exits. Signed-off-by: Chris Mason --- Reading git-diff-tree failed