Skip to content

Commit

Permalink
drbd: Do not check aspects that are not subject to change in _conn_re…
Browse files Browse the repository at this point in the history
…quests_state()

When _conn_requests_state() is used to change other parts of the state
than the connection, do not check for a valid connection transition.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
  • Loading branch information
Philipp Reisner committed Nov 9, 2012
1 parent 892fdd1 commit 07fc961
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/block/drbd/drbd_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1742,9 +1742,11 @@ _conn_request_state(struct drbd_tconn *tconn, union drbd_state mask, union drbd_
union drbd_state ns_max, ns_min, os;
bool have_mutex = false;

rv = is_valid_conn_transition(oc, val.conn);
if (rv < SS_SUCCESS)
goto abort;
if (mask.conn) {
rv = is_valid_conn_transition(oc, val.conn);
if (rv < SS_SUCCESS)
goto abort;
}

rv = conn_is_valid_transition(tconn, mask, val, flags);
if (rv < SS_SUCCESS)
Expand Down

0 comments on commit 07fc961

Please sign in to comment.