diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-13 16:33:25 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-05-13 16:33:25 -0700 |
commit | 210af919c949a7d6bd330916ef376cec2907d81e (patch) | |
tree | b2d66ca5d30b807cc8a55bbc524e85406888b66c /fs | |
parent | a6aeeebf5179ea6346249d727bdb9124ce9e2d4c (diff) | |
parent | e5d287539dba264a1d9d7607a25b8c8c61c9d658 (diff) | |
download | kernel_samsung_espresso10-210af919c949a7d6bd330916ef376cec2907d81e.zip kernel_samsung_espresso10-210af919c949a7d6bd330916ef376cec2907d81e.tar.gz kernel_samsung_espresso10-210af919c949a7d6bd330916ef376cec2907d81e.tar.bz2 |
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
Diffstat (limited to 'fs')
-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 8258cf9..70e3244 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 1c4739e..40c98fa 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 ffa6edc..0adc624 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; |