free(rdev);
dcr->spooling = true; /* turn on spooling again */
dcr->despooling = false;
-
- /*
- * We are done, so unblock the device, but if we have done a
- * commit, leave it locked so that the job cleanup does not
- * need to wait to release the device (no re-acquire of the lock).
+ /*
+ * Note, if committing we leave the device blocked. It will be removed in
+ * release_device();
*/
- dcr->dlock();
- unblock_device(dcr->dev);
- /* If doing a commit, leave the device locked -- unlocked in release_device() */
if (!commit) {
- dcr->dunlock();
+ dcr->dev->dunblock();
}
set_jcr_job_status(jcr, JS_Running);
dir_send_job_status(jcr);