Skip to content

Commit

Permalink
drbd: add forgotten spin_unlock
Browse files Browse the repository at this point in the history
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 <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed Nov 3, 2012
1 parent 527f4b2 commit 3c5e5f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/block/drbd/drbd_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3c5e5f6

Please sign in to comment.