mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-11-05 17:13:47 +01:00
Add __percpu sparse annotations to net. These annotations are to make sparse consider percpu variables to be in a different address space and warn if accessed without going through percpu accessors. This patch doesn't affect normal builds. The macro and type tricks around snmp stats make things a bit interesting. DEFINE/DECLARE_SNMP_STAT() macros mark the target field as __percpu and SNMP_UPD_PO_STATS() macro is updated accordingly. All snmp_mib_*() users which used to cast the argument to (void **) are updated to cast it to (void __percpu **). Signed-off-by: Tejun Heo <[email protected]> Acked-by: David S. Miller <[email protected]> Cc: Patrick McHardy <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Vlad Yasevich <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
17 lines
246 B
C
17 lines
246 B
C
#ifndef __NETNS_CORE_H__
|
|
#define __NETNS_CORE_H__
|
|
|
|
struct ctl_table_header;
|
|
struct prot_inuse;
|
|
|
|
struct netns_core {
|
|
/* core sysctls */
|
|
struct ctl_table_header *sysctl_hdr;
|
|
|
|
int sysctl_somaxconn;
|
|
|
|
struct prot_inuse __percpu *inuse;
|
|
};
|
|
|
|
#endif
|