Commit eb9a85f8 authored by Lars Ellenberg's avatar Lars Ellenberg Committed by Philipp Reisner

fix ldev reference count imbalance on fault injection

Signed-off-by: default avatarPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: default avatarLars Ellenberg <lars.ellenberg@linbit.com>
parent 08c8caf6
......@@ -279,6 +279,9 @@ struct drbd_epoch_entry *drbd_alloc_ee(struct drbd_conf *mdev,
struct bio *bio;
unsigned int ds;
if (FAULT_ACTIVE(mdev, DRBD_FAULT_AL_EE))
return NULL;
e = mempool_alloc(drbd_ee_mempool, gfp_mask & ~__GFP_HIGHMEM);
if (!e) {
if (!(gfp_mask & __GFP_NOWARN))
......
......@@ -375,9 +375,6 @@ static int read_for_csum(struct drbd_conf *mdev, sector_t sector, int size)
if (!get_ldev(mdev))
return 0;
if (FAULT_ACTIVE(mdev, DRBD_FAULT_AL_EE))
return 2;
/* GFP_TRY, because if there is no memory available right now, this may
* be rescheduled for later. It is "only" background resync, after all. */
e = drbd_alloc_ee(mdev, DRBD_MAGIC+0xbeef, sector, size, GFP_TRY);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment