diff options
author | James Chapman <jchapman@katalix.com> | 2010-04-02 02:19:05 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-03 17:56:05 -0400 |
commit | f408e0ce40270559ef80f231843c93baa9947bc5 (patch) | |
tree | 0a71cda13657bd3c058ed110714f4ac829a50ad2 /net/netlink/genetlink.c | |
parent | 0d76751fad7739014485ba5bd388d4f1b4fd4143 (diff) |
netlink: Export genl_lock() API for use by modules
This lets kernel modules which use genl netlink APIs serialize netlink
processing.
Signed-off-by: James Chapman <jchapman@katalix.com>
Reviewed-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink/genetlink.c')
-rw-r--r-- | net/netlink/genetlink.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c index a4b6e148c5de..a28fda7420d9 100644 --- a/net/netlink/genetlink.c +++ b/net/netlink/genetlink.c | |||
@@ -20,15 +20,17 @@ | |||
20 | 20 | ||
21 | static DEFINE_MUTEX(genl_mutex); /* serialization of message processing */ | 21 | static DEFINE_MUTEX(genl_mutex); /* serialization of message processing */ |
22 | 22 | ||
23 | static inline void genl_lock(void) | 23 | void genl_lock(void) |
24 | { | 24 | { |
25 | mutex_lock(&genl_mutex); | 25 | mutex_lock(&genl_mutex); |
26 | } | 26 | } |
27 | EXPORT_SYMBOL(genl_lock); | ||
27 | 28 | ||
28 | static inline void genl_unlock(void) | 29 | void genl_unlock(void) |
29 | { | 30 | { |
30 | mutex_unlock(&genl_mutex); | 31 | mutex_unlock(&genl_mutex); |
31 | } | 32 | } |
33 | EXPORT_SYMBOL(genl_unlock); | ||
32 | 34 | ||
33 | #define GENL_FAM_TAB_SIZE 16 | 35 | #define GENL_FAM_TAB_SIZE 16 |
34 | #define GENL_FAM_TAB_MASK (GENL_FAM_TAB_SIZE - 1) | 36 | #define GENL_FAM_TAB_MASK (GENL_FAM_TAB_SIZE - 1) |