diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-05 07:49:30 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-05 07:49:30 -0700 |
commit | a866a5f4eab10080ca25785fcf53ad67cde28bed (patch) | |
tree | 8a3e09a2d0d931d15f1393614160242b7f94d00d | |
parent | 107207aa8576963861e9f0c66b439d233f02a97d (diff) | |
parent | b7656e7f2944984befa3ab99a5b99f99a23b302b (diff) | |
download | kernel_samsung_tuna-a866a5f4eab10080ca25785fcf53ad67cde28bed.zip kernel_samsung_tuna-a866a5f4eab10080ca25785fcf53ad67cde28bed.tar.gz kernel_samsung_tuna-a866a5f4eab10080ca25785fcf53ad67cde28bed.tar.bz2 |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
-rw-r--r-- | net/ipv4/fib_semantics.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/ipv4/fib_semantics.c b/net/ipv4/fib_semantics.c index c886b28..e278cb9 100644 --- a/net/ipv4/fib_semantics.c +++ b/net/ipv4/fib_semantics.c @@ -593,10 +593,13 @@ static void fib_hash_move(struct hlist_head *new_info_hash, struct hlist_head *new_laddrhash, unsigned int new_size) { + struct hlist_head *old_info_hash, *old_laddrhash; unsigned int old_size = fib_hash_size; - unsigned int i; + unsigned int i, bytes; write_lock(&fib_info_lock); + old_info_hash = fib_info_hash; + old_laddrhash = fib_info_laddrhash; fib_hash_size = new_size; for (i = 0; i < old_size; i++) { @@ -636,6 +639,10 @@ static void fib_hash_move(struct hlist_head *new_info_hash, fib_info_laddrhash = new_laddrhash; write_unlock(&fib_info_lock); + + bytes = old_size * sizeof(struct hlist_head *); + fib_hash_free(old_info_hash, bytes); + fib_hash_free(old_laddrhash, bytes); } struct fib_info * |