mirror of
https://github.com/torvalds/linux.git
synced 2025-11-01 17:18:25 +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:
parent
9c0b0807ec
commit
79cbc151f9
1 changed files with 3 additions and 3 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue