projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
netfilter: nft_dynset: restore set element counter when failing to update
[linux-2.6-microblaze.git]
/
net
/
netfilter
/
nft_set_hash.c
diff --git
a/net/netfilter/nft_set_hash.c
b/net/netfilter/nft_set_hash.c
index
df40314
..
76de6c8
100644
(file)
--- a/
net/netfilter/nft_set_hash.c
+++ b/
net/netfilter/nft_set_hash.c
@@
-143,6
+143,7
@@
static bool nft_rhash_update(struct nft_set *set, const u32 *key,
/* Another cpu may race to insert the element with the same key */
if (prev) {
nft_set_elem_destroy(set, he, true);
+ atomic_dec(&set->nelems);
he = prev;
}
@@
-152,6
+153,7
@@
out:
err2:
nft_set_elem_destroy(set, he, true);
+ atomic_dec(&set->nelems);
err1:
return false;
}