summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2014-09-19 15:31:41 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2014-09-19 15:55:46 +0200
commite3cbdde070b25db30984efa0898f16c2555301d9 (patch)
treeffa1e45cb77ae4ec2028acb857898cc9b64aeab2
parent702b6482154b0d8a9488c304081992f2d569f005 (diff)
downloadlvm2-e3cbdde070b25db30984efa0898f16c2555301d9.tar.gz
backup: drops locked memory
Since we want to backup metadata, this is the point we no longer want to hold memory locked.
-rw-r--r--lib/format_text/archiver.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/format_text/archiver.c b/lib/format_text/archiver.c
index 2667bdbe8..a2f40f2df 100644
--- a/lib/format_text/archiver.c
+++ b/lib/format_text/archiver.c
@@ -19,6 +19,7 @@
#include "lvm-string.h"
#include "lvmcache.h"
#include "lvmetad.h"
+#include "memlock.h"
#include "toolcontext.h"
#include "locking.h"
@@ -255,6 +256,9 @@ int backup_locally(struct volume_group *vg)
int backup(struct volume_group *vg)
{
+ /* Unlock memory if possible */
+ memlock_unlock(vg->cmd);
+
/* Don't back up orphan VGs. */
if (is_orphan_vg(vg->name))
return 1;