From: Lars Ellenberg Date: Tue, 15 Mar 2011 15:04:09 +0000 (+0100) Subject: drbd: add forgotten spin_unlock X-Git-Tag: firefly_0821_release~3680^2~1419^2~18^2~409 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3c5e5f6afd242ea5944197a9b54033c1461b793c;p=firefly-linux-kernel-4.4.55.git drbd: add forgotten spin_unlock somehow a "goto abort" was introduced with commit drbd: Extracted is_valid_transition() out of sanitize_state() which left drbd_req_state still holding the spin lock. Signed-off-by: Philipp Reisner Signed-off-by: Lars Ellenberg --- diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c index c27d3778cae6..0db6c4316f7e 100644 --- a/drivers/block/drbd/drbd_state.c +++ b/drivers/block/drbd/drbd_state.c @@ -180,8 +180,10 @@ drbd_req_state(struct drbd_conf *mdev, union drbd_state mask, os = mdev->state; ns = sanitize_state(mdev, apply_mask_val(os, mask, val), NULL); rv = is_valid_transition(os, ns); - if (rv < SS_SUCCESS) + if (rv < SS_SUCCESS) { + spin_unlock_irqrestore(&mdev->tconn->req_lock, flags); goto abort; + } if (cl_wide_st_chg(mdev, os, ns)) { rv = is_valid_state(mdev, ns);