mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	remap_range: Remove check of uptodate flag
read_mapping_folio() returns an ERR_PTR if the folio is not uptodate, so this check is simply dead code. Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
This commit is contained in:
		
							parent
							
								
									771075e15e
								
							
						
					
					
						commit
						da028b6b64
					
				
					 1 changed files with 1 additions and 10 deletions
				
			
		|  | @ -148,16 +148,7 @@ static int generic_remap_check_len(struct inode *inode_in, | |||
| /* Read a page's worth of file data into the page cache. */ | ||||
| static struct folio *vfs_dedupe_get_folio(struct file *file, loff_t pos) | ||||
| { | ||||
| 	struct folio *folio; | ||||
| 
 | ||||
| 	folio = read_mapping_folio(file->f_mapping, pos >> PAGE_SHIFT, file); | ||||
| 	if (IS_ERR(folio)) | ||||
| 		return folio; | ||||
| 	if (!folio_test_uptodate(folio)) { | ||||
| 		folio_put(folio); | ||||
| 		return ERR_PTR(-EIO); | ||||
| 	} | ||||
| 	return folio; | ||||
| 	return read_mapping_folio(file->f_mapping, pos >> PAGE_SHIFT, file); | ||||
| } | ||||
| 
 | ||||
| /*
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Matthew Wilcox (Oracle)
						Matthew Wilcox (Oracle)