]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/spool.c
Tweak SD debug code
[bacula/bacula] / bacula / src / stored / spool.c
index d40f7a85aecc082ee902cd70fdc681496f596e29..f2dde69b164465ef64511f6c93e7a556c75bd524 100644 (file)
@@ -358,17 +358,12 @@ static bool despool_data(DCR *dcr, bool commit)
    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);