Skip to content

Commit dd21e97

Browse files
nizhen-tkdave
authored andcommitted
btrfs: fix incomplete parameter rename in btrfs_decompress()
Commit 2c25716 ("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. Signed-off-by: Zhen Ni <zhen.ni@easystack.cn> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent e315143 commit dd21e97

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

fs/btrfs/compression.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,8 @@ static int btrfs_decompress_bio(struct compressed_bio *cb)
10841084
/*
10851085
* a less complex decompression routine. Our compressed data fits in a
10861086
* single page, and we want to read a single page out of it.
1087-
* start_byte tells us the offset into the compressed data we're interested in
1087+
* dest_pgoff tells us the offset into the destination folio where we write the
1088+
* decompressed data.
10881089
*/
10891090
int btrfs_decompress(int type, const u8 *data_in, struct folio *dest_folio,
10901091
unsigned long dest_pgoff, size_t srclen, size_t destlen)

fs/btrfs/compression.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ int btrfs_compress_folios(unsigned int type, int level, struct btrfs_inode *inod
9595
u64 start, struct folio **folios, unsigned long *out_folios,
9696
unsigned long *total_in, unsigned long *total_out);
9797
int btrfs_decompress(int type, const u8 *data_in, struct folio *dest_folio,
98-
unsigned long start_byte, size_t srclen, size_t destlen);
98+
unsigned long dest_pgoff, size_t srclen, size_t destlen);
9999
int btrfs_decompress_buf2page(const char *buf, u32 buf_len,
100100
struct compressed_bio *cb, u32 decompressed);
101101

0 commit comments

Comments
 (0)