Commit 26139dc1 authored by Santosh Shilimkar's avatar Santosh Shilimkar

RDS: IB: use already available pool handle from ibmr

rds_ib_mr already keeps the pool handle which it associates
with. Lets use that instead of round about way of fetching
it from rds_ib_device.

No functional change.
Signed-off-by: default avatarSantosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@oracle.com>
parent 2e1d6b81
...@@ -522,8 +522,7 @@ static void rds_ib_teardown_mr(struct rds_ib_mr *ibmr) ...@@ -522,8 +522,7 @@ static void rds_ib_teardown_mr(struct rds_ib_mr *ibmr)
__rds_ib_teardown_mr(ibmr); __rds_ib_teardown_mr(ibmr);
if (pinned) { if (pinned) {
struct rds_ib_device *rds_ibdev = ibmr->device; struct rds_ib_mr_pool *pool = ibmr->pool;
struct rds_ib_mr_pool *pool = rds_ibdev->mr_pool;
atomic_sub(pinned, &pool->free_pinned); atomic_sub(pinned, &pool->free_pinned);
} }
...@@ -717,8 +716,8 @@ static void rds_ib_mr_pool_flush_worker(struct work_struct *work) ...@@ -717,8 +716,8 @@ static void rds_ib_mr_pool_flush_worker(struct work_struct *work)
void rds_ib_free_mr(void *trans_private, int invalidate) void rds_ib_free_mr(void *trans_private, int invalidate)
{ {
struct rds_ib_mr *ibmr = trans_private; struct rds_ib_mr *ibmr = trans_private;
struct rds_ib_mr_pool *pool = ibmr->pool;
struct rds_ib_device *rds_ibdev = ibmr->device; struct rds_ib_device *rds_ibdev = ibmr->device;
struct rds_ib_mr_pool *pool = rds_ibdev->mr_pool;
rdsdebug("RDS/IB: free_mr nents %u\n", ibmr->sg_len); rdsdebug("RDS/IB: free_mr nents %u\n", ibmr->sg_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment