diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2009-12-03 02:29:03 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-03 12:22:01 -0800 |
commit | 72ad937abd0a43b7cf2c557ba1f2ec75e608c516 (patch) | |
tree | ac81af750df170a46ed001fb5647b83dc20f8422 /include/net/net_namespace.h | |
parent | 8153a10c08f1312af563bb92532002e46d3f504a (diff) | |
download | kernel_goldelico_gta04-72ad937abd0a43b7cf2c557ba1f2ec75e608c516.zip kernel_goldelico_gta04-72ad937abd0a43b7cf2c557ba1f2ec75e608c516.tar.gz kernel_goldelico_gta04-72ad937abd0a43b7cf2c557ba1f2ec75e608c516.tar.bz2 |
net: Add support for batching network namespace cleanups
- Add exit_list to struct net to support building lists of network
namespaces to cleanup.
- Add exit_batch to pernet_operations to allow running operations only
once during a network namespace exit. Instead of once per network
namespace.
- Factor opt ops_exit_list and ops_exit_free so the logic with cleanup
up a network namespace does not need to be duplicated.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/net_namespace.h')
-rw-r--r-- | include/net/net_namespace.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 24a8c55..f307e13 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h @@ -43,6 +43,7 @@ struct net { #endif struct list_head list; /* list of network namespaces */ struct list_head cleanup_list; /* namespaces on death row */ + struct list_head exit_list; /* Use only net_mutex */ struct proc_dir_entry *proc_net; struct proc_dir_entry *proc_net_stat; @@ -236,6 +237,7 @@ struct pernet_operations { struct list_head list; int (*init)(struct net *net); void (*exit)(struct net *net); + void (*exit_batch)(struct list_head *net_exit_list); int *id; size_t size; }; |