diff options
author | Jason Gunthorpe <jgunthorpe@obsidianresearch.com> | 2015-08-05 14:34:31 -0600 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-08-30 18:12:39 -0400 |
commit | 7dd78647a2c2c224e376fc72797d411a3a0bb047 (patch) | |
tree | e2db1758b801c9953686bcf6933f681a643ce7aa /net | |
parent | 03f6fb93fde24f01a940283bdf55024e576ee87d (diff) | |
download | op-kernel-dev-7dd78647a2c2c224e376fc72797d411a3a0bb047.zip op-kernel-dev-7dd78647a2c2c224e376fc72797d411a3a0bb047.tar.gz |
IB/core: Make ib_dealloc_pd return void
The majority of callers never check the return value, and even if they
did, they can't do anything about a failure.
All possible failure cases represent a bug in the caller, so just
WARN_ON inside the function instead.
This fixes a few random errors:
net/rd/iw.c infinite loops while it fails. (racing with EBUSY?)
This also lays the ground work to get rid of error return from the
drivers. Most drivers do not error, the few that do are broken since
it cannot be handled.
Since uverbs can legitimately make use of EBUSY, open code the
check.
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/rds/iw.c | 5 | ||||
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 2 |
2 files changed, 2 insertions, 5 deletions
diff --git a/net/rds/iw.c b/net/rds/iw.c index 7cc2f32..c7dcddb 100644 --- a/net/rds/iw.c +++ b/net/rds/iw.c @@ -148,10 +148,7 @@ static void rds_iw_remove_one(struct ib_device *device, void *client_data) if (rds_iwdev->mr) ib_dereg_mr(rds_iwdev->mr); - while (ib_dealloc_pd(rds_iwdev->pd)) { - rdsdebug("Failed to dealloc pd %p\n", rds_iwdev->pd); - msleep(1); - } + ib_dealloc_pd(rds_iwdev->pd); list_del(&rds_iwdev->list); kfree(rds_iwdev); diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 891c4ed..afd5043 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c @@ -624,7 +624,7 @@ rpcrdma_ia_close(struct rpcrdma_ia *ia) /* If the pd is still busy, xprtrdma missed freeing a resource */ if (ia->ri_pd && !IS_ERR(ia->ri_pd)) - WARN_ON(ib_dealloc_pd(ia->ri_pd)); + ib_dealloc_pd(ia->ri_pd); } /* |