bnx2x, tg3: Replace put_page(virt_to_head_page()) with skb_free_frag()
authorAlexander Duyck <alexander.h.duyck@redhat.com>
Thu, 7 May 2015 04:12:31 +0000 (21:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 May 2015 14:39:27 +0000 (10:39 -0400)
Signed-off-by: Alexander Duyck <alexander.h.duyck@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
drivers/net/ethernet/broadcom/tg3.c

index a8bb8f664d3d7f9a031158d5cac82820fbed7d6d..b10d1744e5ae1c8872855abfa9cf4a113d5d1cb9 100644 (file)
@@ -662,7 +662,7 @@ static int bnx2x_fill_frag_skb(struct bnx2x *bp, struct bnx2x_fastpath *fp,
 static void bnx2x_frag_free(const struct bnx2x_fastpath *fp, void *data)
 {
        if (fp->rx_frag_size)
-               put_page(virt_to_head_page(data));
+               skb_free_frag(data);
        else
                kfree(data);
 }
index 069952fa5d644b62b7d1a04fdb8b615a4ed3d69a..73c934cf6c61c28dc43f8d7e20a7f718a1067236 100644 (file)
@@ -6618,7 +6618,7 @@ static void tg3_tx(struct tg3_napi *tnapi)
 static void tg3_frag_free(bool is_frag, void *data)
 {
        if (is_frag)
-               put_page(virt_to_head_page(data));
+               skb_free_frag(data);
        else
                kfree(data);
 }