Squashfs is broken on any system where the page size is larger than
the metadata size (8192). This is easily fixed by ensuring cache->pages
is always > 0.
[
[email protected]: coding-style fixes]
Signed-off-by: Doug Chapman <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Phillip Lougher <[email protected]>
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);