mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-01 00:58:39 +02:00 
			
		
		
		
	gfp: include __GFP_NOWARN in GFP_NOWAIT
GFP_NOWAIT callers are always prepared for their allocations to fail because they fail so frequently. Forcing the callers to remember to add __GFP_NOWARN is just annoying and leads to an endless stream of patches for the places where we forgot to add it. We can now remove __GFP_NOWARN from all the callers which specify GFP_NOWAIT, but I'd rather wait a cycle and send patches to each maintainer instead of creating a big pile of merge conflicts. Link: https://lkml.kernel.org/r/20231109211507.2262419-1-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									17b46e7beb
								
							
						
					
					
						commit
						16f5dfbc85
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		|  | @ -274,7 +274,8 @@ typedef unsigned int __bitwise gfp_t; | ||||||
|  * accounted to kmemcg. |  * accounted to kmemcg. | ||||||
|  * |  * | ||||||
|  * %GFP_NOWAIT is for kernel allocations that should not stall for direct |  * %GFP_NOWAIT is for kernel allocations that should not stall for direct | ||||||
|  * reclaim, start physical IO or use any filesystem callback. |  * reclaim, start physical IO or use any filesystem callback.  It is very | ||||||
|  |  * likely to fail to allocate memory, even for very small allocations. | ||||||
|  * |  * | ||||||
|  * %GFP_NOIO will use direct reclaim to discard clean pages or slab pages |  * %GFP_NOIO will use direct reclaim to discard clean pages or slab pages | ||||||
|  * that do not require the starting of any physical IO. |  * that do not require the starting of any physical IO. | ||||||
|  | @ -325,7 +326,7 @@ typedef unsigned int __bitwise gfp_t; | ||||||
| #define GFP_ATOMIC	(__GFP_HIGH|__GFP_KSWAPD_RECLAIM) | #define GFP_ATOMIC	(__GFP_HIGH|__GFP_KSWAPD_RECLAIM) | ||||||
| #define GFP_KERNEL	(__GFP_RECLAIM | __GFP_IO | __GFP_FS) | #define GFP_KERNEL	(__GFP_RECLAIM | __GFP_IO | __GFP_FS) | ||||||
| #define GFP_KERNEL_ACCOUNT (GFP_KERNEL | __GFP_ACCOUNT) | #define GFP_KERNEL_ACCOUNT (GFP_KERNEL | __GFP_ACCOUNT) | ||||||
| #define GFP_NOWAIT	(__GFP_KSWAPD_RECLAIM) | #define GFP_NOWAIT	(__GFP_KSWAPD_RECLAIM | __GFP_NOWARN) | ||||||
| #define GFP_NOIO	(__GFP_RECLAIM) | #define GFP_NOIO	(__GFP_RECLAIM) | ||||||
| #define GFP_NOFS	(__GFP_RECLAIM | __GFP_IO) | #define GFP_NOFS	(__GFP_RECLAIM | __GFP_IO) | ||||||
| #define GFP_USER	(__GFP_RECLAIM | __GFP_IO | __GFP_FS | __GFP_HARDWALL) | #define GFP_USER	(__GFP_RECLAIM | __GFP_IO | __GFP_FS | __GFP_HARDWALL) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 Matthew Wilcox (Oracle)
						Matthew Wilcox (Oracle)