public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 08/12] btrfs: simplify reading bio status in end_compressed_writeback()
Date: Wed, 23 Apr 2025 17:57:20 +0200	[thread overview]
Message-ID: <4449edabfc92dbfb133fbc483480621aaec2d640.1745422901.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1745422901.git.dsterba@suse.com>

We don't need to have a separate variable to read the bio status, 'ret'
works for that just fine so remove 'error'.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/compression.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index 79997e97f3b557..59075dd865c143 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -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) {
-- 
2.49.0


  parent reply	other threads:[~2025-04-23 15:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 15:57 [PATCH 00/12] Cleanups of blk_status_t use David Sterba
2025-04-23 15:57 ` [PATCH 01/12] btrfs: drop redundant local variable in raid_wait_write_end_io() David Sterba
2025-04-23 15:57 ` [PATCH 02/12] btrfs: change return type of btrfs_lookup_bio_sums() to int David Sterba
2025-04-23 15:57 ` [PATCH 03/12] btrfs: change return type of btrfs_csum_one_bio() " David Sterba
2025-04-23 15:57 ` [PATCH 04/12] btrfs: change return type of btree_csum_one_bio() " David Sterba
2025-04-23 15:57 ` [PATCH 05/12] btrfs: change return type of btrfs_bio_csum() " David Sterba
2025-04-23 15:57 ` [PATCH 06/12] btrfs: rename ret to status in btrfs_submit_chunk() David Sterba
2025-04-23 15:57 ` [PATCH 07/12] btrfs: rename error to ret " David Sterba
2025-04-23 15:57 ` David Sterba [this message]
2025-04-23 15:57 ` [PATCH 09/12] btrfs: rename ret to status in btrfs_submit_compressed_read() David Sterba
2025-04-23 15:57 ` [PATCH 10/12] btrfs: rename ret2 to ret " David Sterba
2025-04-23 15:57 ` [PATCH 11/12] btrfs: change return type of btrfs_alloc_dummy_sum() to int David Sterba
2025-04-23 15:57 ` [PATCH 12/12] btrfs: raid56: rename parameter err to status in endio helpers David Sterba
2025-04-24  5:34 ` [PATCH 00/12] Cleanups of blk_status_t use Qu Wenruo
2025-04-24  6:09   ` David Sterba
2025-04-25 13:38     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4449edabfc92dbfb133fbc483480621aaec2d640.1745422901.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox