From patchwork Mon Jan 20 11:27:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: wangweidong X-Patchwork-Id: 312506 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 302822C0090 for ; Mon, 20 Jan 2014 22:28:01 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751752AbaATL15 (ORCPT ); Mon, 20 Jan 2014 06:27:57 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:29311 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750917AbaATL1z (ORCPT ); Mon, 20 Jan 2014 06:27:55 -0500 Received: from 172.24.2.119 (EHLO szxeml212-edg.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id AJN04643; Mon, 20 Jan 2014 19:27:34 +0800 (CST) Received: from SZXEML404-HUB.china.huawei.com (10.82.67.59) by szxeml212-edg.china.huawei.com (172.24.2.181) with Microsoft SMTP Server (TLS) id 14.3.158.1; Mon, 20 Jan 2014 19:27:32 +0800 Received: from localhost (10.177.18.75) by szxeml404-hub.china.huawei.com (10.82.67.59) with Microsoft SMTP Server id 14.3.158.1; Mon, 20 Jan 2014 19:27:30 +0800 From: Wang Weidong To: , , CC: , , Subject: [PATCH net-next 1/2] sctp: use sctp_local_bh_{disable|enable} instead local_bh_{disable|enable} Date: Mon, 20 Jan 2014 19:27:26 +0800 Message-ID: <1390217247-9408-2-git-send-email-wangweidong1@huawei.com> X-Mailer: git-send-email 1.8.1.msysgit.1 In-Reply-To: <1390217247-9408-1-git-send-email-wangweidong1@huawei.com> References: <1390217247-9408-1-git-send-email-wangweidong1@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.18.75] X-CFilter-Loop: Reflected Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org While we have the macros sctp_local_bh_{disable|enable}, so use them. Signed-off-by: Wang Weidong --- net/sctp/sm_make_chunk.c | 8 ++++---- net/sctp/socket.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index 632090b..1bbac08 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c @@ -3266,12 +3266,12 @@ static void sctp_asconf_param_success(struct sctp_association *asoc, /* This is always done in BH context with a socket lock * held, so the list can not change. */ - local_bh_disable(); + sctp_local_bh_disable(); list_for_each_entry(saddr, &bp->address_list, list) { if (sctp_cmp_addr_exact(&saddr->a, &addr)) saddr->state = SCTP_ADDR_SRC; } - local_bh_enable(); + sctp_local_bh_enable(); list_for_each_entry(transport, &asoc->peer.transport_addr_list, transports) { dst_release(transport->dst); @@ -3279,14 +3279,14 @@ static void sctp_asconf_param_success(struct sctp_association *asoc, } break; case SCTP_PARAM_DEL_IP: - local_bh_disable(); + sctp_local_bh_disable(); sctp_del_bind_addr(bp, &addr); if (asoc->asconf_addr_del_pending != NULL && sctp_cmp_addr_exact(asoc->asconf_addr_del_pending, &addr)) { kfree(asoc->asconf_addr_del_pending); asoc->asconf_addr_del_pending = NULL; } - local_bh_enable(); + sctp_local_bh_enable(); list_for_each_entry(transport, &asoc->peer.transport_addr_list, transports) { dst_release(transport->dst); diff --git a/net/sctp/socket.c b/net/sctp/socket.c index fd7337a..f73918c 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -3985,7 +3985,7 @@ static int sctp_init_sock(struct sock *sk) SCTP_DBG_OBJCNT_INC(sock); - local_bh_disable(); + sctp_local_bh_disable(); percpu_counter_inc(&sctp_sockets_allocated); sock_prot_inuse_add(net, sk->sk_prot, 1); if (net->sctp.default_auto_asconf) { @@ -3994,7 +3994,7 @@ static int sctp_init_sock(struct sock *sk) sp->do_auto_asconf = 1; } else sp->do_auto_asconf = 0; - local_bh_enable(); + sctp_local_bh_enable(); return 0; } @@ -4019,10 +4019,10 @@ static void sctp_destroy_sock(struct sock *sk) list_del(&sp->auto_asconf_list); } sctp_endpoint_free(sp->ep); - local_bh_disable(); + sctp_local_bh_disable(); percpu_counter_dec(&sctp_sockets_allocated); sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1); - local_bh_enable(); + sctp_local_bh_enable(); } /* Triggered when there are no references on the socket anymore */