diff options
author | Gerd Rausch <gerd.rausch@oracle.com> | 2019-07-17 00:29:07 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-07-17 21:06:52 +0200 |
commit | aea01a2234d26ffa9d9ee01e43705824c0c7b08a (patch) | |
tree | 9207a91ee47ffe0f34d883d55a49f12e71af4361 /net/rds/ib_rdma.c | |
parent | net/rds: Wait for the FRMR_IS_FREE (or FRMR_IS_STALE) transition after postin... (diff) | |
download | linux-aea01a2234d26ffa9d9ee01e43705824c0c7b08a.tar.xz linux-aea01a2234d26ffa9d9ee01e43705824c0c7b08a.zip |
net/rds: Fix NULL/ERR_PTR inconsistency
Make function "rds_ib_try_reuse_ibmr" return NULL in case
memory region could not be allocated, since callers
simply check if the return value is not NULL.
Signed-off-by: Gerd Rausch <gerd.rausch@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r-- | net/rds/ib_rdma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rds/ib_rdma.c b/net/rds/ib_rdma.c index 6b047e63a769..c8c1e3ae8d84 100644 --- a/net/rds/ib_rdma.c +++ b/net/rds/ib_rdma.c @@ -450,7 +450,7 @@ struct rds_ib_mr *rds_ib_try_reuse_ibmr(struct rds_ib_mr_pool *pool) rds_ib_stats_inc(s_ib_rdma_mr_8k_pool_depleted); else rds_ib_stats_inc(s_ib_rdma_mr_1m_pool_depleted); - return ERR_PTR(-EAGAIN); + break; } /* We do have some empty MRs. Flush them out. */ @@ -464,7 +464,7 @@ struct rds_ib_mr *rds_ib_try_reuse_ibmr(struct rds_ib_mr_pool *pool) return ibmr; } - return ibmr; + return NULL; } static void rds_ib_mr_pool_flush_worker(struct work_struct *work) |