diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/squashfs/block.c | 8 | ||||
-rw-r--r-- | fs/squashfs/xz_wrapper.c | 6 | ||||
-rw-r--r-- | fs/squashfs/zlib_wrapper.c | 6 |
3 files changed, 8 insertions, 12 deletions
diff --git a/fs/squashfs/block.c b/fs/squashfs/block.c index 2fb2882f0fa7..8ab48bc2fa7d 100644 --- a/fs/squashfs/block.c +++ b/fs/squashfs/block.c | |||
@@ -63,6 +63,14 @@ static struct buffer_head *get_block_length(struct super_block *sb, | |||
63 | *length = (unsigned char) bh->b_data[*offset] | | 63 | *length = (unsigned char) bh->b_data[*offset] | |
64 | (unsigned char) bh->b_data[*offset + 1] << 8; | 64 | (unsigned char) bh->b_data[*offset + 1] << 8; |
65 | *offset += 2; | 65 | *offset += 2; |
66 | |||
67 | if (*offset == msblk->devblksize) { | ||
68 | put_bh(bh); | ||
69 | bh = sb_bread(sb, ++(*cur_index)); | ||
70 | if (bh == NULL) | ||
71 | return NULL; | ||
72 | *offset = 0; | ||
73 | } | ||
66 | } | 74 | } |
67 | 75 | ||
68 | return bh; | 76 | return bh; |
diff --git a/fs/squashfs/xz_wrapper.c b/fs/squashfs/xz_wrapper.c index 856756ca5ee4..c4eb40018256 100644 --- a/fs/squashfs/xz_wrapper.c +++ b/fs/squashfs/xz_wrapper.c | |||
@@ -95,12 +95,6 @@ static int squashfs_xz_uncompress(struct squashfs_sb_info *msblk, void **buffer, | |||
95 | if (!buffer_uptodate(bh[k])) | 95 | if (!buffer_uptodate(bh[k])) |
96 | goto release_mutex; | 96 | goto release_mutex; |
97 | 97 | ||
98 | if (avail == 0) { | ||
99 | offset = 0; | ||
100 | put_bh(bh[k++]); | ||
101 | continue; | ||
102 | } | ||
103 | |||
104 | stream->buf.in = bh[k]->b_data + offset; | 98 | stream->buf.in = bh[k]->b_data + offset; |
105 | stream->buf.in_size = avail; | 99 | stream->buf.in_size = avail; |
106 | stream->buf.in_pos = 0; | 100 | stream->buf.in_pos = 0; |
diff --git a/fs/squashfs/zlib_wrapper.c b/fs/squashfs/zlib_wrapper.c index 818a5e063faf..4661ae2b1cec 100644 --- a/fs/squashfs/zlib_wrapper.c +++ b/fs/squashfs/zlib_wrapper.c | |||
@@ -82,12 +82,6 @@ static int zlib_uncompress(struct squashfs_sb_info *msblk, void **buffer, | |||
82 | if (!buffer_uptodate(bh[k])) | 82 | if (!buffer_uptodate(bh[k])) |
83 | goto release_mutex; | 83 | goto release_mutex; |
84 | 84 | ||
85 | if (avail == 0) { | ||
86 | offset = 0; | ||
87 | put_bh(bh[k++]); | ||
88 | continue; | ||
89 | } | ||
90 | |||
91 | stream->next_in = bh[k]->b_data + offset; | 85 | stream->next_in = bh[k]->b_data + offset; |
92 | stream->avail_in = avail; | 86 | stream->avail_in = avail; |
93 | offset = 0; | 87 | offset = 0; |