From: Zdenek Kabelac <zkabelac@fedoraproject.org>
To: lvm-devel@redhat.com
Subject: master - cleanup: error is already logged
Date: Mon, 6 Oct 2014 13:33:49 +0000 (UTC) [thread overview]
Message-ID: <20141006133349.CE57D60DB1@fedorahosted.org> (raw)
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=916a68585e5078ff3f3190a9f77bee2f7b9b30a2
Commit: 916a68585e5078ff3f3190a9f77bee2f7b9b30a2
Parent: 73c74d582c27400f8cad939a52503e3721c0e153
Author: Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate: Mon Oct 6 12:01:21 2014 +0200
Committer: Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Mon Oct 6 15:23:08 2014 +0200
cleanup: error is already logged
Function get_only_segment_using_this_lv() already prints error,
no need to show more internal logic to user as an error.
---
lib/metadata/pool_manip.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/metadata/pool_manip.c b/lib/metadata/pool_manip.c
index 6e2f2fe..439b8ed 100644
--- a/lib/metadata/pool_manip.c
+++ b/lib/metadata/pool_manip.c
@@ -215,12 +215,8 @@ struct lv_segment *find_pool_seg(const struct lv_segment *seg)
{
struct lv_segment *pool_seg;
- pool_seg = get_only_segment_using_this_lv(seg->lv);
-
- if (!pool_seg) {
- log_error("Failed to find pool_seg for %s", seg->lv->name);
- return NULL;
- }
+ if (!(pool_seg = get_only_segment_using_this_lv(seg->lv)))
+ return_NULL;
if ((lv_is_thin_type(seg->lv) && !seg_is_pool(pool_seg))) {
log_error("%s on %s is not a %s pool segment",
reply other threads:[~2014-10-06 13:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141006133349.CE57D60DB1@fedorahosted.org \
--to=zkabelac@fedoraproject.org \
--cc=lvm-devel@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.