projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f7cd56
)
RDS: use rb_entry()
author
Geliang Tang
<
[email protected]
>
Tue, 20 Dec 2016 14:02:18 +0000
(22:02 +0800)
committer
David S. Miller
<
[email protected]
>
Tue, 20 Dec 2016 19:22:49 +0000
(14:22 -0500)
To make the code clearer, use rb_entry() instead of container_of() to
deal with rbtree.
Signed-off-by: Geliang Tang <
[email protected]
>
Reviewed-by: Leon Romanovsky <
[email protected]
>
Acked-by: Santosh Shilimkar <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/rds/rdma.c
patch
|
blob
|
history
diff --git
a/net/rds/rdma.c
b/net/rds/rdma.c
index 4c93badeabf2236d3d90c933e6169174b3ba68d1..ea961144084fadb3ee98abd708ce5cd31eba42a5 100644
(file)
--- a/
net/rds/rdma.c
+++ b/
net/rds/rdma.c
@@
-135,7
+135,7
@@
void rds_rdma_drop_keys(struct rds_sock *rs)
/* Release any MRs associated with this socket */
spin_lock_irqsave(&rs->rs_rdma_lock, flags);
while ((node = rb_first(&rs->rs_rdma_keys))) {
- mr =
container_of
(node, struct rds_mr, r_rb_node);
+ mr =
rb_entry
(node, struct rds_mr, r_rb_node);
if (mr->r_trans == rs->rs_transport)
mr->r_invalidate = 0;
rb_erase(&mr->r_rb_node, &rs->rs_rdma_keys);