ANDROID: Fix up merge issues in 6.1.64 in net/netfilter/nf_tables_api.c

When merging 6.1.64 into the 'android14-6.1-lts' branch, which contained
a subset of the upstream changes in nf_tables_api.c, the merge got
confused and did it "backwards", backing out some of the needed fixes.
This happens when we cherry-pick a subset of the upstream fixes into the
'android14-6.1' branch and then merge the LTS changes.

Fixes: f1bc13cb9d ("Merge 6.1.64 into android14-6.1-lts")
Change-Id: I8f510160f4ca43a05be265173daccb962531b1b4
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman 2023-12-13 15:02:36 +00:00
parent 31e1ff253d
commit fc9e81c1a1

View file

@ -9274,12 +9274,11 @@ void nft_trans_gc_queue_sync_done(struct nft_trans_gc *trans)
struct nft_trans_gc *nft_trans_gc_catchall_async(struct nft_trans_gc *gc,
unsigned int gc_seq)
{
struct nft_set_elem_catchall *catchall, *next;
struct nft_set_elem_catchall *catchall;
const struct nft_set *set = gc->set;
struct nft_elem_priv *elem_priv;
struct nft_set_ext *ext;
list_for_each_entry_safe(catchall, next, &set->catchall_list, list) {
list_for_each_entry_rcu(catchall, &set->catchall_list, list) {
ext = nft_set_elem_ext(set, catchall->elem);
if (!nft_set_elem_expired(ext))
@ -9293,17 +9292,7 @@ dead_elem:
if (!gc)
return NULL;
elem_priv = catchall->elem;
if (sync) {
struct nft_set_elem elem = {
.priv = elem_priv,
};
nft_setelem_data_deactivate(gc->net, gc->set, &elem);
nft_setelem_catchall_destroy(catchall);
}
nft_trans_gc_elem_add(gc, elem_priv);
nft_trans_gc_elem_add(gc, catchall->elem);
}
return gc;