Skip to content

Commit beaa7cd

Browse files
committed
btrfs: rename ret to status in btrfs_submit_chunk()
We're using 'status' for the blk_status_t variables, rename 'ret' so we can use it for proper return type. Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent 64c1319 commit beaa7cd

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

fs/btrfs/bio.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num)
674674
bool use_append = btrfs_use_zone_append(bbio);
675675
struct btrfs_io_context *bioc = NULL;
676676
struct btrfs_io_stripe smap;
677-
blk_status_t ret;
677+
blk_status_t status;
678678
int error;
679679

680680
if (!bbio->inode || btrfs_is_data_reloc_root(inode->root))
@@ -686,7 +686,7 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num)
686686
error = btrfs_map_block(fs_info, btrfs_op(bio), logical, &map_length,
687687
&bioc, &smap, &mirror_num);
688688
if (error) {
689-
ret = errno_to_blk_status(error);
689+
status = errno_to_blk_status(error);
690690
btrfs_bio_counter_dec(fs_info);
691691
goto end_bbio;
692692
}
@@ -700,7 +700,7 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num)
700700

701701
split = btrfs_split_bio(fs_info, bbio, map_length);
702702
if (IS_ERR(split)) {
703-
ret = errno_to_blk_status(PTR_ERR(split));
703+
status = errno_to_blk_status(PTR_ERR(split));
704704
btrfs_bio_counter_dec(fs_info);
705705
goto end_bbio;
706706
}
@@ -715,8 +715,8 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num)
715715
if (bio_op(bio) == REQ_OP_READ && is_data_bbio(bbio)) {
716716
bbio->saved_iter = bio->bi_iter;
717717
error = btrfs_lookup_bio_sums(bbio);
718-
ret = errno_to_blk_status(error);
719-
if (ret)
718+
status = errno_to_blk_status(error);
719+
if (status)
720720
goto fail;
721721
}
722722

@@ -749,14 +749,14 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num)
749749
goto done;
750750

751751
error = btrfs_bio_csum(bbio);
752-
ret = errno_to_blk_status(error);
753-
if (ret)
752+
status = errno_to_blk_status(error);
753+
if (status)
754754
goto fail;
755755
} else if (use_append ||
756756
(btrfs_is_zoned(fs_info) && inode &&
757757
inode->flags & BTRFS_INODE_NODATASUM)) {
758-
ret = btrfs_alloc_dummy_sum(bbio);
759-
if (ret)
758+
status = btrfs_alloc_dummy_sum(bbio);
759+
if (status)
760760
goto fail;
761761
}
762762
}
@@ -777,10 +777,10 @@ static bool btrfs_submit_chunk(struct btrfs_bio *bbio, int mirror_num)
777777
ASSERT(bbio->bio.bi_pool == &btrfs_clone_bioset);
778778
ASSERT(remaining);
779779

780-
btrfs_bio_end_io(remaining, ret);
780+
btrfs_bio_end_io(remaining, status);
781781
}
782782
end_bbio:
783-
btrfs_bio_end_io(bbio, ret);
783+
btrfs_bio_end_io(bbio, status);
784784
/* Do not submit another chunk */
785785
return true;
786786
}

0 commit comments

Comments
 (0)