|
@@ -32,6 +32,7 @@
|
|
|
*/
|
|
|
#include <linux/kernel.h>
|
|
|
#include <linux/slab.h>
|
|
|
+#include <linux/ratelimit.h>
|
|
|
|
|
|
#include "rds.h"
|
|
|
#include "iw.h"
|
|
@@ -729,8 +730,8 @@ static int rds_iw_rdma_build_fastreg(struct rds_iw_mapping *mapping)
|
|
|
failed_wr = &f_wr;
|
|
|
ret = ib_post_send(ibmr->cm_id->qp, &f_wr, &failed_wr);
|
|
|
BUG_ON(failed_wr != &f_wr);
|
|
|
- if (ret && printk_ratelimit())
|
|
|
- printk(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n",
|
|
|
+ if (ret)
|
|
|
+ printk_ratelimited(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n",
|
|
|
__func__, __LINE__, ret);
|
|
|
return ret;
|
|
|
}
|
|
@@ -751,8 +752,8 @@ static int rds_iw_rdma_fastreg_inv(struct rds_iw_mr *ibmr)
|
|
|
|
|
|
failed_wr = &s_wr;
|
|
|
ret = ib_post_send(ibmr->cm_id->qp, &s_wr, &failed_wr);
|
|
|
- if (ret && printk_ratelimit()) {
|
|
|
- printk(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n",
|
|
|
+ if (ret) {
|
|
|
+ printk_ratelimited(KERN_WARNING "RDS/IW: %s:%d ib_post_send returned %d\n",
|
|
|
__func__, __LINE__, ret);
|
|
|
goto out;
|
|
|
}
|