diff options
author | Kirill Tkhai <ktkhai@virtuozzo.com> | 2018-03-27 11:02:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-27 13:18:09 -0400 |
commit | 8518e9bb98b602eca0717d5aaad63ccbe56539d2 (patch) | |
tree | dc2887c1b2089055ad7c2d13df0ea20b3a27969b /net/core | |
parent | 4420bf21fb6c0306e36ad58ade1e741fba57ce65 (diff) |
net: Add more comments
This adds comments to different places to improve
readability.
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/net_namespace.c | 2 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 9e8ee4640451..b5796d17a302 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c | |||
@@ -43,6 +43,8 @@ static bool init_net_initialized; | |||
43 | /* | 43 | /* |
44 | * pernet_ops_rwsem: protects: pernet_list, net_generic_ids, | 44 | * pernet_ops_rwsem: protects: pernet_list, net_generic_ids, |
45 | * init_net_initialized and first_device pointer. | 45 | * init_net_initialized and first_device pointer. |
46 | * This is internal net namespace object. Please, don't use it | ||
47 | * outside. | ||
46 | */ | 48 | */ |
47 | DECLARE_RWSEM(pernet_ops_rwsem); | 49 | DECLARE_RWSEM(pernet_ops_rwsem); |
48 | 50 | ||
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 73011a60434c..2d3949789cef 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -459,7 +459,7 @@ static void rtnl_lock_unregistering_all(void) | |||
459 | */ | 459 | */ |
460 | void rtnl_link_unregister(struct rtnl_link_ops *ops) | 460 | void rtnl_link_unregister(struct rtnl_link_ops *ops) |
461 | { | 461 | { |
462 | /* Close the race with cleanup_net() */ | 462 | /* Close the race with setup_net() and cleanup_net() */ |
463 | down_write(&pernet_ops_rwsem); | 463 | down_write(&pernet_ops_rwsem); |
464 | rtnl_lock_unregistering_all(); | 464 | rtnl_lock_unregistering_all(); |
465 | __rtnl_link_unregister(ops); | 465 | __rtnl_link_unregister(ops); |