mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Reviewed-by: Randy Dunlap <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
0d76751fad
commit
f408e0ce40
2 changed files with 12 additions and 2 deletions
|
|
@ -20,15 +20,17 @@
|
|||
|
||||
static DEFINE_MUTEX(genl_mutex); /* serialization of message processing */
|
||||
|
||||
static inline void genl_lock(void)
|
||||
void genl_lock(void)
|
||||
{
|
||||
mutex_lock(&genl_mutex);
|
||||
}
|
||||
EXPORT_SYMBOL(genl_lock);
|
||||
|
||||
static inline void genl_unlock(void)
|
||||
void genl_unlock(void)
|
||||
{
|
||||
mutex_unlock(&genl_mutex);
|
||||
}
|
||||
EXPORT_SYMBOL(genl_unlock);
|
||||
|
||||
#define GENL_FAM_TAB_SIZE 16
|
||||
#define GENL_FAM_TAB_MASK (GENL_FAM_TAB_SIZE - 1)
|
||||
|
|
|
|||
Loading…
Reference in a new issue