Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78216
b: refs/heads/master
c: 3015a34
h: refs/heads/master
v: v3
  • Loading branch information
Joonwoo Park authored and David S. Miller committed Jan 28, 2008
1 parent 7f12b26 commit c5741b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 88f8349164cf4035e63db9e6f484e0ce9cb17e47
refs/heads/master: 3015a347dcd470fcc8becf1f84b0502391a3c0e0
7 changes: 2 additions & 5 deletions trunk/net/ipv4/fib_hash.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ static struct hlist_head *fz_hash_alloc(int divisor)
unsigned long size = divisor * sizeof(struct hlist_head);

if (size <= PAGE_SIZE) {
return kmalloc(size, GFP_KERNEL);
return kzalloc(size, GFP_KERNEL);
} else {
return (struct hlist_head *)
__get_free_pages(GFP_KERNEL, get_order(size));
__get_free_pages(GFP_KERNEL | __GFP_ZERO, get_order(size));
}
}

Expand Down Expand Up @@ -174,8 +174,6 @@ static void fn_rehash_zone(struct fn_zone *fz)
ht = fz_hash_alloc(new_divisor);

if (ht) {
memset(ht, 0, new_divisor * sizeof(struct hlist_head));

write_lock_bh(&fib_hash_lock);
old_ht = fz->fz_hash;
fz->fz_hash = ht;
Expand Down Expand Up @@ -219,7 +217,6 @@ fn_new_zone(struct fn_hash *table, int z)
kfree(fz);
return NULL;
}
memset(fz->fz_hash, 0, fz->fz_divisor * sizeof(struct hlist_head *));
fz->fz_order = z;
fz->fz_mask = inet_make_mask(z);

Expand Down

0 comments on commit c5741b3

Please sign in to comment.