From patchwork Sat Oct 2 05:17:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: stephen hemminger X-Patchwork-Id: 66555 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 4BC7FB70CC for ; Sat, 2 Oct 2010 15:17:48 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751304Ab0JBFRl (ORCPT ); Sat, 2 Oct 2010 01:17:41 -0400 Received: from mail.vyatta.com ([76.74.103.46]:37218 "EHLO mail.vyatta.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751265Ab0JBFRk (ORCPT ); Sat, 2 Oct 2010 01:17:40 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.vyatta.com (Postfix) with ESMTP id 5CEE2182901B; Fri, 1 Oct 2010 22:11:02 -0700 (PDT) X-Virus-Scanned: amavisd-new at tahiti.vyatta.com Received: from mail.vyatta.com ([127.0.0.1]) by localhost (mail.vyatta.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Myrdz289p6-8; Fri, 1 Oct 2010 22:11:01 -0700 (PDT) Received: from s6510 (pl361.nas933.p-nagano.nttpc.ne.jp [111.89.117.105]) by mail.vyatta.com (Postfix) with ESMTPSA id E415C1828E88; Fri, 1 Oct 2010 22:11:00 -0700 (PDT) Date: Sat, 2 Oct 2010 14:17:36 +0900 From: Stephen Hemminger To: Patrick McHardy , David Miller Cc: netfilter-devel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH net-next] nf_nat: make find/put static Message-ID: <20101002141736.0a31bcd7@s6510> Organization: Vyatta X-Mailer: Claws Mail 3.7.5 (GTK+ 2.20.1; i486-pc-linux-gnu) Mime-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The functions nf_nat_proto_find_get and nf_nat_proto_put are only used internally in nf_nat_core. This might break some out of tree NAT module. Signed-off-by: Stephen Hemminger --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/include/net/netfilter/nf_nat_protocol.h 2010-10-02 09:01:09.153396885 +0900 +++ b/include/net/netfilter/nf_nat_protocol.h 2010-10-02 09:01:55.340910304 +0900 @@ -45,9 +45,6 @@ struct nf_nat_protocol { extern int nf_nat_protocol_register(const struct nf_nat_protocol *proto); extern void nf_nat_protocol_unregister(const struct nf_nat_protocol *proto); -extern const struct nf_nat_protocol *nf_nat_proto_find_get(u_int8_t protocol); -extern void nf_nat_proto_put(const struct nf_nat_protocol *proto); - /* Built-in protocols. */ extern const struct nf_nat_protocol nf_nat_protocol_tcp; extern const struct nf_nat_protocol nf_nat_protocol_udp; --- a/net/ipv4/netfilter/nf_nat_core.c 2010-10-02 09:01:09.183396507 +0900 +++ b/net/ipv4/netfilter/nf_nat_core.c 2010-10-02 09:01:55.340910304 +0900 @@ -47,7 +47,7 @@ __nf_nat_proto_find(u_int8_t protonum) return rcu_dereference(nf_nat_protos[protonum]); } -const struct nf_nat_protocol * +static const struct nf_nat_protocol * nf_nat_proto_find_get(u_int8_t protonum) { const struct nf_nat_protocol *p; @@ -60,14 +60,12 @@ nf_nat_proto_find_get(u_int8_t protonum) return p; } -EXPORT_SYMBOL_GPL(nf_nat_proto_find_get); -void +static void nf_nat_proto_put(const struct nf_nat_protocol *p) { module_put(p->me); } -EXPORT_SYMBOL_GPL(nf_nat_proto_put); /* We keep an extra hash for each conntrack, for fast searching. */ static inline unsigned int