From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Subject: [PATCH nf-next 2/7] netfilter: nf_tables: use struct nft_set_iter in set element flush
Date: Wed, 18 Jan 2017 18:30:08 +0100 [thread overview]
Message-ID: <1484760613-17236-3-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1484760613-17236-1-git-send-email-pablo@netfilter.org>
Instead of struct nft_set_dump_args, remove unnecessary wrapper
structure.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nf_tables_api.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 6598a48ead2f..494b49420149 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -3934,15 +3934,13 @@ static int nf_tables_delsetelem(struct net *net, struct sock *nlsk,
return -EBUSY;
if (nla[NFTA_SET_ELEM_LIST_ELEMENTS] == NULL) {
- struct nft_set_dump_args args = {
- .iter = {
- .genmask = genmask,
- .fn = nft_flush_set,
- },
+ struct nft_set_iter iter = {
+ .genmask = genmask,
+ .fn = nft_flush_set,
};
- set->ops->walk(&ctx, set, &args.iter);
+ set->ops->walk(&ctx, set, &iter);
- return args.iter.err;
+ return iter.err;
}
nla_for_each_nested(attr, nla[NFTA_SET_ELEM_LIST_ELEMENTS], rem) {
--
2.1.4
next prev parent reply other threads:[~2017-01-18 17:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-18 17:30 [PATCH nf-next 0/7] nf_tables set enhancements Pablo Neira Ayuso
2017-01-18 17:30 ` [PATCH nf-next 1/7] netfilter: nf_tables: pass netns to set->ops->remove() Pablo Neira Ayuso
2017-01-18 17:30 ` Pablo Neira Ayuso [this message]
2017-01-18 17:30 ` [PATCH nf-next 3/7] netfilter: nf_tables: rename deactivate_one() to flush() Pablo Neira Ayuso
2017-01-18 17:30 ` [PATCH nf-next 4/7] netfilter: nf_tables: add flush field to struct nft_set_iter Pablo Neira Ayuso
2017-01-18 17:30 ` [PATCH nf-next 5/7] netfilter: nf_tables: rename struct nft_set_estimate class field Pablo Neira Ayuso
2017-01-18 17:30 ` [PATCH nf-next 6/7] netfilter: nf_tables: add space notation to sets Pablo Neira Ayuso
2017-01-18 17:30 ` [PATCH nf-next 7/7] netfilter: nf_tables: add bitmap set type Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1484760613-17236-3-git-send-email-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).