All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan McCabe <rmccabe@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] rgmanager: Fix return code when a service would deadlock
Date: Fri, 12 Oct 2012 21:18:30 -0400	[thread overview]
Message-ID: <20121013011828.GA294584@redhat.com> (raw)

When we detect that starting a service would cause a deadlock, return 0
instead of -1. This fixes a crash that occurred when -1 was returned.

Resolves: rhbz#861157

Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
---
 rgmanager/src/daemons/rg_thread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rgmanager/src/daemons/rg_thread.c b/rgmanager/src/daemons/rg_thread.c
index 5e551c3..b888717 100644
--- a/rgmanager/src/daemons/rg_thread.c
+++ b/rgmanager/src/daemons/rg_thread.c
@@ -756,7 +756,7 @@ rt_enqueue_request(const char *resgroupname, int request,
 		logt_print(LOG_DEBUG,
 			"Failed to queue %d request for %s: Would block\n",
 			request, resgroupname);
-		return -1;
+		return 0;
 	}
 
 	ret = rq_queue_request(resgroup->rt_queue, resgroup->rt_name,
-- 
1.7.11.7



             reply	other threads:[~2012-10-13  1:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-13  1:18 Ryan McCabe [this message]
2012-10-13  6:26 ` [Cluster-devel] [PATCH] rgmanager: Fix return code when a service would deadlock Fabio M. Di Nitto

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=20121013011828.GA294584@redhat.com \
    --to=rmccabe@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.