summaryrefslogtreecommitdiff
path: root/lib/mm
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2015-02-12 15:30:43 +0100
committerZdenek Kabelac <zkabelac@redhat.com>2015-02-12 15:40:53 +0100
commit9809038b9d3beddd90cb80311c61fd67856e0728 (patch)
tree4af3636b98427d44f9ee33ed5c58c5c1e0845c86 /lib/mm
parent425c04e4dc54f1c8aee261217b5b0fc00df643ae (diff)
downloadlvm2-9809038b9d3beddd90cb80311c61fd67856e0728.tar.gz
memory: disable check with valgrind pool build
When lvm2 is build with valgrind pool detection - always disable memcheck, since pool memory allocation are unconditionaly passed into valgrind library.
Diffstat (limited to 'lib/mm')
-rw-r--r--lib/mm/memlock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c
index 2327d4cd3..534aab3c5 100644
--- a/lib/mm/memlock.c
+++ b/lib/mm/memlock.c
@@ -262,8 +262,10 @@ static int _maps_line(const struct dm_config_node *cn, lvmlock_t lock,
/*
* Valgrind is continually eating memory while executing code
* so we need to deactivate check of locked memory size
- */
+ */
+#ifndef VALGRIND_POOL
if (RUNNING_ON_VALGRIND)
+#endif
sz -= sz; /* = 0, but avoids getting warning about dead assigment */
#endif