summaryrefslogtreecommitdiffstats
path: root/fs/squashfs/super.c
diff options
context:
space:
mode:
authorLinus Torvalds2009-05-14 01:33:25 +0200
committerLinus Torvalds2009-05-14 01:33:25 +0200
commit210af919c949a7d6bd330916ef376cec2907d81e (patch)
treeb2d66ca5d30b807cc8a55bbc524e85406888b66c /fs/squashfs/super.c
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/msz... (diff)
parentSquashfs: cody tidying, remove commented out line in Makefile (diff)
downloadkernel-qcow2-linux-210af919c949a7d6bd330916ef376cec2907d81e.tar.gz
kernel-qcow2-linux-210af919c949a7d6bd330916ef376cec2907d81e.tar.xz
kernel-qcow2-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
Diffstat (limited to 'fs/squashfs/super.c')
-rw-r--r--fs/squashfs/super.c10
1 files changed, 10 insertions, 0 deletions
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;