]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
IB/rxe: replace refcount_inc with skb_get
authorZhu Yanjun <yanjun.zhu@oracle.com>
Tue, 10 Apr 2018 13:37:39 +0000 (09:37 -0400)
committerDoug Ledford <dledford@redhat.com>
Thu, 19 Apr 2018 17:58:16 +0000 (13:58 -0400)
Follow the advice from Bart, the function refcount_inc is replaced
with skb_get in commit 99dae690255e ("IB/rxe: optimize mcast recv process")
and commit 86af61764151 ("IB/rxe: remove unnecessary skb_clone").

CC: Srinivas Eeda <srinivas.eeda@oracle.com>
CC: Junxiao Bi <junxiao.bi@oracle.com>
Suggested-by: Bart Van Assche <Bart.VanAssche@wdc.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_recv.c
drivers/infiniband/sw/rxe/rxe_resp.c

index dd80c7d9074ad3e1bf14700a59eb3d1465121253..c4c9f3be33d92fcd823fe4269b86db2bcd3f1985 100644 (file)
@@ -311,7 +311,7 @@ static void rxe_rcv_mcast_pkt(struct rxe_dev *rxe, struct sk_buff *skb)
                 * increase the users of the skb then post to the next qp
                 */
                if (mce->qp_list.next != &mcg->qp_list)
-                       refcount_inc(&skb->users);
+                       skb_get(skb);
 
                pkt->qp = qp;
                rxe_add_ref(qp);
index c4172edf1f074f4196ea2fada3abab6e867dab09..ed402f028471174a8d6d5d1926ebad8f5e4e4373 100644 (file)
@@ -990,7 +990,7 @@ static int send_atomic_ack(struct rxe_qp *qp, struct rxe_pkt_info *pkt,
        memset((unsigned char *)SKB_TO_PKT(skb) + sizeof(ack_pkt), 0,
               sizeof(skb->cb) - sizeof(ack_pkt));
 
-       refcount_inc(&skb->users);
+       skb_get(skb);
        res->type = RXE_ATOMIC_MASK;
        res->atomic.skb = skb;
        res->first_psn = ack_pkt.psn;