Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/pkl/squashfs-linus
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Linus Torvalds committed May 13, 2009
2 parents a6aeeeb + e5d2875 commit 210af91
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 0 additions & 1 deletion fs/squashfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions fs/squashfs/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
10 changes: 10 additions & 0 deletions fs/squashfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 210af91

Please sign in to comment.