summaryrefslogtreecommitdiffstats
path: root/include/rdma/rdmavt_mr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/rdma/rdmavt_mr.h')
-rw-r--r--include/rdma/rdmavt_mr.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/rdma/rdmavt_mr.h b/include/rdma/rdmavt_mr.h
index ea60476c6b6b..4aa81713b4f3 100644
--- a/include/rdma/rdmavt_mr.h
+++ b/include/rdma/rdmavt_mr.h
@@ -127,4 +127,13 @@ static inline void rvt_get_mr(struct rvt_mregion *mr)
atomic_inc(&mr->refcount);
}
+static inline void rvt_put_ss(struct rvt_sge_state *ss)
+{
+ while (ss->num_sge) {
+ rvt_put_mr(ss->sge.mr);
+ if (--ss->num_sge)
+ ss->sge = *ss->sg_list++;
+ }
+}
+
#endif /* DEF_RDMAVT_INCMRH */