提交 76727f68 编写于 作者: L Lars Ellenberg 提交者: Philipp Reisner

drbd: fix potential activity log refcount imbalance in error path

It is no longer sufficient to trigger on local WRITE,
we need to check on (rq_state & RQ_IN_ACT_LOG)
before calling drbd_al_complete_io also in the error path.
Signed-off-by: NPhilipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: NLars Ellenberg <lars.ellenberg@linbit.com>
上级 d2e17807
...@@ -1033,7 +1033,7 @@ static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, uns ...@@ -1033,7 +1033,7 @@ static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, uns
err = 0; err = 0;
fail_free_complete: fail_free_complete:
if (rw == WRITE && local) if (req->rq_state & RQ_IN_ACT_LOG)
drbd_al_complete_io(mdev, sector); drbd_al_complete_io(mdev, sector);
fail_and_free_req: fail_and_free_req:
if (local) { if (local) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册