summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_state.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c
index f3e6090d462b..9ae40c96c1be 100644
--- a/drivers/block/drbd/drbd_state.c
+++ b/drivers/block/drbd/drbd_state.c
@@ -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)