From: Philipp Reisner Date: Mon, 28 Apr 2014 16:43:12 +0000 (+0200) Subject: drbd: Break a deadlock while concurrent fencing and establishing a connection X-Git-Tag: omap-for-v3.16/fixes-against-rc1~39^2~47^2~47 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31007745a5f328b8d70d865c4a6118be01421b8c;p=pandora-kernel.git drbd: Break a deadlock while concurrent fencing and establishing a connection When we need to outdate the peer while being promoted to primary, and the connection gets established at the same time, we deadlock in drbd_try_outdate_peer() when trying to clear the susp_fen bit. Fix this by setting the STATE_SENT bit while holding the mutex. Using drbd_change_state(.. , CS_HARD, ..) which does not block until STATE_SENT is cleared, is only for clearness. It does not contribute anything to the fix. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg Signed-off-by: Jens Axboe --- Reading git-diff-tree failed