diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/isofs/compress.c | 4 | ||||
-rw-r--r-- | fs/jffs2/compr_zlib.c | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/fs/isofs/compress.c b/fs/isofs/compress.c index 592e5115a561..f311bf084015 100644 --- a/fs/isofs/compress.c +++ b/fs/isofs/compress.c | |||
@@ -158,8 +158,8 @@ static loff_t zisofs_uncompress_block(struct inode *inode, loff_t block_start, | |||
158 | "zisofs: zisofs_inflate returned" | 158 | "zisofs: zisofs_inflate returned" |
159 | " %d, inode = %lu," | 159 | " %d, inode = %lu," |
160 | " page idx = %d, bh idx = %d," | 160 | " page idx = %d, bh idx = %d," |
161 | " avail_in = %d," | 161 | " avail_in = %ld," |
162 | " avail_out = %d\n", | 162 | " avail_out = %ld\n", |
163 | zerr, inode->i_ino, curpage, | 163 | zerr, inode->i_ino, curpage, |
164 | curbh, stream.avail_in, | 164 | curbh, stream.avail_in, |
165 | stream.avail_out); | 165 | stream.avail_out); |
diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index 0b9a1e44e833..5698dae5d92d 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c | |||
@@ -94,11 +94,12 @@ static int jffs2_zlib_compress(unsigned char *data_in, | |||
94 | 94 | ||
95 | while (def_strm.total_out < *dstlen - STREAM_END_SPACE && def_strm.total_in < *sourcelen) { | 95 | while (def_strm.total_out < *dstlen - STREAM_END_SPACE && def_strm.total_in < *sourcelen) { |
96 | def_strm.avail_out = *dstlen - (def_strm.total_out + STREAM_END_SPACE); | 96 | def_strm.avail_out = *dstlen - (def_strm.total_out + STREAM_END_SPACE); |
97 | def_strm.avail_in = min((unsigned)(*sourcelen-def_strm.total_in), def_strm.avail_out); | 97 | def_strm.avail_in = min_t(unsigned long, |
98 | jffs2_dbg(1, "calling deflate with avail_in %d, avail_out %d\n", | 98 | (*sourcelen-def_strm.total_in), def_strm.avail_out); |
99 | jffs2_dbg(1, "calling deflate with avail_in %ld, avail_out %ld\n", | ||
99 | def_strm.avail_in, def_strm.avail_out); | 100 | def_strm.avail_in, def_strm.avail_out); |
100 | ret = zlib_deflate(&def_strm, Z_PARTIAL_FLUSH); | 101 | ret = zlib_deflate(&def_strm, Z_PARTIAL_FLUSH); |
101 | jffs2_dbg(1, "deflate returned with avail_in %d, avail_out %d, total_in %ld, total_out %ld\n", | 102 | jffs2_dbg(1, "deflate returned with avail_in %ld, avail_out %ld, total_in %ld, total_out %ld\n", |
102 | def_strm.avail_in, def_strm.avail_out, | 103 | def_strm.avail_in, def_strm.avail_out, |
103 | def_strm.total_in, def_strm.total_out); | 104 | def_strm.total_in, def_strm.total_out); |
104 | if (ret != Z_OK) { | 105 | if (ret != Z_OK) { |