summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2026-02-20 06:41:50 +0300
committerDavid Sterba <dsterba@suse.com>2026-04-07 19:55:59 +0300
commitc4bc2dd32c63a70ed948ed9927ea2c46f7c5b454 (patch)
treec6a2e2573351ba9d4d15f6b61d4066d7e7b05ce3 /include
parent8c0b917d78fc2a1fb4afac90a597b75e0a5b7223 (diff)
downloadlinux-c4bc2dd32c63a70ed948ed9927ea2c46f7c5b454.tar.xz
btrfs: introduce a common helper to calculate the size of a bio
We have several call sites doing the same work to calculate the size of a bio: struct bio_vec *bvec; u32 bio_size = 0; int i; bio_for_each_bvec_all(bvec, bio, i) bio_size += bvec->bv_len; We can use a common helper instead of open-coding it everywhere. This also allows us to constify the @bio_size variables used in all the call sites. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions