zram: Prevent overflow in logical block size
authorRobert Jennings <rcj@linux.vnet.ibm.com>
Fri, 28 Jan 2011 14:58:17 +0000 (08:58 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 4 Feb 2011 21:29:11 +0000 (13:29 -0800)
commit7b19b8d45b216ff3186f066b31937bdbde066f08
treefa0264a6010c8e1833a1839726aa003e5f456885
parentf3bc232c2eb1dac5ac3dbaca0099ce51a615a478
zram: Prevent overflow in logical block size

On a 64K page kernel, the value PAGE_SIZE passed to
blk_queue_logical_block_size would overflow the logical block size
argument (resulting in setting it to 0).

This patch sets the logical block size to 4096, using a new
ZRAM_LOGICAL_BLOCK_SIZE constant.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/zram/zram_drv.c
drivers/staging/zram/zram_drv.h