mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
unix: uses an atomic type for scm files accounting
So the scm_stat_{add,del} helper can be invoked with no additional lock held. This clean-up the code a bit and will make the next patch easier. Signed-off-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
e955376277
commit
7782040b95
@@ -42,7 +42,7 @@ struct unix_skb_parms {
|
||||
} __randomize_layout;
|
||||
|
||||
struct scm_stat {
|
||||
u32 nr_fds;
|
||||
atomic_t nr_fds;
|
||||
};
|
||||
|
||||
#define UNIXCB(skb) (*(struct unix_skb_parms *)&((skb)->cb))
|
||||
|
Reference in New Issue
Block a user