cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] rgmanager: Fix return code when a service would deadlock
@ 2012-10-13  1:18 Ryan McCabe
  2012-10-13  6:26 ` Fabio M. Di Nitto
  0 siblings, 1 reply; 2+ messages in thread
From: Ryan McCabe @ 2012-10-13  1:18 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Cluster-devel] [PATCH] rgmanager: Fix return code when a service would deadlock
  2012-10-13  1:18 [Cluster-devel] [PATCH] rgmanager: Fix return code when a service would deadlock Ryan McCabe
@ 2012-10-13  6:26 ` Fabio M. Di Nitto
  0 siblings, 0 replies; 2+ messages in thread
From: Fabio M. Di Nitto @ 2012-10-13  6:26 UTC (permalink / raw)
  To: cluster-devel.redhat.com

ACK

On 10/13/2012 03:18 AM, Ryan McCabe wrote:
> 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,
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-13  6:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-13  1:18 [Cluster-devel] [PATCH] rgmanager: Fix return code when a service would deadlock Ryan McCabe
2012-10-13  6:26 ` Fabio M. Di Nitto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).