mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-26 06:33:19 -04:00
[NETFILTER]: nfnetlink: use mutex instead of semaphore
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c6a1e615d1
commit
a3c5029cf7
3 changed files with 25 additions and 28 deletions
|
|
@ -129,19 +129,6 @@ extern void __nfa_fill(struct sk_buff *skb, int attrtype,
|
|||
({ if (skb_tailroom(skb) < (int)NFA_SPACE(attrlen)) goto nfattr_failure; \
|
||||
__nfa_fill(skb, attrtype, attrlen, data); })
|
||||
|
||||
extern struct semaphore nfnl_sem;
|
||||
|
||||
#define nfnl_shlock() down(&nfnl_sem)
|
||||
#define nfnl_shlock_nowait() down_trylock(&nfnl_sem)
|
||||
|
||||
#define nfnl_shunlock() do { up(&nfnl_sem); \
|
||||
if(nfnl && nfnl->sk_receive_queue.qlen) \
|
||||
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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue