drbd: Remove useless error messages
authorAndreas Gruenbacher <agruen@linbit.com>
Thu, 24 Mar 2011 23:35:45 +0000 (00:35 +0100)
committerPhilipp Reisner <philipp.reisner@linbit.com>
Thu, 8 Nov 2012 15:44:55 +0000 (16:44 +0100)
These messages can only trigger in case there is a pretty obvious
internal programming error.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
drivers/block/drbd/drbd_receiver.c

index c6638c4b062c3b2e0325648b74d8c33d1091f169..edad6acb1d3c69c9ab41e59f4f54cbcf15f8c1bd 100644 (file)
@@ -2180,8 +2180,7 @@ static int receive_DataRequest(struct drbd_conf *mdev, enum drbd_packet cmd,
                        drbd_send_ack_ex(mdev, P_OV_RESULT, sector, size, ID_IN_SYNC);
                        break;
                default:
-                       dev_err(DEV, "unexpected command (%s) in receive_DataRequest\n",
-                               cmdname(cmd));
+                       BUG();
                }
                if (verb && __ratelimit(&drbd_ratelimit_state))
                        dev_err(DEV, "Can not satisfy peer's read request, "
@@ -2267,10 +2266,7 @@ static int receive_DataRequest(struct drbd_conf *mdev, enum drbd_packet cmd,
                break;
 
        default:
-               dev_err(DEV, "unexpected command (%s) in receive_DataRequest\n",
-                   cmdname(cmd));
-               fault_type = DRBD_FAULT_MAX;
-               goto out_free_e;
+               BUG();
        }
 
        /* Throttle, drbd_rs_begin_io and submit should become asynchronous