From: Geliang Tang Date: Tue, 20 Dec 2016 14:02:18 +0000 (+0800) Subject: RDS: use rb_entry() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a763f78cea845c91b8d91f93dabf70c407635dc5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git RDS: use rb_entry() To make the code clearer, use rb_entry() instead of container_of() to deal with rbtree. Signed-off-by: Geliang Tang Reviewed-by: Leon Romanovsky Acked-by: Santosh Shilimkar Signed-off-by: David S. Miller --- diff --git a/net/rds/rdma.c b/net/rds/rdma.c index 4c93badeabf2..ea961144084f 100644 --- 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);