[sheepdog] [PATCH] sheep/cluster/zookeeper: initialize cluster_locks_table with hlist_head

Liu Yuan namei.unix at gmail.com
Wed Mar 4 09:17:55 CET 2015


On Wed, Mar 04, 2015 at 01:13:04PM +0800, Meng Lingkun wrote:
> Although the size of list_head is the same as hlist_head, it's confused. So fix it.
> 
> Signed-off-by: Meng Lingkun <menglingkun at cmss.chinamobile.com>
> ---
>  sheep/cluster/zookeeper.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sheep/cluster/zookeeper.c b/sheep/cluster/zookeeper.c
> index 4f85043..c44f0ff 100644
> --- a/sheep/cluster/zookeeper.c
> +++ b/sheep/cluster/zookeeper.c
> @@ -1490,7 +1490,7 @@ static int zk_init(const char *option)
>  	}
>  
>  	/* init distributed lock structures */
> -	cluster_locks_table = xzalloc(sizeof(struct list_head) *
> +	cluster_locks_table = xzalloc(sizeof(struct hlist_head) *
>  				      HASH_BUCKET_NR);
>  	for (uint64_t i = 0; i < HASH_BUCKET_NR; i++) {
>  		INIT_HLIST_HEAD(cluster_locks_table + i);
> -- 
> 1.9.1
> 
> 
> 
> -- 
> sheepdog mailing list
> sheepdog at lists.wpkg.org
> https://lists.wpkg.org/mailman/listinfo/sheepdog

Applied, thanks.

Yuan



More information about the sheepdog mailing list