Files
linux-apfs/include/linux
Eric W. Biederman 0c5c9fb551 net: Introduce possible_net_t
Having to say
> #ifdef CONFIG_NET_NS
> 	struct net *net;
> #endif

in structures is a little bit wordy and a little bit error prone.

Instead it is possible to say:
> typedef struct {
> #ifdef CONFIG_NET_NS
>       struct net *net;
> #endif
> } possible_net_t;

And then in a header say:

> 	possible_net_t net;

Which is cleaner and easier to use and easier to test, as the
possible_net_t is always there no matter what the compile options.

Further this allows read_pnet and write_pnet to be functions in all
cases which is better at catching typos.

This change adds possible_net_t, updates the definitions of read_pnet
and write_pnet, updates optional struct net * variables that
write_pnet uses on to have the type possible_net_t, and finally fixes
up the b0rked users of read_pnet and write_pnet.

Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-12 14:39:40 -04:00
..
2015-02-19 13:31:40 +03:00
2015-02-18 07:28:37 -08:00
2015-02-02 14:23:42 -08:00
2015-02-12 18:54:15 -08:00
2015-03-02 16:43:41 -05:00
2015-02-20 15:24:04 -05:00
2015-02-13 21:21:36 -08:00
2015-02-17 14:34:51 -08:00
2015-02-11 17:06:02 -08:00
2015-03-12 14:39:40 -04:00
2015-03-11 17:56:28 -04:00
2015-02-17 14:34:52 -08:00
2015-02-16 17:56:03 -08:00
2015-03-02 00:19:30 -05:00
2015-02-13 21:21:41 -08:00
2015-03-11 21:55:28 -04:00
2015-03-04 00:26:06 -05:00
2015-02-13 21:21:35 -08:00
2015-02-28 15:10:39 -05:00