s390/dcssblk: fix device size calculation in dcssblk_direct_access()
authorGerald Schaefer <gerald.schaefer@de.ibm.com>
Mon, 30 Jan 2017 14:52:14 +0000 (15:52 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Mar 2017 01:57:12 +0000 (09:57 +0800)
commit792bd1fb5b0338232e47412bce2a9b6f0f1fbdaf
tree2ac2b0ffae5d4e3eb74ba8ee0afe91ef1c00549b
parentec50c80c780152d2058c23d9e246fc81f73742da
s390/dcssblk: fix device size calculation in dcssblk_direct_access()

commit a63f53e34db8b49675448d03ae324f6c5bc04fe6 upstream.

Since commit dd22f551 "block: Change direct_access calling convention",
the device size calculation in dcssblk_direct_access() is off-by-one.
This results in bdev_direct_access() always returning -ENXIO because the
returned value is not page aligned.

Fix this by adding 1 to the dev_sz calculation.

Fixes: dd22f551 ("block: Change direct_access calling convention")
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/s390/block/dcssblk.c