mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-05-26 11:40:24 +02:00
btrfs: simplify reading bio status in end_compressed_writeback()
We don't need to have a separate variable to read the bio status, 'ret' works for that just fine so remove 'error'. Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
@@ -285,12 +285,12 @@ static noinline void end_compressed_writeback(const struct compressed_bio *cb)
|
||||
unsigned long index = cb->start >> PAGE_SHIFT;
|
||||
unsigned long end_index = (cb->start + cb->len - 1) >> PAGE_SHIFT;
|
||||
struct folio_batch fbatch;
|
||||
const int error = blk_status_to_errno(cb->bbio.bio.bi_status);
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
if (error)
|
||||
mapping_set_error(inode->i_mapping, error);
|
||||
ret = blk_status_to_errno(cb->bbio.bio.bi_status);
|
||||
if (ret)
|
||||
mapping_set_error(inode->i_mapping, ret);
|
||||
|
||||
folio_batch_init(&fbatch);
|
||||
while (index <= end_index) {
|
||||
|
||||
Reference in New Issue
Block a user