mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	btrfs: don't double-defer bio completions for compressed reads
The bio completion handler of the bio used for the compressed data is already run in a workqueue using btrfs_bio_wq_end_io, so don't schedule the completion of the original bio to the same workqueue again but just execute it directly. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
		
							parent
							
								
									d34e123de1
								
							
						
					
					
						commit
						02bb5b7247
					
				
					 1 changed files with 6 additions and 6 deletions
				
			
		| 
						 | 
					@ -2631,12 +2631,6 @@ void btrfs_submit_data_read_bio(struct inode *inode, struct bio *bio,
 | 
				
			||||||
	struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
 | 
						struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
 | 
				
			||||||
	blk_status_t ret;
 | 
						blk_status_t ret;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ret = btrfs_bio_wq_end_io(fs_info, bio,
 | 
					 | 
				
			||||||
			btrfs_is_free_space_inode(BTRFS_I(inode)) ?
 | 
					 | 
				
			||||||
			BTRFS_WQ_ENDIO_FREE_SPACE : BTRFS_WQ_ENDIO_DATA);
 | 
					 | 
				
			||||||
	if (ret)
 | 
					 | 
				
			||||||
		goto out;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (compress_type != BTRFS_COMPRESS_NONE) {
 | 
						if (compress_type != BTRFS_COMPRESS_NONE) {
 | 
				
			||||||
		/*
 | 
							/*
 | 
				
			||||||
		 * btrfs_submit_compressed_read will handle completing the bio
 | 
							 * btrfs_submit_compressed_read will handle completing the bio
 | 
				
			||||||
| 
						 | 
					@ -2646,6 +2640,12 @@ void btrfs_submit_data_read_bio(struct inode *inode, struct bio *bio,
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						ret = btrfs_bio_wq_end_io(fs_info, bio,
 | 
				
			||||||
 | 
								btrfs_is_free_space_inode(BTRFS_I(inode)) ?
 | 
				
			||||||
 | 
								BTRFS_WQ_ENDIO_FREE_SPACE : BTRFS_WQ_ENDIO_DATA);
 | 
				
			||||||
 | 
						if (ret)
 | 
				
			||||||
 | 
							goto out;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/*
 | 
						/*
 | 
				
			||||||
	 * Lookup bio sums does extra checks around whether we need to csum or
 | 
						 * Lookup bio sums does extra checks around whether we need to csum or
 | 
				
			||||||
	 * not, which is why we ignore skip_sum here.
 | 
						 * not, which is why we ignore skip_sum here.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue