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)
1276
1276
struct xfrm_pol_inexact_bin * bin ;
1277
1277
u8 dbits , sbits ;
1278
1278
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 ))
1284
1280
continue ;
1285
1281
1286
1282
if ((dir & XFRM_POLICY_MASK ) == XFRM_POLICY_OUT ) {
@@ -1331,13 +1327,8 @@ static void xfrm_hash_rebuild(struct work_struct *work)
1331
1327
1332
1328
/* re-insert all policies by order of creation */
1333
1329
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 ))
1339
1331
continue ;
1340
- }
1341
1332
1342
1333
hlist_del_rcu (& policy -> bydst );
1343
1334
You can’t perform that action at this time.
0 commit comments