aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimran singhal <singhalsimran0@gmail.com>2017-03-29 11:15:40 +0530
committerPablo Neira Ayuso <pablo@netfilter.org>2017-04-07 17:33:02 +0200
commitcbbb40e2ec264bd63c410ff41cc8240c25419c49 (patch)
tree8a4fded469a3f59003a258fcbaf5b7c882fc3433
parentnetfilter: Use seq_puts()/seq_putc() where possible (diff)
downloadlinux-dev-cbbb40e2ec264bd63c410ff41cc8240c25419c49.tar.xz
linux-dev-cbbb40e2ec264bd63c410ff41cc8240c25419c49.zip
net: netfilter: Use list_{next/prev}_entry instead of list_entry
This patch replace list_entry with list_prev_entry as it makes the code more clear to read. Signed-off-by: simran singhal <singhalsimran0@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--net/netfilter/nf_tables_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 7ba76da96cc2..22e191ad4468 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -1905,7 +1905,7 @@ static int nf_tables_fill_rule_info(struct sk_buff *skb, struct net *net,
goto nla_put_failure;
if ((event != NFT_MSG_DELRULE) && (rule->list.prev != &chain->rules)) {
- prule = list_entry(rule->list.prev, struct nft_rule, list);
+ prule = list_prev_entry(rule, list);
if (nla_put_be64(skb, NFTA_RULE_POSITION,
cpu_to_be64(prule->handle),
NFTA_RULE_PAD))