All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guangyu Sun <guangyu.sun@oracle.com>
To: dm-devel@redhat.com
Subject: [PATCH] libmultipath: fix flush_on_last_del config handlers
Date: Fri, 21 Dec 2012 11:11:30 -0800	[thread overview]
Message-ID: <50D4B462.4020708@oracle.com> (raw)

From: Guangyu Sun <guangyu.sun@oracle.com>

Now flush_on_last_del cannot be set to FLUSH_DISABLED if its default
value is FLUSH_ENABLED. This patch fixes the issue.

Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
---
  libmultipath/dict.c |    6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/libmultipath/dict.c b/libmultipath/dict.c
index e0535a6..ebc49a3 100644
--- a/libmultipath/dict.c
+++ b/libmultipath/dict.c
@@ -508,7 +508,7 @@ def_flush_on_last_del_handler(vector strvec)
  	if ((strlen(buff) == 2 && strcmp(buff, "no") == 0) ||
  	    (strlen(buff) == 1 && strcmp(buff, "0") == 0))
  		conf->flush_on_last_del = FLUSH_DISABLED;
-	if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
+	else if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
  	    (strlen(buff) == 1 && strcmp(buff, "1") == 0))
  		conf->flush_on_last_del = FLUSH_ENABLED;
  	else
@@ -1214,7 +1214,7 @@ hw_flush_on_last_del_handler(vector strvec)
  	if ((strlen(buff) == 2 && strcmp(buff, "no") == 0) ||
  	    (strlen(buff) == 1 && strcmp(buff, "0") == 0))
  		hwe->flush_on_last_del = FLUSH_DISABLED;
-	if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
+	else if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
  	    (strlen(buff) == 1 && strcmp(buff, "1") == 0))
  		hwe->flush_on_last_del = FLUSH_ENABLED;
  	else
@@ -1609,7 +1609,7 @@ mp_flush_on_last_del_handler(vector strvec)
  	if ((strlen(buff) == 2 && strcmp(buff, "no") == 0) ||
  	    (strlen(buff) == 1 && strcmp(buff, "0") == 0))
  		mpe->flush_on_last_del = FLUSH_DISABLED;
-	if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
+	else if ((strlen(buff) == 3 && strcmp(buff, "yes") == 0) ||
  	    (strlen(buff) == 1 && strcmp(buff, "1") == 0))
  		mpe->flush_on_last_del = FLUSH_ENABLED;
  	else
-- 1.7.9.5

             reply	other threads:[~2012-12-21 19:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21 19:11 Guangyu Sun [this message]
2012-12-22  8:43 ` [PATCH] libmultipath: fix flush_on_last_del config handlers Christophe Varoqui

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=50D4B462.4020708@oracle.com \
    --to=guangyu.sun@oracle.com \
    --cc=dm-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.