diff options
Diffstat (limited to 'fs/squashfs/super.c')
-rw-r--r-- | fs/squashfs/super.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c index 60553a9053ca..202df6312d4e 100644 --- a/fs/squashfs/super.c +++ b/fs/squashfs/super.c | |||
@@ -98,7 +98,6 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent) | |||
98 | msblk->devblksize = sb_min_blocksize(sb, SQUASHFS_DEVBLK_SIZE); | 98 | msblk->devblksize = sb_min_blocksize(sb, SQUASHFS_DEVBLK_SIZE); |
99 | msblk->devblksize_log2 = ffz(~msblk->devblksize); | 99 | msblk->devblksize_log2 = ffz(~msblk->devblksize); |
100 | 100 | ||
101 | mutex_init(&msblk->read_data_mutex); | ||
102 | mutex_init(&msblk->meta_index_mutex); | 101 | mutex_init(&msblk->meta_index_mutex); |
103 | 102 | ||
104 | /* | 103 | /* |
@@ -206,13 +205,14 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent) | |||
206 | goto failed_mount; | 205 | goto failed_mount; |
207 | 206 | ||
208 | /* Allocate read_page block */ | 207 | /* Allocate read_page block */ |
209 | msblk->read_page = squashfs_cache_init("data", 1, msblk->block_size); | 208 | msblk->read_page = squashfs_cache_init("data", |
209 | squashfs_max_decompressors(), msblk->block_size); | ||
210 | if (msblk->read_page == NULL) { | 210 | if (msblk->read_page == NULL) { |
211 | ERROR("Failed to allocate read_page block\n"); | 211 | ERROR("Failed to allocate read_page block\n"); |
212 | goto failed_mount; | 212 | goto failed_mount; |
213 | } | 213 | } |
214 | 214 | ||
215 | msblk->stream = squashfs_decompressor_init(sb, flags); | 215 | msblk->stream = squashfs_decompressor_setup(sb, flags); |
216 | if (IS_ERR(msblk->stream)) { | 216 | if (IS_ERR(msblk->stream)) { |
217 | err = PTR_ERR(msblk->stream); | 217 | err = PTR_ERR(msblk->stream); |
218 | msblk->stream = NULL; | 218 | msblk->stream = NULL; |
@@ -336,7 +336,7 @@ failed_mount: | |||
336 | squashfs_cache_delete(msblk->block_cache); | 336 | squashfs_cache_delete(msblk->block_cache); |
337 | squashfs_cache_delete(msblk->fragment_cache); | 337 | squashfs_cache_delete(msblk->fragment_cache); |
338 | squashfs_cache_delete(msblk->read_page); | 338 | squashfs_cache_delete(msblk->read_page); |
339 | squashfs_decompressor_free(msblk, msblk->stream); | 339 | squashfs_decompressor_destroy(msblk); |
340 | kfree(msblk->inode_lookup_table); | 340 | kfree(msblk->inode_lookup_table); |
341 | kfree(msblk->fragment_index); | 341 | kfree(msblk->fragment_index); |
342 | kfree(msblk->id_table); | 342 | kfree(msblk->id_table); |
@@ -383,7 +383,7 @@ static void squashfs_put_super(struct super_block *sb) | |||
383 | squashfs_cache_delete(sbi->block_cache); | 383 | squashfs_cache_delete(sbi->block_cache); |
384 | squashfs_cache_delete(sbi->fragment_cache); | 384 | squashfs_cache_delete(sbi->fragment_cache); |
385 | squashfs_cache_delete(sbi->read_page); | 385 | squashfs_cache_delete(sbi->read_page); |
386 | squashfs_decompressor_free(sbi, sbi->stream); | 386 | squashfs_decompressor_destroy(sbi); |
387 | kfree(sbi->id_table); | 387 | kfree(sbi->id_table); |
388 | kfree(sbi->fragment_index); | 388 | kfree(sbi->fragment_index); |
389 | kfree(sbi->meta_index); | 389 | kfree(sbi->meta_index); |