Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1382803imm; Wed, 23 May 2018 15:19:26 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoQGOmuBAJTy3sxXC5jP0CQZVMukDoeQH6uRntRwazFQ0FDg1gYe92szXFgh90HDwqFpEpB X-Received: by 2002:a17:902:264:: with SMTP id 91-v6mr4605606plc.341.1527113966719; Wed, 23 May 2018 15:19:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527113966; cv=none; d=google.com; s=arc-20160816; b=yFRZPVbQC/NfS0puvVKN+hnygQ6WRde4g5H30lFGTDm4f/Xr1s5maJKcA4gFGKU3Up fGbRfqNnjhScF4aujB1WyWVj+sHicTAK0dhc+ZHAYiZNfyKcH+5APGn+z9kPHjYonlAD DyMNwadyDJtUSPeR1w+GAUxCwUphghA+gTX5B5zxIVQvuTIDNGx+wWkK8wScFjV4kTPs T0/leT/Wu84GOasA0hJ+14zWJRdAX5KzgHglvxvI82RXjNCqrsU2dS5WLd50jckBFUj4 06QglaHIxxv2W0ofWLRXp3wJCIyIpu1/3+gadqEKIcCw4EIMPX9FKcsHrgdNx3xItQCw Tzew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=AeESRiz/Adr+lLhHjUf8q5r8QcIF6KBtIVQVHRxeTKk=; b=PYWgGjiKsFTXJmyZSXRyUDjnVaLu+yLbeTbx3ZQaj+1kMSBFyob32YIkVmFZI9C6WV 8CcGthIbx+FLsAhnwN/3ZDN0FSyyDsfI7srGI+bcMQY9xLeoQTxhpTqz+Ilu9G0tZNC1 hQ21cIe3M4mE8SbiJNZt6Au/Pk5ivU4UtPpznyY9/yYOHHCiyvf0gHstrAMKmhqI2abW kVHcIbFKmdGjgpKbwXL6v4Fc6gsb4FV32ji07mdsudKO4ull2ig7TCMo/b9bHsp4gcCq ojgL/zeuGfsBILjqIXtsN821gH1bYO0soVugFJbTEJxdbwPIVSx7PeavHjP/ZYYlse99 DMrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tWJD9oyV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i89-v6si20001690pfd.117.2018.05.23.15.19.12; Wed, 23 May 2018 15:19:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tWJD9oyV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934795AbeEWWSw (ORCPT + 99 others); Wed, 23 May 2018 18:18:52 -0400 Received: from mail-qt0-f196.google.com ([209.85.216.196]:39965 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934147AbeEWWSu (ORCPT ); Wed, 23 May 2018 18:18:50 -0400 Received: by mail-qt0-f196.google.com with SMTP id h2-v6so30245795qtp.7; Wed, 23 May 2018 15:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AeESRiz/Adr+lLhHjUf8q5r8QcIF6KBtIVQVHRxeTKk=; b=tWJD9oyVPYeVl/yVdYswNlQN/EVYxduqTMeX82LbydYYXFly45Zn7CMV0SygApEgGi 3OYWTeeP1DRYTiSpmry+6oTWnIYoWGqGSMFVMKqGHN1HGUos6K8HyLaStebAHZPmwM7A D/Qg/3f6gZ0K76z+FkLBKWogis/gli3PwYzJQArTxt8N7VZntegXv2MM5B5p2Nd/eBMk /dKTPyvO6UMgTf3BNxvMkvTodV+x3bdecd17lngAzCXXJWd6SodJK+m9e6Ks2g9a+o/d PGOv7zm2HyIlnOSpJK7uBdWATeDn/A4WseNlE7v2X7RVR/Z7lsz3tJ+n+l415X1ypxGn T4WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AeESRiz/Adr+lLhHjUf8q5r8QcIF6KBtIVQVHRxeTKk=; b=KV/ax7EJjK02/fwYoYXxt2pVDxIXhSxWIyxwX/VbUczseUHZLTxyMd7KjLE4BGrD2V zNrafVBlB2lAOXa+GZoxyMPQV8HFXhcCCNMNULCe2inQlqu42iMRg8FPwtPMfQGeMh5O 158GzAcKZubUwkrHofIEMrZ3MUnDWaBC9rFmZ5bJdOuy2zMAhvWT6FUbOJ6G5qZfqy8K OpYobo1gA57fkqKcQONS8Bx2xkJZUrAUOayxFyJ3nTBUG43WCdSnf/WF5G1tTCp97BaH qVF6eoMjAw+3iP5q/5yNdoc4fci3j4cgUji/0M+N6Lr/qzs+YDvChfaWFlc37Irluhk2 y2Zw== X-Gm-Message-State: ALKqPwerBBAWdoNV3TvE4edL1KrHLQiVY8QDRSCAZRnroWtUIBSt0vsr 1dSPE0NmUIS69cKG1ybzJw== X-Received: by 2002:ac8:2ff6:: with SMTP id m51-v6mr4584969qta.265.1527113929423; Wed, 23 May 2018 15:18:49 -0700 (PDT) Received: from kmo-pixel (c-71-234-172-214.hsd1.vt.comcast.net. [71.234.172.214]) by smtp.gmail.com with ESMTPSA id m8-v6sm13750732qth.24.2018.05.23.15.18.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 15:18:48 -0700 (PDT) Date: Wed, 23 May 2018 18:18:45 -0400 From: Kent Overstreet To: Matthew Wilcox Cc: linux-kernel@vger.kernel.org, viro@zeniv.linux.org.uk, akpm@linux-foundation.org, gregkh@linuxfoundation.org, linux-security-module@vger.kernel.org, selinux@tycho.nsa.gov, dev@openvswitch.org, shli@kernel.org, linux-raid@vger.kernel.org Subject: Re: [PATCH 2/6] proc: commit to genradix Message-ID: <20180523221845.GB23040@kmo-pixel> References: <20180523011821.12165-1-kent.overstreet@gmail.com> <20180523011821.12165-2-kent.overstreet@gmail.com> <20180523112823.GA19987@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180523112823.GA19987@bombadil.infradead.org> User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 23, 2018 at 04:28:23AM -0700, Matthew Wilcox wrote: > On Tue, May 22, 2018 at 09:18:17PM -0400, Kent Overstreet wrote: > > @@ -2140,11 +2140,12 @@ proc_map_files_readdir(struct file *file, struct dir_context *ctx) > > struct task_struct *task; > > struct mm_struct *mm; > > unsigned long nr_files, pos, i; > > - struct flex_array *fa = NULL; > > - struct map_files_info info; > > + GENRADIX(struct map_files_info) fa; > > struct map_files_info *p; > > int ret; > > > > + genradix_init(&fa); > > Could we have a DEFINE_GENRADIX(type, name) which initialises the tree? Already exists. I kind of prefer not to use it when I don't need to though, and stick to things that look more like normal declarations instead.