path: root/drivers/block/drbd/drbd_req.c
diff options
authorPhilipp Reisner <philipp.reisner@linbit.com>2012-08-29 15:23:14 +0200
committerPhilipp Reisner <philipp.reisner@linbit.com>2012-11-09 14:11:37 +0100
commit76590cd1fc338fd1c50f7121636db421deb8b881 (patch)
treeb73e77a7594fbdf2f4250e2c4700b273e3625899 /drivers/block/drbd/drbd_req.c
parent19fffd7b0303e8843aa2decfd43fa57c9d511409 (diff)
drbd: Fix postponed requests
A postponed request might has RQ_IN_ACT_LOG already set, but is POSTPONED before it gets something in the RQ_LOCAL_MASK set. Up to now this caused a left-over active extent. Fix that by only testing for the RQ_IN_ACT_LOG bit in drbd_req_destroy() 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_req.c')
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c
index 57cbef2ecee..d1d17fcd923 100644
--- a/drivers/block/drbd/drbd_req.c
+++ b/drivers/block/drbd/drbd_req.c
@@ -141,10 +141,9 @@ void drbd_req_destroy(struct kref *kref)
* but after the extent has been dropped from the al,
* we would forget to resync the corresponding extent.
- if (s & RQ_LOCAL_MASK) {
+ if (s & RQ_IN_ACT_LOG) {
if (get_ldev_if_state(mdev, D_FAILED)) {
- if (s & RQ_IN_ACT_LOG)
- drbd_al_complete_io(mdev, &req->i);
+ drbd_al_complete_io(mdev, &req->i);
} else if (__ratelimit(&drbd_ratelimit_state)) {
dev_warn(DEV, "Should have called drbd_al_complete_io(, %llu, %u), "