aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/fib_hash.c')
-rw-r--r--net/ipv4/fib_hash.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 648f47c1c399..b21bb28d1fd0 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -146,7 +146,7 @@ static void fn_rehash_zone(struct fn_zone *fz)
146 struct hlist_head *ht, *old_ht; 146 struct hlist_head *ht, *old_ht;
147 int old_divisor, new_divisor; 147 int old_divisor, new_divisor;
148 u32 new_hashmask; 148 u32 new_hashmask;
149 149
150 old_divisor = fz->fz_divisor; 150 old_divisor = fz->fz_divisor;
151 151
152 switch (old_divisor) { 152 switch (old_divisor) {
@@ -911,7 +911,7 @@ static struct fib_alias *fib_get_next(struct seq_file *seq)
911 911
912 if (!iter->zone) 912 if (!iter->zone)
913 goto out; 913 goto out;
914 914
915 iter->bucket = 0; 915 iter->bucket = 0;
916 iter->hash_head = iter->zone->fz_hash; 916 iter->hash_head = iter->zone->fz_hash;
917 917
@@ -932,7 +932,7 @@ static struct fib_alias *fib_get_idx(struct seq_file *seq, loff_t pos)
932{ 932{
933 struct fib_iter_state *iter = seq->private; 933 struct fib_iter_state *iter = seq->private;
934 struct fib_alias *fa; 934 struct fib_alias *fa;
935 935
936 if (iter->valid && pos >= iter->pos && iter->genid == fib_hash_genid) { 936 if (iter->valid && pos >= iter->pos && iter->genid == fib_hash_genid) {
937 fa = iter->fa; 937 fa = iter->fa;
938 pos -= iter->pos; 938 pos -= iter->pos;
@@ -981,7 +981,7 @@ static unsigned fib_flag_trans(int type, __be32 mask, struct fib_info *fi)
981 return flags; 981 return flags;
982} 982}
983 983
984/* 984/*
985 * This outputs /proc/net/route. 985 * This outputs /proc/net/route.
986 * 986 *
987 * It always works in backward compatibility mode. 987 * It always works in backward compatibility mode.
@@ -1040,7 +1040,7 @@ static int fib_seq_open(struct inode *inode, struct file *file)
1040 struct seq_file *seq; 1040 struct seq_file *seq;
1041 int rc = -ENOMEM; 1041 int rc = -ENOMEM;
1042 struct fib_iter_state *s = kzalloc(sizeof(*s), GFP_KERNEL); 1042 struct fib_iter_state *s = kzalloc(sizeof(*s), GFP_KERNEL);
1043 1043
1044 if (!s) 1044 if (!s)
1045 goto out; 1045 goto out;
1046 1046
@@ -1057,7 +1057,7 @@ out_kfree:
1057 goto out; 1057 goto out;
1058} 1058}
1059 1059
1060static struct file_operations fib_seq_fops = { 1060static const struct file_operations fib_seq_fops = {
1061 .owner = THIS_MODULE, 1061 .owner = THIS_MODULE,
1062 .open = fib_seq_open, 1062 .open = fib_seq_open,
1063 .read = seq_read, 1063 .read = seq_read,