diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2014-03-11 22:50:23 +0100 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2014-03-12 00:13:21 +0100 |
commit | 1850a6e454ebbb54aae80a0ad4d5482ecdffcd28 (patch) | |
tree | c7a10bac9341ea8acac35a1448eae15e6fdf88a1 | |
parent | 7574b3bc80c8b2db5f4a9da9e7de00c0a3239e26 (diff) | |
download | lvm2-1850a6e454ebbb54aae80a0ad4d5482ecdffcd28.tar.gz |
thin: fix pool_has_message return for NULL params
When pool_has_message() is queried with NULL lv and 0 device_id
it should just return 'true' when there is any message queued.
So it needs to return negative value dm_list_empty().
Since there is no user for this code path in code currently,
this bug has not been triggered.
-rw-r--r-- | WHATS_NEW | 1 | ||||
-rw-r--r-- | lib/metadata/thin_manip.c | 2 |
2 files changed, 2 insertions, 1 deletions
@@ -1,5 +1,6 @@ Version 2.02.106 - ==================================== + Fix return value in pool_has_message() when quering for any message. Cleanup all client resources on clvmd exit. Use dm_zalloc to clear members of clvmd client struct. Use BLKID_CFLAGS when compiling with blkid support. diff --git a/lib/metadata/thin_manip.c b/lib/metadata/thin_manip.c index 2e4901958..78231a2b6 100644 --- a/lib/metadata/thin_manip.c +++ b/lib/metadata/thin_manip.c @@ -160,7 +160,7 @@ int pool_has_message(const struct lv_segment *seg, } if (!lv && !device_id) - return dm_list_empty(&seg->thin_messages); + return !dm_list_empty(&seg->thin_messages); dm_list_iterate_items(tmsg, &seg->thin_messages) { switch (tmsg->type) { |