btrfs: fix incomplete parameter rename in btrfs_decompress
PATCH 1/1 btrfs: fix incomplete parameter rename in btrfs_decompress
Commit 2c25716dcc25 ("btrfs: zlib: fix and simplify the inline extent decompression") renamed the 'start_byte' parameter to 'dest_pgoff' in the btrfs_decompress(). The remaining 'start_byte' references are inconsistent with the actual implementation and may cause confusion for developers.
Ensure consistency between function declaration and implementation.
--- fs/btrfs/compression.c | 2 +- fs/btrfs/compression.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/compression.c +1 -1
@@ -1100,7 +1100,7 @@ static int btrfs_decompress_bio(struct compressed_bio *cb)/* * a less complex decompression routine. Our compressed data fits in a * single page, and we want to read a single page out of it. -* start_byte tells us the offset into the compressed data we're interested in +* dest_pgoff tells us the offset into the destination folio where we write the decompressed data */ int btrfs_decompress (int type,const u8 *data_in,struct folio *dest_folio,unsigned long dest_pgoff,size_t srclen,size_t destlen)
fs/btrfs/compression.h +1 -1
@@ -100,7 +100,7 @@ int btrfs_compress_folios(unsigned int type, int level, struct btrfs_inode *inod u64 start, struct folio **folios, unsigned long *out_folios, unsigned long *total_in, unsigned long *total_out);int btrfs_decompress (int type,const u8 *data_in,struct folio *dest_folio, -unsigned long start_byte,size_t srclen,size_t destlen); +unsigned long dest_pgoff,size_t srclen,size_t destlen);int btrfs_decompress_buf2page (const char *buf,u32 buf_len,struct compressed_bio *cb,u32 decompressed);
Signature · 1 line
2.20.1
Quoted 9 lines · Zhen Ni
Commit
2c25716dcc25("btrfs: zlib: fix and simplify the inline extent decompression") renamed the 'start_byte' parameter to 'dest_pgoff' in thebtrfs_decompress(). The remaining 'start_byte' references are inconsistent with the actual implementation and may cause confusion for developers.Ensure consistency between function declaration and implementation.
Fixes 2c25716dcc25 ("btrfs: zlib: fix and simplify the inline extent decompression")
The Fixes tak is not necessary for such changes, it's not a functional fix.
Quoted 1 line
Signed-off-by Zhen Ni <[email protected]>
Added to for-next, thanks.