[DRBD-cvs] svn commit by phil - r2657 - trunk/drbd - Simon pointed
this out. http://lists.linbit.com/piperma
drbd-cvs at lists.linbit.com
drbd-cvs at lists.linbit.com
Mon Jan 8 10:47:57 CET 2007
Author: phil
Date: 2007-01-08 10:47:56 +0100 (Mon, 08 Jan 2007)
New Revision: 2657
Modified:
trunk/drbd/drbd_req.c
Log:
Simon pointed this out.
http://lists.linbit.com/pipermail/drbd-dev/2007-January/000599.html
The dec_local() has to happen, of course, after we will no longer
reference to anything of this request, this is also true for the
entries in the AL.
Since _req_may_be_done() might call drbd_al_complete_io() we have
to do the dec_local() after _req_may_be_done().
This fixes a possible BUG() in lru_cache.c:120
Modified: trunk/drbd/drbd_req.c
===================================================================
--- trunk/drbd/drbd_req.c 2007-01-04 14:52:53 UTC (rev 2656)
+++ trunk/drbd/drbd_req.c 2007-01-08 09:47:56 UTC (rev 2657)
@@ -437,12 +437,12 @@
bio_put(req->private_bio);
req->private_bio = NULL;
- dec_local(mdev);
req->rq_state |= (RQ_LOCAL_COMPLETED|RQ_LOCAL_OK);
req->rq_state &= ~RQ_LOCAL_PENDING;
_req_may_be_done(req,error);
+ dec_local(mdev);
break;
case write_completed_with_error:
@@ -451,13 +451,13 @@
bio_put(req->private_bio);
req->private_bio = NULL;
- dec_local(mdev);
ALERT("Local WRITE failed sec=%llus size=%u\n",
(unsigned long long)req->sector, req->size);
/* and now: check how to handle local io error.
* FIXME see comment below in read_completed_with_error */
__drbd_chk_io_error(mdev,FALSE);
_req_may_be_done(req,error);
+ dec_local(mdev);
break;
case read_completed_with_error:
More information about the drbd-cvs
mailing list