Page MenuHomeFreeBSD

D15517.id42821.diff
No OneTemporary

D15517.id42821.diff

Index: sys/cam/nvme/nvme_da.c
===================================================================
--- sys/cam/nvme/nvme_da.c
+++ sys/cam/nvme/nvme_da.c
@@ -1059,6 +1059,8 @@
cam_iosched_bio_complete(softc->cam_iosched, bp, done_ccb);
xpt_release_ccb(done_ccb);
ndaschedule(periph);
+ KASSERT(softc->refcount >= 1, ("ndadone softc %p refcount %d", softc, softc->refcount));
+ softc->refcount--; /* Release the periph refcount taken in mdastart() for each CCB. *.
cam_periph_unlock(periph);
biodone(bp);
} else { /* state == NDA_CCB_TRIM */
@@ -1086,6 +1088,8 @@
cam_iosched_bio_complete(softc->cam_iosched, bp1, done_ccb);
xpt_release_ccb(done_ccb);
ndaschedule(periph);
+ KASSERT(softc->refcount >= 1, ("ndadone softc %p refcount %d", softc, softc->refcount));
+ softc->refcount--; /* Release the periph refcount taken in mdastart() for each CCB. *.
cam_periph_unlock(periph);
while ((bp2 = TAILQ_FIRST(&queue)) != NULL) {
TAILQ_REMOVE(&queue, bp2, bio_queue);
@@ -1100,11 +1104,6 @@
biodone(bp2);
}
}
- /*
- * Release the periph refcount taken in mdastart() for each CCB.
- */
- KASSERT(softc->refcount >= 1, ("ndadone softc %p refcount %d", softc, softc->refcount));
- softc->refcount--;
return;
}
case NDA_CCB_DUMP:

File Metadata

Mime Type
text/plain
Expires
Mon, Feb 9, 3:09 AM (4 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28529416
Default Alt Text
D15517.id42821.diff (1 KB)

Event Timeline