aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLars Ellenberg <lars.ellenberg@linbit.com>2011-05-16 09:31:45 -0400
committerPhilipp Reisner <philipp.reisner@linbit.com>2011-05-24 04:06:44 -0400
commit76727f684aa2d6a2dc59a7e5cf77e092a1bf4fb6 (patch)
tree59e80cf30c5cbf33f5179889025b8b0d7afdd970 /drivers/block
parentd2e17807e3799bae24664a92f4d2d3dade021e00 (diff)
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: 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_req.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 5c0c8be1bb0a..14645bd40092 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -1033,7 +1033,7 @@ fail_conflicting:
1033 err = 0; 1033 err = 0;
1034 1034
1035fail_free_complete: 1035fail_free_complete:
1036 if (rw == WRITE && local) 1036 if (req->rq_state & RQ_IN_ACT_LOG)
1037 drbd_al_complete_io(mdev, sector); 1037 drbd_al_complete_io(mdev, sector);
1038fail_and_free_req: 1038fail_and_free_req:
1039 if (local) { 1039 if (local) {