@@ -9231,8 +9231,9 @@ void nft_trans_gc_queue_sync_done(struct nft_trans_gc *trans)
92319231 call_rcu (& trans -> rcu , nft_trans_gc_trans_free );
92329232}
92339233
9234- struct nft_trans_gc * nft_trans_gc_catchall (struct nft_trans_gc * gc ,
9235- unsigned int gc_seq )
9234+ static struct nft_trans_gc * nft_trans_gc_catchall (struct nft_trans_gc * gc ,
9235+ unsigned int gc_seq ,
9236+ bool sync )
92369237{
92379238 struct nft_set_elem_catchall * catchall ;
92389239 const struct nft_set * set = gc -> set ;
@@ -9248,7 +9249,11 @@ struct nft_trans_gc *nft_trans_gc_catchall(struct nft_trans_gc *gc,
92489249
92499250 nft_set_elem_dead (ext );
92509251dead_elem :
9251- gc = nft_trans_gc_queue_async (gc , gc_seq , GFP_ATOMIC );
9252+ if (sync )
9253+ gc = nft_trans_gc_queue_sync (gc , GFP_ATOMIC );
9254+ else
9255+ gc = nft_trans_gc_queue_async (gc , gc_seq , GFP_ATOMIC );
9256+
92529257 if (!gc )
92539258 return NULL ;
92549259
@@ -9258,6 +9263,17 @@ struct nft_trans_gc *nft_trans_gc_catchall(struct nft_trans_gc *gc,
92589263 return gc ;
92599264}
92609265
9266+ struct nft_trans_gc * nft_trans_gc_catchall_async (struct nft_trans_gc * gc ,
9267+ unsigned int gc_seq )
9268+ {
9269+ return nft_trans_gc_catchall (gc , gc_seq , false);
9270+ }
9271+
9272+ struct nft_trans_gc * nft_trans_gc_catchall_sync (struct nft_trans_gc * gc )
9273+ {
9274+ return nft_trans_gc_catchall (gc , 0 , true);
9275+ }
9276+
92619277static void nf_tables_module_autoload_cleanup (struct net * net )
92629278{
92639279 struct nftables_pernet * nft_net = nft_pernet (net );
0 commit comments