diff options
| author | Qu Wenruo <wqu@suse.com> | 2026-01-20 10:30:08 +1030 |
|---|---|---|
| committer | David Sterba <dsterba@suse.com> | 2026-02-03 07:56:17 +0100 |
| commit | 37cc07cab7dc311f2b7aeaaa7598face53eddcab (patch) | |
| tree | 5a23b410466a216b825b62f6673e817c31bfcf65 /include/linux/i2c/git@git.tavy.me:linux.git | |
| parent | 4b7ecd0984e34262430b9db7efbfaf293b4b4d3c (diff) | |
btrfs: lzo: use folio_iter to handle lzo_decompress_bio()
Currently lzo_decompress_bio() is using
compressed_bio->compressed_folios[] array to grab each compressed folio.
This is making the code much easier to read, as we only need to maintain
a single iterator, @cur_in, and can easily grab any random folio using
@cur_in >> min_folio_shift as an index.
However lzo_decompress_bio() itself is ensured to only advance to the
next folio at one time, and compressed_folios[] is just a pointer to
each folio of the compressed bio, thus we have no real random access
requirement for lzo_decompress_bio().
Replace the compressed_folios[] access by a helper, get_current_folio(),
which uses folio_iter and an external folio counter to properly switch
the folio when needed.
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/linux/i2c/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
