Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345895
b: refs/heads/master
c: e8d17b0
h: refs/heads/master
i:
  345893: efb8e66
  345891: 440677b
  345887: 736d9db
v: v3
  • Loading branch information
Andreas Gruenbacher authored and Philipp Reisner committed Nov 8, 2012
1 parent 6a6bbbd commit 7d11e36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 927036f9089d9c776217656960b2352971cc2ea0
refs/heads/master: e8d17b015eb8103a4dd5d547baa158c30fa18220
16 changes: 8 additions & 8 deletions trunk/drivers/block/drbd/drbd_receiver.c
Original file line number Diff line number Diff line change
Expand Up @@ -4135,25 +4135,25 @@ static int drbd_send_handshake(struct drbd_tconn *tconn)
{
/* ASSERT current == mdev->tconn->receiver ... */
struct p_handshake *p = &tconn->data.sbuf.handshake;
int ok;
int err;

if (mutex_lock_interruptible(&tconn->data.mutex)) {
conn_err(tconn, "interrupted during initial handshake\n");
return 0; /* interrupted. not ok. */
return -EINTR;
}

if (tconn->data.socket == NULL) {
mutex_unlock(&tconn->data.mutex);
return 0;
return -EIO;
}

memset(p, 0, sizeof(*p));
p->protocol_min = cpu_to_be32(PRO_VERSION_MIN);
p->protocol_max = cpu_to_be32(PRO_VERSION_MAX);
ok = !_conn_send_cmd(tconn, 0, tconn->data.socket, P_HAND_SHAKE,
err = _conn_send_cmd(tconn, 0, tconn->data.socket, P_HAND_SHAKE,
&p->head, sizeof(*p), 0);
mutex_unlock(&tconn->data.mutex);
return ok;
return err;
}

/*
Expand All @@ -4169,10 +4169,10 @@ static int drbd_do_handshake(struct drbd_tconn *tconn)
struct p_handshake *p = &tconn->data.rbuf.handshake;
const int expect = sizeof(struct p_handshake) - sizeof(struct p_header80);
struct packet_info pi;
int rv;
int err, rv;

rv = drbd_send_handshake(tconn);
if (!rv)
err = drbd_send_handshake(tconn);
if (err)
return 0;

rv = drbd_recv_header(tconn, &pi);
Expand Down

0 comments on commit 7d11e36

Please sign in to comment.