From: Kern Sibbald Date: Wed, 3 Dec 2008 08:48:58 +0000 (+0000) Subject: Apply 2.4.3-sd-deadlock.patch that should fix bug #1192. X-Git-Tag: Release-2.4.4~24 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=032e124cafeb885cbb97fb107e064739a9dedd6a;p=bacula%2Fbacula Apply 2.4.3-sd-deadlock.patch that should fix bug #1192. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/branches/Branch-2.4@8107 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/stored/acquire.c b/bacula/src/stored/acquire.c index 5b1cc95cee..d02010bf83 100644 --- a/bacula/src/stored/acquire.c +++ b/bacula/src/stored/acquire.c @@ -647,8 +647,8 @@ void detach_dcr_from_dev(DCR *dcr) /* Detach this dcr only if attached */ if (dcr->attached_to_dev && dev) { - dev->dlock(); dcr->unreserve_device(); + dev->dlock(); dcr->dev->attached_dcrs->remove(dcr); /* detach dcr from device */ dcr->attached_to_dev = false; // remove_dcr_from_dcrs(dcr); /* remove dcr from jcr list */ diff --git a/bacula/src/stored/reserve.c b/bacula/src/stored/reserve.c index 1c0f5f8dfd..6ee2604cdb 100644 --- a/bacula/src/stored/reserve.c +++ b/bacula/src/stored/reserve.c @@ -498,6 +498,7 @@ void DCR::clear_reserved() void DCR::unreserve_device() { lock_volumes(); + dev->dlock(); if (is_reserved()) { clear_reserved(); reserved_volume = false; @@ -513,6 +514,7 @@ void DCR::unreserve_device() volume_unused(this); } } + dev->dunlock(); unlock_volumes(); } diff --git a/bacula/src/version.h b/bacula/src/version.h index ed2d57a551..9c3a43eb23 100644 --- a/bacula/src/version.h +++ b/bacula/src/version.h @@ -4,8 +4,8 @@ #undef VERSION #define VERSION "2.4.4" -#define BDATE "07 November 2008" -#define LSMDATE "07Nov08" +#define BDATE "03 December 2008" +#define LSMDATE "03Dec08" #define PROG_COPYRIGHT "Copyright (C) %d-2008 Free Software Foundation Europe e.V.\n" #define BYEAR "2008" /* year for copyright messages in progs */ diff --git a/bacula/technotes-2.4 b/bacula/technotes-2.4 index 8f4fa325f4..3d29915324 100644 --- a/bacula/technotes-2.4 +++ b/bacula/technotes-2.4 @@ -1,6 +1,8 @@ Technical notes on version 2.4 General: +03Dec08 +kes Apply 2.4.3-sd-deadlock.patch that should fix bug #1192. 02Dec08 ebl Remove extra db_lock() in get_prune_list_for_volume() ebl Apply 2.4.3-prune-deadlock.patch that fixes a problem when