From: Philipp Reisner Date: Tue, 21 Aug 2012 18:34:07 +0000 (+0200) Subject: drbd: Fix a race condition that can lead to a BUG() X-Git-Tag: v3.8-rc1~78^2~18^2~25 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1fd29a11f433ca8ae37723768016ffe6cdd487b;p=pandora-kernel.git drbd: Fix a race condition that can lead to a BUG() If the preconditions for a state change change after the wait_event() we might hit the BUG() statement in conn_set_state(). With holding the spin_lock while evaluating the condition AND until the actual state change we ensure the the preconditions can not change anymore. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- Reading git-diff-tree failed