From: Josef Bacik Date: Thu, 30 May 2013 20:55:44 +0000 (-0400) Subject: Btrfs: stop all workers before cleaning up roots X-Git-Tag: v3.10-rc6~9^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=13e6c37b989859e70b0d73d3f2cb0aa022159b17;p=pandora-kernel.git Btrfs: stop all workers before cleaning up roots Dave reported a panic because the extent_root->commit_root was NULL in the caching kthread. That is because we just unset it in free_root_pointers, which is not the correct thing to do, we have to either wait for the caching kthread to complete or hold the extent_commit_sem lock so we know the thread has exited. This patch makes the kthreads all stop first and then we do our cleanup. This should fix the race. Thanks, Reported-by: David Sterba Signed-off-by: Josef Bacik --- Reading git-diff-tree failed