From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kent Overstreet Subject: Re: [PATCH 1/6] Generic radix trees Date: Sat, 26 May 2018 01:56:01 -0400 Message-ID: <20180526055601.GA26155@kmo-pixel> References: <20180523011821.12165-1-kent.overstreet@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces-yBygre7rU0TnMu66kgdUjQ@public.gmane.org Errors-To: ovs-dev-bounces-yBygre7rU0TnMu66kgdUjQ@public.gmane.org To: Liu Bo Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org, gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, willy-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, linux-raid-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-security-module-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, viro-RmSDqhL/yNMiFSDQTTA3OLVCufUGDwFn@public.gmane.org, selinux-+05T5uksL2qpZYMLLGbcSA@public.gmane.org, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org, shli-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org List-Id: linux-raid.ids On Sat, May 26, 2018 at 11:16:42AM +0800, Liu Bo wrote: > > +/* > > + * Returns pointer to the specified byte @offset within @radix, allocating it if > > + * necessary - newly allocated slots are always zeroed out: > > + */ > > +void *__genradix_ptr_alloc(struct __genradix *radix, size_t offset, > > + gfp_t gfp_mask) > > +{ > > + struct genradix_node **n; > > Any reason that " struct genradix_node ** " is used here instead of " > struct genradix_node * "? > > Looks like this function only manipulates *n, am I missing something? It stores to *n, when it has to allocate a node (including the root)