From: yanhai zhu Date: Wed, 12 Nov 2008 19:36:58 +0000 (-0500) Subject: Btrfs: Check kthread_should_stop() before schedule() in worker_loop X-Git-Tag: v2.6.29-rc1~27^2~9^2~55^2~14 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0df49b911db2b22ea808b596070b1cc65c23d148;p=pandora-kernel.git Btrfs: Check kthread_should_stop() before schedule() in worker_loop In worker_loop(), the func should check whether it has been requested to stop before it decides to schedule out. Otherwise if the stop request(also the last wake_up()) sent by btrfs_stop_workers() happens when worker_loop() running after the "while" judgement and before schedule(), woker_loop() will schedule away and never be woken up, which will also cause btrfs_stop_workers() wait forever. Signed-off-by: Chris Mason --- Reading git-diff-tree failed