Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Bang Nguyen <bang.nguyen@oracle.com>
struct scatterlist *sg;
int ret = 0;
LIST_HEAD(to_be_dropped);
+ int same_rm = 0;
restart:
rm = conn->c_xmit_rm;
+ if (!rm) {
+ same_rm = 0;
+ } else {
+ same_rm++;
+ if ((same_rm >= 4096) && printk_ratelimit()) {
+ printk(KERN_ERR "RDS: Stuck rm\n");
+ cond_resched();
+ ret = -EAGAIN;
+ break;
+ }
+ }
+
/*
* If between sending messages, we can send a pending congestion
* map update.