diff options
author | Andy Grover <andy.grover@oracle.com> | 2010-03-11 08:49:55 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-17 00:16:53 -0400 |
commit | 735f61e62611161588123930823af6e6a9fd5c2c (patch) | |
tree | d07e16026909daa692ddab9c7b0801cc418cb3bc /net | |
parent | 87faf3ccf1c939938600ab57c6c9ed5bd2e5f4cc (diff) |
RDS: Do not BUG() on error returned from ib_post_send
BUGging on a runtime error code should be avoided. This
patch also eliminates all other BUG()s that have no real
reason to exist.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/rds/ib_recv.c | 4 | ||||
-rw-r--r-- | net/rds/ib_send.c | 7 | ||||
-rw-r--r-- | net/rds/iw_recv.c | 4 | ||||
-rw-r--r-- | net/rds/iw_send.c | 3 | ||||
-rw-r--r-- | net/rds/rdma_transport.c | 3 |
5 files changed, 9 insertions, 12 deletions
diff --git a/net/rds/ib_recv.c b/net/rds/ib_recv.c index 04dc0d3f3c95..c338881eca71 100644 --- a/net/rds/ib_recv.c +++ b/net/rds/ib_recv.c | |||
@@ -468,8 +468,8 @@ static void rds_ib_send_ack(struct rds_ib_connection *ic, unsigned int adv_credi | |||
468 | set_bit(IB_ACK_REQUESTED, &ic->i_ack_flags); | 468 | set_bit(IB_ACK_REQUESTED, &ic->i_ack_flags); |
469 | 469 | ||
470 | rds_ib_stats_inc(s_ib_ack_send_failure); | 470 | rds_ib_stats_inc(s_ib_ack_send_failure); |
471 | /* Need to finesse this later. */ | 471 | |
472 | BUG(); | 472 | rds_ib_conn_error(ic->conn, "sending ack failed\n"); |
473 | } else | 473 | } else |
474 | rds_ib_stats_inc(s_ib_ack_sent); | 474 | rds_ib_stats_inc(s_ib_ack_sent); |
475 | } | 475 | } |
diff --git a/net/rds/ib_send.c b/net/rds/ib_send.c index a10fab6886d1..f380c3f01256 100644 --- a/net/rds/ib_send.c +++ b/net/rds/ib_send.c | |||
@@ -574,8 +574,7 @@ int rds_ib_xmit(struct rds_connection *conn, struct rds_message *rm, | |||
574 | rds_ib_send_grab_credits(ic, 0, &posted, 1, RDS_MAX_ADV_CREDIT - adv_credits); | 574 | rds_ib_send_grab_credits(ic, 0, &posted, 1, RDS_MAX_ADV_CREDIT - adv_credits); |
575 | adv_credits += posted; | 575 | adv_credits += posted; |
576 | BUG_ON(adv_credits > 255); | 576 | BUG_ON(adv_credits > 255); |
577 | } else if (ic->i_rm != rm) | 577 | } |
578 | BUG(); | ||
579 | 578 | ||
580 | send = &ic->i_sends[pos]; | 579 | send = &ic->i_sends[pos]; |
581 | first = send; | 580 | first = send; |
@@ -714,8 +713,8 @@ add_header: | |||
714 | ic->i_rm = prev->s_rm; | 713 | ic->i_rm = prev->s_rm; |
715 | prev->s_rm = NULL; | 714 | prev->s_rm = NULL; |
716 | } | 715 | } |
717 | /* Finesse this later */ | 716 | |
718 | BUG(); | 717 | rds_ib_conn_error(ic->conn, "ib_post_send failed\n"); |
719 | goto out; | 718 | goto out; |
720 | } | 719 | } |
721 | 720 | ||
diff --git a/net/rds/iw_recv.c b/net/rds/iw_recv.c index 54af7d6b92da..337e4e5025e2 100644 --- a/net/rds/iw_recv.c +++ b/net/rds/iw_recv.c | |||
@@ -468,8 +468,8 @@ static void rds_iw_send_ack(struct rds_iw_connection *ic, unsigned int adv_credi | |||
468 | set_bit(IB_ACK_REQUESTED, &ic->i_ack_flags); | 468 | set_bit(IB_ACK_REQUESTED, &ic->i_ack_flags); |
469 | 469 | ||
470 | rds_iw_stats_inc(s_iw_ack_send_failure); | 470 | rds_iw_stats_inc(s_iw_ack_send_failure); |
471 | /* Need to finesse this later. */ | 471 | |
472 | BUG(); | 472 | rds_iw_conn_error(ic->conn, "sending ack failed\n"); |
473 | } else | 473 | } else |
474 | rds_iw_stats_inc(s_iw_ack_sent); | 474 | rds_iw_stats_inc(s_iw_ack_sent); |
475 | } | 475 | } |
diff --git a/net/rds/iw_send.c b/net/rds/iw_send.c index 1379e9d66a78..52182ff7519e 100644 --- a/net/rds/iw_send.c +++ b/net/rds/iw_send.c | |||
@@ -616,8 +616,7 @@ int rds_iw_xmit(struct rds_connection *conn, struct rds_message *rm, | |||
616 | rds_iw_send_grab_credits(ic, 0, &posted, 1, RDS_MAX_ADV_CREDIT - adv_credits); | 616 | rds_iw_send_grab_credits(ic, 0, &posted, 1, RDS_MAX_ADV_CREDIT - adv_credits); |
617 | adv_credits += posted; | 617 | adv_credits += posted; |
618 | BUG_ON(adv_credits > 255); | 618 | BUG_ON(adv_credits > 255); |
619 | } else if (ic->i_rm != rm) | 619 | } |
620 | BUG(); | ||
621 | 620 | ||
622 | send = &ic->i_sends[pos]; | 621 | send = &ic->i_sends[pos]; |
623 | first = send; | 622 | first = send; |
diff --git a/net/rds/rdma_transport.c b/net/rds/rdma_transport.c index 9ece910ea394..31f9c72b8d76 100644 --- a/net/rds/rdma_transport.c +++ b/net/rds/rdma_transport.c | |||
@@ -109,8 +109,7 @@ int rds_rdma_cm_event_handler(struct rdma_cm_id *cm_id, | |||
109 | 109 | ||
110 | default: | 110 | default: |
111 | /* things like device disconnect? */ | 111 | /* things like device disconnect? */ |
112 | printk(KERN_ERR "unknown event %u\n", event->event); | 112 | printk(KERN_ERR "RDS: unknown event %u!\n", event->event); |
113 | BUG(); | ||
114 | break; | 113 | break; |
115 | } | 114 | } |
116 | 115 | ||