Skip to content

Commit

Permalink
drbd: fix potential activity log refcount imbalance in error path
Browse files Browse the repository at this point in the history
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: Philipp Reisner <[email protected]>
Signed-off-by: Lars Ellenberg <[email protected]>
  • Loading branch information
lge authored and Philipp-Reisner committed May 24, 2011
1 parent d2e1780 commit 76727f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/block/drbd/drbd_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ static int drbd_make_request_common(struct drbd_conf *mdev, struct bio *bio, uns
err = 0;

fail_free_complete:
if (rw == WRITE && local)
if (req->rq_state & RQ_IN_ACT_LOG)
drbd_al_complete_io(mdev, sector);
fail_and_free_req:
if (local) {
Expand Down

0 comments on commit 76727f6

Please sign in to comment.