summaryrefslogtreecommitdiffstats
path: root/fs/squashfs/cache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-13 16:33:25 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-13 16:33:25 -0700
commit210af919c949a7d6bd330916ef376cec2907d81e (patch)
treeb2d66ca5d30b807cc8a55bbc524e85406888b66c /fs/squashfs/cache.c
parenta6aeeebf5179ea6346249d727bdb9124ce9e2d4c (diff)
parente5d287539dba264a1d9d7607a25b8c8c61c9d658 (diff)
downloadlinux-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/squashfs/cache.c')
-rw-r--r--fs/squashfs/cache.c1
1 files changed, 1 insertions, 0 deletions
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);