Commit 07fc9619 authored by Philipp Reisner's avatar Philipp Reisner

drbd: Do not check aspects that are not subject to change in _conn_requests_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: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 892fdd1a
...@@ -1742,9 +1742,11 @@ _conn_request_state(struct drbd_tconn *tconn, union drbd_state mask, union drbd_ ...@@ -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; union drbd_state ns_max, ns_min, os;
bool have_mutex = false; bool have_mutex = false;
rv = is_valid_conn_transition(oc, val.conn); if (mask.conn) {
if (rv < SS_SUCCESS) rv = is_valid_conn_transition(oc, val.conn);
goto abort; if (rv < SS_SUCCESS)
goto abort;
}
rv = conn_is_valid_transition(tconn, mask, val, flags); rv = conn_is_valid_transition(tconn, mask, val, flags);
if (rv < SS_SUCCESS) if (rv < SS_SUCCESS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment