* [PATCH 2/7] remove nfnl_[lock|unlock] functions
@ 2007-02-12 22:46 Pablo Neira Ayuso
2007-02-13 10:53 ` Patrick McHardy
0 siblings, 1 reply; 2+ messages in thread
From: Pablo Neira Ayuso @ 2007-02-12 22:46 UTC (permalink / raw)
To: Netfilter Development Mailinglist; +Cc: Patrick McHardy
[-- Attachment #1: Type: text/plain, Size: 226 bytes --]
Use nfnl_shlock instead
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
--
The dawn of the fourth age of Linux firewalling is coming; a time of
great struggle and heroic deeds -- J.Kadlecsik got inspired by J.Morris
[-- Attachment #2: 02.patch --]
[-- Type: text/plain, Size: 1766 bytes --]
[PATCH] remove nfnl_[lock|unlock] functions
Use nfnl_shlock instead
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Index: net-2.6.git/net/netfilter/nfnetlink.c
===================================================================
--- net-2.6.git.orig/net/netfilter/nfnetlink.c 2006-12-26 04:32:54.000000000 +0100
+++ net-2.6.git/net/netfilter/nfnetlink.c 2007-01-19 19:34:48.000000000 +0100
@@ -46,34 +46,24 @@ static struct sock *nfnl = NULL;
static struct nfnetlink_subsystem *subsys_table[NFNL_SUBSYS_COUNT];
DECLARE_MUTEX(nfnl_sem);
-void nfnl_lock(void)
-{
- nfnl_shlock();
-}
-
-void nfnl_unlock(void)
-{
- nfnl_shunlock();
-}
-
int nfnetlink_subsys_register(struct nfnetlink_subsystem *n)
{
- nfnl_lock();
+ nfnl_shlock();
if (subsys_table[n->subsys_id]) {
- nfnl_unlock();
+ nfnl_shunlock();
return -EBUSY;
}
subsys_table[n->subsys_id] = n;
- nfnl_unlock();
+ nfnl_shunlock();
return 0;
}
int nfnetlink_subsys_unregister(struct nfnetlink_subsystem *n)
{
- nfnl_lock();
+ nfnl_shlock();
subsys_table[n->subsys_id] = NULL;
- nfnl_unlock();
+ nfnl_shunlock();
return 0;
}
Index: net-2.6.git/include/linux/netfilter/nfnetlink.h
===================================================================
--- net-2.6.git.orig/include/linux/netfilter/nfnetlink.h 2007-01-19 19:34:59.000000000 +0100
+++ net-2.6.git/include/linux/netfilter/nfnetlink.h 2007-01-19 19:35:43.000000000 +0100
@@ -139,9 +139,6 @@ extern struct semaphore nfnl_sem;
nfnl->sk_data_ready(nfnl, 0); \
} while(0)
-extern void nfnl_lock(void);
-extern void nfnl_unlock(void);
-
extern int nfnetlink_subsys_register(struct nfnetlink_subsystem *n);
extern int nfnetlink_subsys_unregister(struct nfnetlink_subsystem *n);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-02-13 10:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-12 22:46 [PATCH 2/7] remove nfnl_[lock|unlock] functions Pablo Neira Ayuso
2007-02-13 10:53 ` Patrick McHardy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).