diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-14 01:33:25 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-14 01:33:25 +0200 |
commit | 210af919c949a7d6bd330916ef376cec2907d81e (patch) | |
tree | b2d66ca5d30b807cc8a55bbc524e85406888b66c | |
parent | Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/msz... (diff) | |
parent | Squashfs: cody tidying, remove commented out line in Makefile (diff) | |
download | linux-210af919c949a7d6bd330916ef376cec2907d81e.tar.xz linux-210af919c949a7d6bd330916ef376cec2907d81e.zip |
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
-rw-r--r-- | fs/squashfs/Makefile | 1 | ||||
-rw-r--r-- | fs/squashfs/cache.c | 1 | ||||
-rw-r--r-- | fs/squashfs/super.c | 10 |
3 files changed, 11 insertions, 1 deletions
diff --git a/fs/squashfs/Makefile b/fs/squashfs/Makefile index 8258cf9a0317..70e3244fa30f 100644 --- a/fs/squashfs/Makefile +++ b/fs/squashfs/Makefile @@ -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 diff --git a/fs/squashfs/cache.c b/fs/squashfs/cache.c index 1c4739e33af6..40c98fa6b5d6 100644 --- a/fs/squashfs/cache.c +++ b/fs/squashfs/cache.c @@ -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); diff --git a/fs/squashfs/super.c b/fs/squashfs/super.c index ffa6edcd2d0c..0adc624c956f 100644 --- a/fs/squashfs/super.c +++ b/fs/squashfs/super.c @@ -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; |