Merge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus: Squashfs: cody tidying, remove commented out line in Makefile Squashfs: check page size is not larger than the filesystem block size Squashfs: fix breakage when page size > metadata block size
This commit is contained in:
Коммит
210af919c9
|
@ -5,4 +5,3 @@
|
|||
obj-$(CONFIG_SQUASHFS) += squashfs.o
|
||||
squashfs-y += block.o cache.o dir.o export.o file.o fragment.o id.o inode.o
|
||||
squashfs-y += namei.o super.o symlink.o
|
||||
#squashfs-y += squashfs2_0.o
|
||||
|
|
|
@ -252,6 +252,7 @@ struct squashfs_cache *squashfs_cache_init(char *name, int entries,
|
|||
cache->entries = entries;
|
||||
cache->block_size = block_size;
|
||||
cache->pages = block_size >> PAGE_CACHE_SHIFT;
|
||||
cache->pages = cache->pages ? cache->pages : 1;
|
||||
cache->name = name;
|
||||
cache->num_waiters = 0;
|
||||
spin_lock_init(&cache->lock);
|
||||
|
|
|
@ -157,6 +157,16 @@ static int squashfs_fill_super(struct super_block *sb, void *data, int silent)
|
|||
if (msblk->block_size > SQUASHFS_FILE_MAX_SIZE)
|
||||
goto failed_mount;
|
||||
|
||||
/*
|
||||
* Check the system page size is not larger than the filesystem
|
||||
* block size (by default 128K). This is currently not supported.
|
||||
*/
|
||||
if (PAGE_CACHE_SIZE > msblk->block_size) {
|
||||
ERROR("Page size > filesystem block size (%d). This is "
|
||||
"currently not supported!\n", msblk->block_size);
|
||||
goto failed_mount;
|
||||
}
|
||||
|
||||
msblk->block_log = le16_to_cpu(sblk->block_log);
|
||||
if (msblk->block_log > SQUASHFS_FILE_MAX_LOG)
|
||||
goto failed_mount;
|
||||
|
|
Загрузка…
Ссылка в новой задаче