Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309320
b: refs/heads/master
c: 6a9a92f
h: refs/heads/master
v: v3
  • Loading branch information
Lars Ellenberg authored and Philipp Reisner committed May 9, 2012
1 parent 09b12ce commit 9055e7f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ba3dac52126699e541ac3ee37aad890ca835fc1
refs/heads/master: 6a9a92f4ef05bb3e94bbfe123c21482fa5da9866
13 changes: 12 additions & 1 deletion trunk/drivers/block/drbd/drbd_worker.c
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,21 @@ void drbd_md_io_complete(struct bio *bio, int error)

md_io->error = error;

/* We grabbed an extra reference in _drbd_md_sync_page_io() to be able
* to timeout on the lower level device, and eventually detach from it.
* If this io completion runs after that timeout expired, this
* drbd_md_put_buffer() may allow us to finally try and re-attach.
* During normal operation, this only puts that extra reference
* down to 1 again.
* Make sure we first drop the reference, and only then signal
* completion, or we may (in drbd_al_read_log()) cycle so fast into the
* next drbd_md_sync_page_io(), that we trigger the
* ASSERT(atomic_read(&mdev->md_io_in_use) == 1) there.
*/
drbd_md_put_buffer(mdev);
md_io->done = 1;
wake_up(&mdev->misc_wait);
bio_put(bio);
drbd_md_put_buffer(mdev);
put_ldev(mdev);
}

Expand Down

0 comments on commit 9055e7f

Please sign in to comment.