File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -1276,11 +1276,7 @@ static void xfrm_hash_rebuild(struct work_struct *work)
12761276 struct xfrm_pol_inexact_bin * bin ;
12771277 u8 dbits , sbits ;
12781278
1279- if (policy -> walk .dead )
1280- continue ;
1281-
1282- dir = xfrm_policy_id2dir (policy -> index );
1283- if (dir >= XFRM_POLICY_MAX )
1279+ if (xfrm_policy_is_dead_or_sk (policy ))
12841280 continue ;
12851281
12861282 if ((dir & XFRM_POLICY_MASK ) == XFRM_POLICY_OUT ) {
@@ -1331,13 +1327,8 @@ static void xfrm_hash_rebuild(struct work_struct *work)
13311327
13321328 /* re-insert all policies by order of creation */
13331329 list_for_each_entry_reverse (policy , & net -> xfrm .policy_all , walk .all ) {
1334- if (policy -> walk .dead )
1335- continue ;
1336- dir = xfrm_policy_id2dir (policy -> index );
1337- if (dir >= XFRM_POLICY_MAX ) {
1338- /* skip socket policies */
1330+ if (xfrm_policy_is_dead_or_sk (policy ))
13391331 continue ;
1340- }
13411332
13421333 hlist_del_rcu (& policy -> bydst );
13431334
You can’t perform that action at this time.
0 commit comments