This is a prerequisite for the "squashfs: support linear addressing". Signed-off-by: UCHINO Satoshi <satoshi.uchino@xxxxxxxxxxxxx> CC: Atsushi Nemoto <nemoto@xxxxxxxxxxxxxxxxxx> --- fs/squashfs/block.c | 3 ++- fs/squashfs/decompressor.h | 6 +++--- fs/squashfs/lzo_wrapper.c | 2 +- fs/squashfs/xz_wrapper.c | 2 +- fs/squashfs/zlib_wrapper.c | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/fs/squashfs/block.c b/fs/squashfs/block.c index fb50652..8127cce 100644 --- a/fs/squashfs/block.c +++ b/fs/squashfs/block.c @@ -94,6 +94,7 @@ int squashfs_read_data(struct super_block *sb, void **buffer, u64 index, int offset = index & ((1 << msblk->devblksize_log2) - 1); u64 cur_index = index >> msblk->devblksize_log2; int bytes, compressed, b = 0, k = 0, page = 0, avail; + const char *c_buffer = NULL; bh = kcalloc(((srclength + msblk->devblksize - 1) >> msblk->devblksize_log2) + 1, sizeof(*bh), GFP_KERNEL); @@ -160,7 +161,7 @@ int squashfs_read_data(struct super_block *sb, void **buffer, u64 index, if (compressed) { length = squashfs_decompress(msblk, buffer, bh, b, offset, - length, srclength, pages); + length, srclength, pages, c_buffer); if (length < 0) goto read_failure; } else { diff --git a/fs/squashfs/decompressor.h b/fs/squashfs/decompressor.h index 330073e..303143c 100644 --- a/fs/squashfs/decompressor.h +++ b/fs/squashfs/decompressor.h @@ -27,7 +27,7 @@ struct squashfs_decompressor { void *(*init)(struct squashfs_sb_info *, void *, int); void (*free)(void *); int (*decompress)(struct squashfs_sb_info *, void **, - struct buffer_head **, int, int, int, int, int); + struct buffer_head **, int, int, int, int, int, const void *); int id; char *name; int supported; @@ -42,10 +42,10 @@ static inline void squashfs_decompressor_free(struct squashfs_sb_info *msblk, static inline int squashfs_decompress(struct squashfs_sb_info *msblk, void **buffer, struct buffer_head **bh, int b, int offset, int length, - int srclength, int pages) + int srclength, int pages, const void *c_buffer) { return msblk->decompressor->decompress(msblk, buffer, bh, b, offset, - length, srclength, pages); + length, srclength, pages, c_buffer); } #ifdef CONFIG_SQUASHFS_XZ diff --git a/fs/squashfs/lzo_wrapper.c b/fs/squashfs/lzo_wrapper.c index 00f4dfc..0be87de 100644 --- a/fs/squashfs/lzo_wrapper.c +++ b/fs/squashfs/lzo_wrapper.c @@ -76,7 +76,7 @@ static void lzo_free(void *strm) static int lzo_uncompress(struct squashfs_sb_info *msblk, void **buffer, struct buffer_head **bh, int b, int offset, int length, int srclength, - int pages) + int pages, const void *c_buffer) { struct squashfs_lzo *stream = msblk->stream; void *buff = stream->input; diff --git a/fs/squashfs/xz_wrapper.c b/fs/squashfs/xz_wrapper.c index 1760b7d..4140040 100644 --- a/fs/squashfs/xz_wrapper.c +++ b/fs/squashfs/xz_wrapper.c @@ -105,7 +105,7 @@ static void squashfs_xz_free(void *strm) static int squashfs_xz_uncompress(struct squashfs_sb_info *msblk, void **buffer, struct buffer_head **bh, int b, int offset, int length, int srclength, - int pages) + int pages, const void *c_buffer) { enum xz_ret xz_err; int avail, total = 0, k = 0, page = 0; diff --git a/fs/squashfs/zlib_wrapper.c b/fs/squashfs/zlib_wrapper.c index 55d918f..01cdcc6 100644 --- a/fs/squashfs/zlib_wrapper.c +++ b/fs/squashfs/zlib_wrapper.c @@ -63,7 +63,7 @@ static void zlib_free(void *strm) static int zlib_uncompress(struct squashfs_sb_info *msblk, void **buffer, struct buffer_head **bh, int b, int offset, int length, int srclength, - int pages) + int pages, const void *c_buffer) { int zlib_err, zlib_init = 0; int k = 0, page = 0; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html