kernel/raid: Match xpt_alloc_ccb() and xpt_free_ccb() for rescan callbacks.
authorSascha Wildner <saw@online.de>
Sun, 4 Aug 2013 20:24:17 +0000 (22:24 +0200)
committerSascha Wildner <saw@online.de>
Sun, 4 Aug 2013 23:25:40 +0000 (01:25 +0200)
sys/dev/raid/aac/aac_cam.c
sys/dev/raid/mly/mly.c
sys/dev/raid/mps/mps_sas.c

index 926e43d..481cd4b 100644 (file)
@@ -152,7 +152,7 @@ aac_bus_scan_cb(struct cam_periph *periph, union ccb *ccb)
                        ccb->ccb_h.status);
 
        xpt_free_path(ccb->ccb_h.path);
-       kfree(ccb, M_TEMP);
+       xpt_free_ccb(ccb);
 }
 
 static void
index cb788a3..deddc5a 100644 (file)
@@ -2025,7 +2025,7 @@ mly_cam_rescan_btl(struct mly_softc *sc, int bus, int target)
 static void
 mly_cam_rescan_callback(struct cam_periph *periph, union ccb *ccb)
 {
-    kfree(ccb, M_TEMP);
+    xpt_free_ccb(ccb);
 }
 
 /********************************************************************************
index 6679cd0..fb23658 100644 (file)
@@ -287,7 +287,7 @@ mpssas_rescan_target(struct mps_softc *sc, struct mpssas_target *targ)
        /*
         * Allocate a CCB and schedule a rescan.
         */
-       ccb = kmalloc(sizeof(union ccb), M_TEMP, M_WAITOK | M_ZERO);
+       ccb = xpt_alloc_ccb();
 
        if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, pathid,
                            targetid, CAM_LUN_WILDCARD) != CAM_REQ_CMP) {