forked from mirrors/linux
		
	xfrm: policy: use recently added helper in more places
No logical change intended. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
This commit is contained in:
		
							parent
							
								
									e7cd191f83
								
							
						
					
					
						commit
						08c2182cf0
					
				
					 1 changed files with 2 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -1276,11 +1276,7 @@ static void xfrm_hash_rebuild(struct work_struct *work)
 | 
			
		|||
		struct xfrm_pol_inexact_bin *bin;
 | 
			
		||||
		u8 dbits, sbits;
 | 
			
		||||
 | 
			
		||||
		if (policy->walk.dead)
 | 
			
		||||
			continue;
 | 
			
		||||
 | 
			
		||||
		dir = xfrm_policy_id2dir(policy->index);
 | 
			
		||||
		if (dir >= XFRM_POLICY_MAX)
 | 
			
		||||
		if (xfrm_policy_is_dead_or_sk(policy))
 | 
			
		||||
			continue;
 | 
			
		||||
 | 
			
		||||
		if ((dir & XFRM_POLICY_MASK) == XFRM_POLICY_OUT) {
 | 
			
		||||
| 
						 | 
				
			
			@ -1331,13 +1327,8 @@ static void xfrm_hash_rebuild(struct work_struct *work)
 | 
			
		|||
 | 
			
		||||
	/* re-insert all policies by order of creation */
 | 
			
		||||
	list_for_each_entry_reverse(policy, &net->xfrm.policy_all, walk.all) {
 | 
			
		||||
		if (policy->walk.dead)
 | 
			
		||||
		if (xfrm_policy_is_dead_or_sk(policy))
 | 
			
		||||
			continue;
 | 
			
		||||
		dir = xfrm_policy_id2dir(policy->index);
 | 
			
		||||
		if (dir >= XFRM_POLICY_MAX) {
 | 
			
		||||
			/* skip socket policies */
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		hlist_del_rcu(&policy->bydst);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue