diff options
-rw-r--r-- | drivers/block/drbd/drbd_req.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 5ddb01edd933..57cbef2ecee1 100644 --- a/drivers/block/drbd/drbd_req.c +++ b/drivers/block/drbd/drbd_req.c | |||
@@ -123,11 +123,13 @@ void drbd_req_destroy(struct kref *kref) | |||
123 | * (local only or remote failed). | 123 | * (local only or remote failed). |
124 | * Other places where we set out-of-sync: | 124 | * Other places where we set out-of-sync: |
125 | * READ with local io-error */ | 125 | * READ with local io-error */ |
126 | if (!(s & RQ_NET_OK) || !(s & RQ_LOCAL_OK)) | 126 | if (!(s & RQ_POSTPONED)) { |
127 | drbd_set_out_of_sync(mdev, req->i.sector, req->i.size); | 127 | if (!(s & RQ_NET_OK) || !(s & RQ_LOCAL_OK)) |
128 | drbd_set_out_of_sync(mdev, req->i.sector, req->i.size); | ||
128 | 129 | ||
129 | if ((s & RQ_NET_OK) && (s & RQ_LOCAL_OK) && (s & RQ_NET_SIS)) | 130 | if ((s & RQ_NET_OK) && (s & RQ_LOCAL_OK) && (s & RQ_NET_SIS)) |
130 | drbd_set_in_sync(mdev, req->i.sector, req->i.size); | 131 | drbd_set_in_sync(mdev, req->i.sector, req->i.size); |
132 | } | ||
131 | 133 | ||
132 | /* one might be tempted to move the drbd_al_complete_io | 134 | /* one might be tempted to move the drbd_al_complete_io |
133 | * to the local io completion callback drbd_request_endio. | 135 | * to the local io completion callback drbd_request_endio. |
@@ -1046,6 +1048,7 @@ void __drbd_make_request(struct drbd_conf *mdev, struct bio *bio, unsigned long | |||
1046 | if (req->private_bio) { | 1048 | if (req->private_bio) { |
1047 | bio_put(req->private_bio); | 1049 | bio_put(req->private_bio); |
1048 | req->private_bio = NULL; | 1050 | req->private_bio = NULL; |
1051 | put_ldev(mdev); | ||
1049 | } | 1052 | } |
1050 | goto out; | 1053 | goto out; |
1051 | } | 1054 | } |