From: Nir Soffer <nsoffer@redhat.com>
To: lvm-devel@redhat.com
Subject: [PATCH] Fix return value of persistent_filters_dump if rename failed
Date: Thu, 17 Oct 2013 15:25:58 -0400 (EDT) [thread overview]
Message-ID: <728848037.5041389.1382037958376.JavaMail.root@redhat.com> (raw)
In-Reply-To: <814115096.5040864.1382037894796.JavaMail.root@redhat.com>
>From eeae04cf523e0c3050d5c686b29fb53316d3c760 Mon Sep 17 00:00:00 2001
From: Nir Soffer <nsoffer@redhat.com>
Date: Thu, 17 Oct 2013 21:18:06 +0300
Subject: [PATCH] Fix return value of persistent_filters_dump if rename failed
---
lib/filters/filter-persistent.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/filters/filter-persistent.c b/lib/filters/filter-persistent.c
index 14a3480..f068369 100644
--- a/lib/filters/filter-persistent.c
+++ b/lib/filters/filter-persistent.c
@@ -253,9 +253,11 @@ static int _persistent_filter_dump(struct dev_filter *f, int merge_existing)
if (lvm_fclose(fp, tmp_file))
goto_out;
- if (rename(tmp_file, pf->file))
+ if (rename(tmp_file, pf->file)) {
log_error("%s: rename to %s failed: %s", tmp_file, pf->file,
strerror(errno));
+ goto out;
+ }
r = 1;
--
1.8.3.1
next parent reply other threads:[~2013-10-17 19:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <814115096.5040864.1382037894796.JavaMail.root@redhat.com>
2013-10-17 19:25 ` Nir Soffer [this message]
[not found] <654944611.5014340.1382034030200.JavaMail.root@redhat.com>
2013-10-17 18:21 ` [PATCH] Fix return value of persistent_filters_dump if rename failed Nir Soffer
2013-10-21 9:23 ` Zdenek Kabelac
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=728848037.5041389.1382037958376.JavaMail.root@redhat.com \
--to=nsoffer@redhat.com \
--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.