Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp278575pxa; Thu, 27 Aug 2020 01:56:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7Vs3lvPoIfcYJEYD5Luu4h1Rq9emGGoKd+s5SQg6Di3EA8ICoHjAVJcKuJw8laQZaw3oB X-Received: by 2002:a17:906:bb06:: with SMTP id jz6mr10622139ejb.275.1598518581584; Thu, 27 Aug 2020 01:56:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598518581; cv=none; d=google.com; s=arc-20160816; b=ig8olrw7AZLOQEi7REdhJQ2CBXZFqco27+29ctdNhd4UjGriNcZ9xdN24giueYnLWy n+wd578cpwX+Iq6qZOgCLDEpU1Ec66RGHoyY+Y1Dr/SF7s8OwOUEjyiSsMLhEfbHEMJ1 0EinY50Sin1U7+cSyCswMXs+4lMDw2cG3N+ShN1pFYAlCWYL3pDMy8xIRHwm0I8eeeSr mFM0qyk6esQ0l8yuzEkIJ4aKX9BHcNenMh5ncBX1JebboCrLq3abL85gf29TqyZfcs4T LSbbBebMCXemYDRuT+JM4z5+GOTGvl3e0BuUWq6lK60T10c6eoVthUDBLb0U9aKw35t0 02eA== 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; bh=SRk5z6QJxAmAQ2uBFYvaPsTTo+5xRFmrIYPtBYQN9UA=; b=z8Y3kxGsnGVEMROu1P/FixjIsUQf3Y9jwop6ZXLluYJBCLsqVIq5SBKwQwAoeLygG8 PQiPWG2pco7CifYwGekm3927VabPb+QSQQrUBRGUATFbjD99jybIaRqvV7Chny9AqZL+ U4A7lwedn9VnEDsugWCIRtIjS0E9YbUxiamlRN1MJRu4YfuPcyqGFqee/WbL10kSeJ9q BoPUTd/fNfaVtvvK8FSO+oD9QUH7UASn4S+O0W1rGpjI5ZdkcsQeqDAPISrLa4+qpe0T IHIZctKT8lvi5iu0Mip1Q1z2qxwq9+Pv8Q5ad8b0IVzpRc9ltNUUQ7TvPHj50XKHRFCT Iiqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cx22si1088688edb.328.2020.08.27.01.55.59; Thu, 27 Aug 2020 01:56:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728139AbgH0IzZ (ORCPT + 99 others); Thu, 27 Aug 2020 04:55:25 -0400 Received: from verein.lst.de ([213.95.11.211]:37310 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727814AbgH0IzY (ORCPT ); Thu, 27 Aug 2020 04:55:24 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 0E8A568B02; Thu, 27 Aug 2020 10:55:21 +0200 (CEST) Date: Thu, 27 Aug 2020 10:55:20 +0200 From: Christoph Hellwig To: Hannes Reinecke Cc: Christoph Hellwig , Jens Axboe , Greg Kroah-Hartman , "Rafael J. Wysocki" , Denis Efremov , "David S. Miller" , Song Liu , Al Viro , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, linux-raid@vger.kernel.org, linux-scsi@vger.kernel.org, linux-m68k@lists.linux-m68k.org Subject: Re: [PATCH 01/19] char_dev: replace cdev_map with an xarray Message-ID: <20200827085520.GB12111@lst.de> References: <20200826062446.31860-1-hch@lst.de> <20200826062446.31860-2-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 27, 2020 at 09:25:07AM +0200, Hannes Reinecke wrote: > Do you really need the mutex? > Wouldn't xa_store_range() be better and avoid the mutex? We need the mutex as we need to grab the kobject reference under it. xa_store_range is only available with a separate config option, and has really strange calling conventions. So I'd rather not pull it in here, especially as most cdev_add callers are for a single minor only anyway.