Skip to content

Commit

Permalink
btrfs: constify buffers used by compression helpers
Browse files Browse the repository at this point in the history
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
David Sterba committed Feb 28, 2017
1 parent 9ed5736 commit 14a3357
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fs/btrfs/compression.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ void btrfs_exit_compress(void)
*
* total_out is the last byte of the buffer
*/
int btrfs_decompress_buf2page(char *buf, unsigned long buf_start,
int btrfs_decompress_buf2page(const char *buf, unsigned long buf_start,
unsigned long total_out, u64 disk_start,
struct bio *bio)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/compression.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ int btrfs_compress_pages(int type, struct address_space *mapping,
unsigned long max_out);
int btrfs_decompress(int type, unsigned char *data_in, struct page *dest_page,
unsigned long start_byte, size_t srclen, size_t destlen);
int btrfs_decompress_buf2page(char *buf, unsigned long buf_start,
int btrfs_decompress_buf2page(const char *buf, unsigned long buf_start,
unsigned long total_out, u64 disk_start,
struct bio *bio);

Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/lzo.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ static inline void write_compress_length(char *buf, size_t len)
memcpy(buf, &dlen, LZO_LEN);
}

static inline size_t read_compress_length(char *buf)
static inline size_t read_compress_length(const char *buf)
{
__le32 dlen;

Expand Down

0 comments on commit 14a3357

Please sign in to comment.