summaryrefslogtreecommitdiff
path: root/drivers/block/drbd
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2012-08-28 09:07:56 (GMT)
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-09 13:08:23 (GMT)
commit07fc96197aec46f7ad4f08a4b2a1ea426112e24d (patch)
treeb1cb7a0f46bf938cd994515e91ed814f5f3ef976 /drivers/block/drbd
parent892fdd1aee35803bfa41ccf4df850ddb70f0811c (diff)
downloadlinux-07fc96197aec46f7ad4f08a4b2a1ea426112e24d.tar.xz
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: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd')
-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 f3e6090..9ae40c9 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)