]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/stored/lock.c
Backport from Bacula Enterprise
[bacula/bacula] / bacula / src / stored / lock.c
index f0459e912ed397c41f5e54f722d5c2dc4d84aea2..0fea98821be636a48b8f5975203f5590ec9b4f20 100644 (file)
@@ -1,17 +1,21 @@
 /*
-   Bacula® - The Network Backup Solution
+   Bacula(R) - The Network Backup Solution
 
+   Copyright (C) 2000-2015 Kern Sibbald
    Copyright (C) 2000-2014 Free Software Foundation Europe e.V.
 
-   The main author of Bacula is Kern Sibbald, with contributions from many
-   others, a complete list can be found in the file AUTHORS.
+   The original author of Bacula is Kern Sibbald, with contributions
+   from many others, a complete list can be found in the file AUTHORS.
 
    You may use this file and others of this release according to the
    license defined in the LICENSE file, which includes the Affero General
    Public License, v3.0 ("AGPLv3") and some additional permissions and
    terms pursuant to its AGPLv3 Section 7.
 
-   Bacula® is a registered trademark of Kern Sibbald.
+   This notice must be preserved when any source code is 
+   conveyed and/or propagated.
+
+   Bacula(R) is a registered trademark of Kern Sibbald.
 */
 /*
  * Collection of Bacula Storage daemon locking software
@@ -239,6 +243,7 @@ void DEVICE::dbg_rLock(const char *file, int line, bool locked)
 
 void DEVICE::rLock(bool locked)
 {
+
    if (!locked) {
       Lock();
       m_count++;
@@ -344,6 +349,12 @@ int DEVICE::init_mutex()
    return pthread_mutex_init(&m_mutex, NULL);
 }
 
+/* Mutex around the freespace command */
+int DEVICE::init_freespace_mutex()
+{
+   return pthread_mutex_init(&freespace_mutex, NULL);
+}
+
 /* Write device acquire mutex */
 int DEVICE::init_acquire_mutex()
 {