From: <ta...@us...> - 2007-11-25 07:42:15
|
Revision: 3871 http://gfarm.svn.sourceforge.net/gfarm/?rev=3871&view=rev Author: tatebe Date: 2007-11-24 23:42:18 -0800 (Sat, 24 Nov 2007) Log Message: ----------- fixed a deadlock Modified Paths: -------------- gfarm/branches/gfarm_v2/server/gfmd/host.c Modified: gfarm/branches/gfarm_v2/server/gfmd/host.c =================================================================== --- gfarm/branches/gfarm_v2/server/gfmd/host.c 2007-11-22 00:58:36 UTC (rev 3870) +++ gfarm/branches/gfarm_v2/server/gfmd/host.c 2007-11-25 07:42:18 UTC (rev 3871) @@ -270,12 +270,11 @@ int host_is_up(struct host *h) { - int is_active; - - pthread_mutex_lock(&h->remover_mutex); - is_active = h->is_active; - pthread_mutex_unlock(&h->remover_mutex); - return (is_active); + /* + * XXX - should be called with mutex h->remover_mutex, + * but it is not always satisfied. + */ + return (h->is_active); } void @@ -309,7 +308,7 @@ { struct dead_file_copy *r; gfarm_error_t e; - int retcode = 0, is_up = host_is_up(host); + int retcode = 0, is_up; pthread_mutex_lock(&host->remover_mutex); while (host->to_be_removed == NULL && This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |