mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	ext3: Check return value of blkdev_issue_flush()
blkdev_issue_flush() can fail. Make sure the error gets properly propagated. Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
		
							parent
							
								
									349ecd6a3c
								
							
						
					
					
						commit
						44f4f729e7
					
				
					 1 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -92,8 +92,13 @@ int ext3_sync_file(struct file *file, loff_t start, loff_t end, int datasync)
 | 
			
		|||
	 * disk caches manually so that data really is on persistent
 | 
			
		||||
	 * storage
 | 
			
		||||
	 */
 | 
			
		||||
	if (needs_barrier)
 | 
			
		||||
		blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
 | 
			
		||||
	if (needs_barrier) {
 | 
			
		||||
		int err;
 | 
			
		||||
 | 
			
		||||
		err = blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
 | 
			
		||||
		if (!ret)
 | 
			
		||||
			ret = err;
 | 
			
		||||
	}
 | 
			
		||||
out:
 | 
			
		||||
	trace_ext3_sync_file_exit(inode, ret);
 | 
			
		||||
	return ret;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue