From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751908AbdJEI7y (ORCPT ); Thu, 5 Oct 2017 04:59:54 -0400 Received: from mx2.suse.de ([195.135.220.15]:52176 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751866AbdJEI7u (ORCPT ); Thu, 5 Oct 2017 04:59:50 -0400 Date: Thu, 5 Oct 2017 10:59:47 +0200 From: Jan Kara To: Waiman Long Cc: Alexander Viro , Jan Kara , Jeff Layton , "J. Bruce Fields" , Tejun Heo , Christoph Lameter , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Ingo Molnar , Peter Zijlstra , Andi Kleen , Dave Chinner , Boqun Feng , Davidlohr Bueso , Waiman Long Subject: Re: [PATCH v6 4/6] lib/dlock-list: Make sibling CPUs share the same linked list Message-ID: <20171005085947.GC28132@quack2.suse.cz> References: <1507152007-28753-1-git-send-email-longman@redhat.com> <1507152007-28753-5-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1507152007-28753-5-git-send-email-longman@redhat.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 04-10-17 17:20:05, Waiman Long wrote: > int alloc_dlock_list_heads(struct dlock_list_heads *dlist) > { > - int idx; > + int idx, cnt = nr_dlock_lists ? nr_dlock_lists : nr_cpu_ids; Hum, is this there for the case where alloc_dlock_list_heads() is called before nr_dlock_lists is initialized? But how can the dlist be used later when it has larger number of lists and you don't know how many? Honza -- Jan Kara SUSE Labs, CR