]> git.itanic.dy.fi Git - linux-stable/commit
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 02:20:06 +0000 (10:20 +0800)
commit1f2659aa7dfe2596e0d102f2cf61f20d3266f2f5
tree8c7b8bc57d0bd3828cef2b905bc802821ea12c28
parent3c3c4d25c5897b3484ce33dc6577913ce1fe8701
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