diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-15 18:24:49 +0100 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2012-11-04 00:16:26 +0100 |
commit | 38fa9988fa838324a0cce6e2f9d3c674230659d5 (patch) | |
tree | 8797715df160a1ab72927c89c654a5752122a2d6 /drivers/block/drbd/drbd_worker.c | |
parent | 34f646bd5731cfd456fbacc95c12a2cf52275e54 (diff) | |
download | linux-38fa9988fa838324a0cce6e2f9d3c674230659d5.tar.gz linux-38fa9988fa838324a0cce6e2f9d3c674230659d5.tar.bz2 linux-38fa9988fa838324a0cce6e2f9d3c674230659d5.zip |
drbd: Do not modify the connection state with something else that conn_request_state()
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_worker.c')
-rw-r--r-- | drivers/block/drbd/drbd_worker.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/block/drbd/drbd_worker.c b/drivers/block/drbd/drbd_worker.c index e459cb2076bd..a730520e468e 100644 --- a/drivers/block/drbd/drbd_worker.c +++ b/drivers/block/drbd/drbd_worker.c @@ -1290,12 +1290,6 @@ int w_send_read_req(struct drbd_work *w, int cancel) ok = drbd_send_drequest(mdev, P_DATA_REQUEST, req->i.sector, req->i.size, (unsigned long)req); - if (!ok) { - /* ?? we set C_TIMEOUT or C_BROKEN_PIPE in drbd_send(); - * so this is probably redundant */ - if (mdev->state.conn >= C_CONNECTED) - drbd_force_state(mdev, NS(conn, C_NETWORK_FAILURE)); - } req_mod(req, ok ? HANDED_OVER_TO_NETWORK : SEND_FAILED); return ok; @@ -1510,7 +1504,7 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side) if (r > 0) { dev_info(DEV, "before-resync-target handler returned %d, " "dropping connection.\n", r); - drbd_force_state(mdev, NS(conn, C_DISCONNECTING)); + conn_request_state(mdev->tconn, NS(conn, C_DISCONNECTING), CS_HARD); return; } } else /* C_SYNC_SOURCE */ { @@ -1523,7 +1517,7 @@ void drbd_start_resync(struct drbd_conf *mdev, enum drbd_conns side) } else { dev_info(DEV, "before-resync-source handler returned %d, " "dropping connection.\n", r); - drbd_force_state(mdev, NS(conn, C_DISCONNECTING)); + conn_request_state(mdev->tconn, NS(conn, C_DISCONNECTING), CS_HARD); return; } } |