[Drbd-dev] [PATCH 21/21] drbd: replace if/BUG by BUG_ON
Fabian Frederick
fabf at skynet.be
Fri Nov 27 22:30:36 CET 2015
Signed-off-by: Fabian Frederick <fabf at skynet.be>
---
drivers/block/drbd/drbd_state.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/block/drbd/drbd_state.c b/drivers/block/drbd/drbd_state.c
index a7631a3..5f16a11 100644
--- a/drivers/block/drbd/drbd_state.c
+++ b/drivers/block/drbd/drbd_state.c
@@ -2150,9 +2150,7 @@ conn_set_state(struct drbd_connection *connection, union drbd_state mask, union
ns.disk = os.disk;
rv = _drbd_set_state(device, ns, flags, NULL);
- if (rv < SS_SUCCESS)
- BUG();
-
+ BUG_ON(rv < SS_SUCCESS);
ns.i = device->state.i;
ns_max.role = max_role(ns.role, ns_max.role);
ns_max.peer = max_role(ns.peer, ns_max.peer);
--
2.1.4
More information about the drbd-dev
mailing list