aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2012-08-08 15:19:09 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-09 08:08:19 -0500
commit155522df5b8ac24ee66a903e51d5b3023b2a76f9 (patch)
tree65df69345129f3ce142507f7bfa7667ea4bbb2c0 /drivers
parentb66623e33efbbf55717df7bfc49882371118b866 (diff)
drbd: Remove dead code
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/drbd/drbd_receiver.c36
1 files changed, 7 insertions, 29 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 1a8f698021a2..4ba530cf810f 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -504,37 +504,15 @@ static int drbd_recv(struct drbd_tconn *tconn, void *buf, size_t size)
504 504
505 oldfs = get_fs(); 505 oldfs = get_fs();
506 set_fs(KERNEL_DS); 506 set_fs(KERNEL_DS);
507 507 rv = sock_recvmsg(tconn->data.socket, &msg, size, msg.msg_flags);
508 for (;;) {
509 rv = sock_recvmsg(tconn->data.socket, &msg, size, msg.msg_flags);
510 if (rv == size)
511 break;
512
513 /* Note:
514 * ECONNRESET other side closed the connection
515 * ERESTARTSYS (on sock) we got a signal
516 */
517
518 if (rv < 0) {
519 if (rv == -ECONNRESET)
520 conn_info(tconn, "sock was reset by peer\n");
521 else if (rv != -ERESTARTSYS)
522 conn_err(tconn, "sock_recvmsg returned %d\n", rv);
523 break;
524 } else if (rv == 0) {
525 break;
526 } else {
527 /* signal came in, or peer/link went down,
528 * after we read a partial message
529 */
530 /* D_ASSERT(signal_pending(current)); */
531 break;
532 }
533 };
534
535 set_fs(oldfs); 508 set_fs(oldfs);
536 509
537 if (rv == 0) { 510 if (rv < 0) {
511 if (rv == -ECONNRESET)
512 conn_info(tconn, "sock was reset by peer\n");
513 else if (rv != -ERESTARTSYS)
514 conn_err(tconn, "sock_recvmsg returned %d\n", rv);
515 } else if (rv == 0) {
538 if (test_bit(DISCONNECT_SENT, &tconn->flags)) { 516 if (test_bit(DISCONNECT_SENT, &tconn->flags)) {
539 long t; 517 long t;
540 rcu_read_lock(); 518 rcu_read_lock();