提交 0829f5ed 编写于 作者: A Andreas Gruenbacher 提交者: Philipp Reisner

drbd: drbd_connected(): Return an error code upon failure.

Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
上级 a5c31904
...@@ -781,7 +781,7 @@ static int drbd_socket_okay(struct socket **sock) ...@@ -781,7 +781,7 @@ static int drbd_socket_okay(struct socket **sock)
int drbd_connected(int vnr, void *p, void *data) int drbd_connected(int vnr, void *p, void *data)
{ {
struct drbd_conf *mdev = (struct drbd_conf *)p; struct drbd_conf *mdev = (struct drbd_conf *)p;
int ok = 1; int err;
atomic_set(&mdev->packet_seq, 0); atomic_set(&mdev->packet_seq, 0);
mdev->peer_seq = 0; mdev->peer_seq = 0;
...@@ -790,15 +790,16 @@ int drbd_connected(int vnr, void *p, void *data) ...@@ -790,15 +790,16 @@ int drbd_connected(int vnr, void *p, void *data)
&mdev->tconn->cstate_mutex : &mdev->tconn->cstate_mutex :
&mdev->own_state_mutex; &mdev->own_state_mutex;
ok &= !drbd_send_sync_param(mdev); err = drbd_send_sync_param(mdev);
ok &= !drbd_send_sizes(mdev, 0, 0); if (!err)
ok &= !drbd_send_uuids(mdev); err = drbd_send_sizes(mdev, 0, 0);
ok &= !drbd_send_state(mdev); if (!err)
err = drbd_send_uuids(mdev);
if (!err)
err = drbd_send_state(mdev);
clear_bit(USE_DEGR_WFC_T, &mdev->flags); clear_bit(USE_DEGR_WFC_T, &mdev->flags);
clear_bit(RESIZE_PENDING, &mdev->flags); clear_bit(RESIZE_PENDING, &mdev->flags);
return err;
return !ok;
} }
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部