diff options
author | Philipp Reisner <philipp.reisner@linbit.com> | 2011-01-20 10:49:33 -0500 |
---|---|---|
committer | Philipp Reisner <philipp.reisner@linbit.com> | 2011-03-10 05:47:59 -0500 |
commit | d07c9c10e5620c632aae9cac2b609033398f6139 (patch) | |
tree | 32bc11c4e9093068f4a363c6d8a8b77316350209 /drivers/block | |
parent | cd88d030d41a9b0100fd5fee872024e6ebc8b276 (diff) |
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.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_receiver.c b/drivers/block/drbd/drbd_receiver.c index 432fe8f6b5d2..e9354931eace 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) __ | |||
1237 | 1237 | ||
1238 | data_size -= dgs; | 1238 | data_size -= dgs; |
1239 | 1239 | ||
1240 | ERR_IF(data_size == 0) return NULL; | ||
1240 | ERR_IF(data_size & 0x1ff) return NULL; | 1241 | ERR_IF(data_size & 0x1ff) return NULL; |
1241 | ERR_IF(data_size > DRBD_MAX_BIO_SIZE) return NULL; | 1242 | ERR_IF(data_size > DRBD_MAX_BIO_SIZE) return NULL; |
1242 | 1243 | ||