xprtrdma: Free the pd if ib_query_qp() fails
authorChuck Lever <chuck.lever@oracle.com>
Wed, 21 Jan 2015 16:03:19 +0000 (11:03 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 30 Jan 2015 15:47:48 +0000 (10:47 -0500)
commit5ae711a24601257f395c1f8746ac95be0cbd75e5
treeb1e3c4d6d07f1c175247e66a20278ad831af8813
parentafadc468eb309b7c48ffdc8fa4c72acbb9991613
xprtrdma: Free the pd if ib_query_qp() fails

If ib_query_qp() fails or the memory registration mode isn't
supported, don't leak the PD. An orphaned IB/core resource will
cause IB module removal to hang.

Fixes: bd7ed1d13304 ("RPC/RDMA: check selected memory registration ...")
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/verbs.c