summaryrefslogtreecommitdiff
path: root/drivers/block
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-01-20 15:49:33 (GMT)
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-03-10 10:47:59 (GMT)
commitd07c9c10e5620c632aae9cac2b609033398f6139 (patch)
tree32bc11c4e9093068f4a363c6d8a8b77316350209 /drivers/block
parentcd88d030d41a9b0100fd5fee872024e6ebc8b276 (diff)
downloadlinux-fsl-qoriq-d07c9c10e5620c632aae9cac2b609033398f6139.tar.xz
drbd: We can not process BIOs with a size of 0
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/drbd/drbd_receiver.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c
index 432fe8f..e935493 100644
--- a/drivers/block/drbd/drbd_receiver.c
+++ b/drivers/block/drbd/drbd_receiver.c
@@ -1237,6 +1237,7 @@ read_in_block(struct drbd_conf *mdev, u64 id, sector_t sector, int data_size) __
data_size -= dgs;
+ ERR_IF(data_size == 0) return NULL;
ERR_IF(data_size & 0x1ff) return NULL;
ERR_IF(data_size > DRBD_MAX_BIO_SIZE) return NULL;