Skip to content

Commit 79cbc15

Browse files
committed
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>
1 parent 9c0b080 commit 79cbc15

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/btrfs/compression.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,12 +285,12 @@ static noinline void end_compressed_writeback(const struct compressed_bio *cb)
285285
unsigned long index = cb->start >> PAGE_SHIFT;
286286
unsigned long end_index = (cb->start + cb->len - 1) >> PAGE_SHIFT;
287287
struct folio_batch fbatch;
288-
const int error = blk_status_to_errno(cb->bbio.bio.bi_status);
289288
int i;
290289
int ret;
291290

292-
if (error)
293-
mapping_set_error(inode->i_mapping, error);
291+
ret = blk_status_to_errno(cb->bbio.bio.bi_status);
292+
if (ret)
293+
mapping_set_error(inode->i_mapping, ret);
294294

295295
folio_batch_init(&fbatch);
296296
while (index <= end_index) {

0 commit comments

Comments
 (0)