summaryrefslogtreecommitdiffstats
path: root/drivers/block/drbd/drbd_actlog.c
diff options
context:
space:
mode:
authorPhilipp Reisner <philipp.reisner@linbit.com>2011-07-04 11:14:31 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-05-09 10:28:51 +0200
commit4a2fe568b5428abc56d7d172e3571e33d8ab7265 (patch)
treee5e83c91e470b55fc0891db355a1133e8b40cf2b /drivers/block/drbd/drbd_actlog.c
parent0c464425158482647226fb30708c68fffc061585 (diff)
downloadlinux-4a2fe568b5428abc56d7d172e3571e33d8ab7265.tar.gz
linux-4a2fe568b5428abc56d7d172e3571e33d8ab7265.tar.bz2
linux-4a2fe568b5428abc56d7d172e3571e33d8ab7265.zip
drbd: Keep a reference to the bio until the completion handler finished
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Diffstat (limited to 'drivers/block/drbd/drbd_actlog.c')
-rw-r--r--drivers/block/drbd/drbd_actlog.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/block/drbd/drbd_actlog.c b/drivers/block/drbd/drbd_actlog.c
index aee599fad960..528342c82ba1 100644
--- a/drivers/block/drbd/drbd_actlog.c
+++ b/drivers/block/drbd/drbd_actlog.c
@@ -118,6 +118,7 @@ static int _drbd_md_sync_page_io(struct drbd_conf *mdev,
bio->bi_end_io = drbd_md_io_complete;
bio->bi_rw = rw;
+ bio_get(bio); /* one bio_put() is in the completion handler */
atomic_inc(&mdev->md_io_in_use); /* drbd_md_put_buffer() is in the completion handler */
if (drbd_insert_fault(mdev, (rw & WRITE) ? DRBD_FAULT_MD_WR : DRBD_FAULT_MD_RD))
bio_endio(bio, -EIO);