mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	mm: pincer in truncate_inode_pages_range
truncate_inode_pages_range()'s final loop has a nice pincer property, bringing start and end together, squeezing out the last pages. But the range handling missed out on that, just sliding up the range, perhaps letting pages come in behind it. Add one more test to give it the same pincer effect. Signed-off-by: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
		
							parent
							
								
									b85e0effd3
								
							
						
					
					
						commit
						d0823576bf
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -269,7 +269,7 @@ void truncate_inode_pages_range(struct address_space *mapping,
 | 
				
			||||||
			index = start;
 | 
								index = start;
 | 
				
			||||||
			continue;
 | 
								continue;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if (pvec.pages[0]->index > end) {
 | 
							if (index == start && pvec.pages[0]->index > end) {
 | 
				
			||||||
			pagevec_release(&pvec);
 | 
								pagevec_release(&pvec);
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue