mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	mm/page_alloc: use deferred_pages_enabled() wherever applicable
Instead of directly accessing static deferred_pages, replace such instances with the helper deferred_pages_enabled(). No functional change is intended. Link: https://lkml.kernel.org/r/20230105082506.241529-1-anshuman.khandual@arm.com Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org> Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									7ec7096b85
								
							
						
					
					
						commit
						076cf7ea67
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -4288,7 +4288,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 | 
				
			||||||
			 * Watermark failed for this zone, but see if we can
 | 
								 * Watermark failed for this zone, but see if we can
 | 
				
			||||||
			 * grow this zone if it contains deferred pages.
 | 
								 * grow this zone if it contains deferred pages.
 | 
				
			||||||
			 */
 | 
								 */
 | 
				
			||||||
			if (static_branch_unlikely(&deferred_pages)) {
 | 
								if (deferred_pages_enabled()) {
 | 
				
			||||||
				if (_deferred_grow_zone(zone, order))
 | 
									if (_deferred_grow_zone(zone, order))
 | 
				
			||||||
					goto try_this_zone;
 | 
										goto try_this_zone;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
| 
						 | 
					@ -4337,7 +4337,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
 | 
					#ifdef CONFIG_DEFERRED_STRUCT_PAGE_INIT
 | 
				
			||||||
			/* Try again if zone has deferred pages */
 | 
								/* Try again if zone has deferred pages */
 | 
				
			||||||
			if (static_branch_unlikely(&deferred_pages)) {
 | 
								if (deferred_pages_enabled()) {
 | 
				
			||||||
				if (_deferred_grow_zone(zone, order))
 | 
									if (_deferred_grow_zone(zone, order))
 | 
				
			||||||
					goto try_this_zone;
 | 
										goto try_this_zone;
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue