]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
sdp: remove the relation between qp_active and sdp_free_fmr()
authorEldad Zinger <eldadz@mellanox.co.il>
Sun, 1 Aug 2010 15:08:11 +0000 (18:08 +0300)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 6 Oct 2015 12:05:15 +0000 (05:05 -0700)
This will fix the warning message from ib_destroy_fmr_pool().

Signed-off-by: Eldad Zinger <eldadz@mellanox.co.il>
drivers/infiniband/ulp/sdp/sdp_zcopy.c

index 0804cc273942886ce7dbfc9d8a807373b86ec1d1..6608d34a649b1df3cbaf81b430c3a4a94b1cdfb2 100644 (file)
@@ -515,17 +515,15 @@ err_umem_get:
 
 void sdp_free_fmr(struct sock *sk, struct ib_pool_fmr **_fmr, struct ib_umem **_umem)
 {
-       if (!sdp_sk(sk)->qp_active) {
-               sdp_warn(sk, "Trying to free fmr after destroying QP! fmr: %p\n",
-                               *_fmr);
-               return;
+       if (*_fmr) {
+               ib_fmr_pool_unmap(*_fmr);
+               *_fmr = NULL;
        }
 
-       ib_fmr_pool_unmap(*_fmr);
-       *_fmr = NULL;
-
-       ib_umem_release(*_umem);
-       *_umem = NULL;
+       if (*_umem) {
+               ib_umem_release(*_umem);
+               *_umem = NULL;
+       }
 }
 
 static int sdp_post_rdma_read(struct sock *sk, struct rx_srcavail_state *rx_sa,