mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-28 09:31:14 +00: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:
parent
e955376277
commit
7782040b95
2 changed files with 7 additions and 16 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue