X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=net%2Fnetfilter%2Fxt_hashlimit.c;h=9f37d593ca38a2badf2677cfa98753e6d84c2ea9;hb=601e68e100b6bf8ba13a32db8faf92d43acaa997;hp=bd1f7a2048d6d8cca560e3cd714278530965b68f;hpb=a8d0f9526ff8510d6fa5e708ef5386af19503299;p=powerpc.git diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index bd1f7a2048..9f37d593ca 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c @@ -37,7 +37,7 @@ MODULE_ALIAS("ip6t_hashlimit"); /* need to declare this at the top */ static struct proc_dir_entry *hashlimit_procdir4; static struct proc_dir_entry *hashlimit_procdir6; -static struct file_operations dl_file_ops; +static const struct file_operations dl_file_ops; /* hash table crap */ struct dsthash_dst { @@ -208,7 +208,7 @@ static int htable_create(struct xt_hashlimit_info *minfo, int family) spin_lock_init(&hinfo->lock); hinfo->pde = create_proc_entry(minfo->name, 0, family == AF_INET ? hashlimit_procdir4 : - hashlimit_procdir6); + hashlimit_procdir6); if (!hinfo->pde) { vfree(hinfo); return -1; @@ -240,7 +240,7 @@ static int select_gc(struct xt_hashlimit_htable *ht, struct dsthash_ent *he) } static void htable_selective_cleanup(struct xt_hashlimit_htable *ht, - int (*select)(struct xt_hashlimit_htable *ht, + int (*select)(struct xt_hashlimit_htable *ht, struct dsthash_ent *he)) { unsigned int i; @@ -279,7 +279,7 @@ static void htable_destroy(struct xt_hashlimit_htable *hinfo) /* remove proc entry */ remove_proc_entry(hinfo->pde->name, hinfo->family == AF_INET ? hashlimit_procdir4 : - hashlimit_procdir6); + hashlimit_procdir6); htable_selective_cleanup(hinfo, select_all); vfree(hinfo); } @@ -483,7 +483,7 @@ hashlimit_match(const struct sk_buff *skb, return 1; } - spin_unlock_bh(&hinfo->lock); + spin_unlock_bh(&hinfo->lock); /* default case: we're overlimit, thus don't match */ return 0; @@ -714,7 +714,7 @@ static int dl_proc_open(struct inode *inode, struct file *file) return ret; } -static struct file_operations dl_file_ops = { +static const struct file_operations dl_file_ops = { .owner = THIS_MODULE, .open = dl_proc_open, .read = seq_read,