Commit d562f1f8 authored by Robert Olsson's avatar Robert Olsson Committed by David S. Miller

[IPV4] fib_trie: Document locking.

Paul E. McKenney writes:

> Those of use who dive into networking only occasionally would much
> appreciate this.  ;-)

No problem here... 
Acked-by: default avatarRobert Olsson <robert.olsson@its.uu.se>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> (but trivial)
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 79f4f642
...@@ -1123,6 +1123,9 @@ fib_insert_node(struct trie *t, int *err, u32 key, int plen) ...@@ -1123,6 +1123,9 @@ fib_insert_node(struct trie *t, int *err, u32 key, int plen)
return fa_head; return fa_head;
} }
/*
* Caller must hold RTNL.
*/
static int fn_trie_insert(struct fib_table *tb, struct fib_config *cfg) static int fn_trie_insert(struct fib_table *tb, struct fib_config *cfg)
{ {
struct trie *t = (struct trie *) tb->tb_data; struct trie *t = (struct trie *) tb->tb_data;
...@@ -1540,6 +1543,9 @@ static int trie_leaf_remove(struct trie *t, t_key key) ...@@ -1540,6 +1543,9 @@ static int trie_leaf_remove(struct trie *t, t_key key)
return 1; return 1;
} }
/*
* Caller must hold RTNL.
*/
static int fn_trie_delete(struct fib_table *tb, struct fib_config *cfg) static int fn_trie_delete(struct fib_table *tb, struct fib_config *cfg)
{ {
struct trie *t = (struct trie *) tb->tb_data; struct trie *t = (struct trie *) tb->tb_data;
...@@ -1718,6 +1724,9 @@ static struct leaf *nextleaf(struct trie *t, struct leaf *thisleaf) ...@@ -1718,6 +1724,9 @@ static struct leaf *nextleaf(struct trie *t, struct leaf *thisleaf)
return NULL; /* Ready. Root of trie */ return NULL; /* Ready. Root of trie */
} }
/*
* Caller must hold RTNL.
*/
static int fn_trie_flush(struct fib_table *tb) static int fn_trie_flush(struct fib_table *tb)
{ {
struct trie *t = (struct trie *) tb->tb_data; struct trie *t = (struct trie *) tb->tb_data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment