Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   rgmanager: Fix return code when a service would deadlock (http://www.linux-archive.org/cluster-development/711959-rgmanager-fix-return-code-when-service-would-deadlock.html)

"Fabio M. Di Nitto" 10-13-2012 06:26 AM

rgmanager: Fix return code when a service would deadlock
 
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
",
> request, resgroupname);
> - return -1;
> + return 0;
> }
>
> ret = rq_queue_request(resgroup->rt_queue, resgroup->rt_name,
>


All times are GMT. The time now is 12:54 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.