mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	mm: allow read-ahead with IOCB_NOWAIT set
The read-ahead shouldn't block, so allow it to be done even if IOCB_NOWAIT is set in the kiocb. Acked-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
		
							parent
							
								
									b63534c41e
								
							
						
					
					
						commit
						2e85abf053
					
				
					 1 changed files with 0 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -2028,8 +2028,6 @@ ssize_t generic_file_buffered_read(struct kiocb *iocb,
 | 
			
		|||
 | 
			
		||||
		page = find_get_page(mapping, index);
 | 
			
		||||
		if (!page) {
 | 
			
		||||
			if (iocb->ki_flags & IOCB_NOWAIT)
 | 
			
		||||
				goto would_block;
 | 
			
		||||
			page_cache_sync_readahead(mapping,
 | 
			
		||||
					ra, filp,
 | 
			
		||||
					index, last_index - index);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue