Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ipv4: Rename fib_hash_* locals in fib_semantics.c

To avoid confusion with the recently deleted fib_hash.c
code, use "fib_info_hash_*" instead of plain "fib_hash_*".

Signed-off-by: David S. Miller <davem@davemloft.net>

+20 -20
+20 -20
net/ipv4/fib_semantics.c
··· 49 49 static DEFINE_SPINLOCK(fib_info_lock); 50 50 static struct hlist_head *fib_info_hash; 51 51 static struct hlist_head *fib_info_laddrhash; 52 - static unsigned int fib_hash_size; 52 + static unsigned int fib_info_hash_size; 53 53 static unsigned int fib_info_cnt; 54 54 55 55 #define DEVINDEX_HASHBITS 8 ··· 223 223 224 224 static inline unsigned int fib_info_hashfn(const struct fib_info *fi) 225 225 { 226 - unsigned int mask = (fib_hash_size - 1); 226 + unsigned int mask = (fib_info_hash_size - 1); 227 227 unsigned int val = fi->fib_nhs; 228 228 229 229 val ^= fi->fib_protocol; ··· 615 615 616 616 static inline unsigned int fib_laddr_hashfn(__be32 val) 617 617 { 618 - unsigned int mask = (fib_hash_size - 1); 618 + unsigned int mask = (fib_info_hash_size - 1); 619 619 620 620 return ((__force u32)val ^ 621 621 ((__force u32)val >> 7) ^ 622 622 ((__force u32)val >> 14)) & mask; 623 623 } 624 624 625 - static struct hlist_head *fib_hash_alloc(int bytes) 625 + static struct hlist_head *fib_info_hash_alloc(int bytes) 626 626 { 627 627 if (bytes <= PAGE_SIZE) 628 628 return kzalloc(bytes, GFP_KERNEL); ··· 632 632 get_order(bytes)); 633 633 } 634 634 635 - static void fib_hash_free(struct hlist_head *hash, int bytes) 635 + static void fib_info_hash_free(struct hlist_head *hash, int bytes) 636 636 { 637 637 if (!hash) 638 638 return; ··· 643 643 free_pages((unsigned long) hash, get_order(bytes)); 644 644 } 645 645 646 - static void fib_hash_move(struct hlist_head *new_info_hash, 647 - struct hlist_head *new_laddrhash, 648 - unsigned int new_size) 646 + static void fib_info_hash_move(struct hlist_head *new_info_hash, 647 + struct hlist_head *new_laddrhash, 648 + unsigned int new_size) 649 649 { 650 650 struct hlist_head *old_info_hash, *old_laddrhash; 651 - unsigned int old_size = fib_hash_size; 651 + unsigned int old_size = fib_info_hash_size; 652 652 unsigned int i, bytes; 653 653 654 654 spin_lock_bh(&fib_info_lock); 655 655 old_info_hash = fib_info_hash; 656 656 old_laddrhash = fib_info_laddrhash; 657 - fib_hash_size = new_size; 657 + fib_info_hash_size = new_size; 658 658 659 659 for (i = 0; i < old_size; i++) { 660 660 struct hlist_head *head = &fib_info_hash[i]; ··· 695 695 spin_unlock_bh(&fib_info_lock); 696 696 697 697 bytes = old_size * sizeof(struct hlist_head *); 698 - fib_hash_free(old_info_hash, bytes); 699 - fib_hash_free(old_laddrhash, bytes); 698 + fib_info_hash_free(old_info_hash, bytes); 699 + fib_info_hash_free(old_laddrhash, bytes); 700 700 } 701 701 702 702 struct fib_info *fib_create_info(struct fib_config *cfg) ··· 720 720 #endif 721 721 722 722 err = -ENOBUFS; 723 - if (fib_info_cnt >= fib_hash_size) { 724 - unsigned int new_size = fib_hash_size << 1; 723 + if (fib_info_cnt >= fib_info_hash_size) { 724 + unsigned int new_size = fib_info_hash_size << 1; 725 725 struct hlist_head *new_info_hash; 726 726 struct hlist_head *new_laddrhash; 727 727 unsigned int bytes; ··· 729 729 if (!new_size) 730 730 new_size = 1; 731 731 bytes = new_size * sizeof(struct hlist_head *); 732 - new_info_hash = fib_hash_alloc(bytes); 733 - new_laddrhash = fib_hash_alloc(bytes); 732 + new_info_hash = fib_info_hash_alloc(bytes); 733 + new_laddrhash = fib_info_hash_alloc(bytes); 734 734 if (!new_info_hash || !new_laddrhash) { 735 - fib_hash_free(new_info_hash, bytes); 736 - fib_hash_free(new_laddrhash, bytes); 735 + fib_info_hash_free(new_info_hash, bytes); 736 + fib_info_hash_free(new_laddrhash, bytes); 737 737 } else 738 - fib_hash_move(new_info_hash, new_laddrhash, new_size); 738 + fib_info_hash_move(new_info_hash, new_laddrhash, new_size); 739 739 740 - if (!fib_hash_size) 740 + if (!fib_info_hash_size) 741 741 goto failure; 742 742 } 743 743