From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A637BC7EE25 for ; Wed, 7 Jun 2023 12:19:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240625AbjFGMTA (ORCPT ); Wed, 7 Jun 2023 08:19:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33258 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240641AbjFGMS6 (ORCPT ); Wed, 7 Jun 2023 08:18:58 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20A311BF5; Wed, 7 Jun 2023 05:18:55 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id AC1196732D; Wed, 7 Jun 2023 14:18:50 +0200 (CEST) Date: Wed, 7 Jun 2023 14:18:50 +0200 From: Christoph Hellwig To: Christian Brauner Cc: Christoph Hellwig , Jens Axboe , Richard Weinberger , Josef Bacik , "Md. Haris Iqbal" , Jack Wang , Phillip Potter , Coly Li , Miquel Raynal , Vignesh Raghavendra , "Martin K. Petersen" , Chris Mason , David Sterba , Alexander Viro , "Rafael J. Wysocki" , Pavel Machek , dm-devel@redhat.com, linux-block@vger.kernel.org, linux-um@lists.infradead.org, linux-scsi@vger.kernel.org, linux-bcache@vger.kernel.org, linux-mtd@lists.infradead.org, linux-nvme@lists.infradead.org, linux-btrfs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-nilfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 30/31] block: store the holder in file->private_data Message-ID: <20230607121850.GA14396@lst.de> References: <20230606073950.225178-1-hch@lst.de> <20230606073950.225178-31-hch@lst.de> <20230607-verjagen-weise-4fb3d76a6313@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230607-verjagen-weise-4fb3d76a6313@brauner> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Jun 07, 2023 at 11:24:55AM +0200, Christian Brauner wrote: > On Tue, Jun 06, 2023 at 09:39:49AM +0200, Christoph Hellwig wrote: > > Store the file struct used as the holder in file->private_data as an > > indicator that this file descriptor was opened exclusively to remove > > the last use of FMODE_EXCL. > > > > Signed-off-by: Christoph Hellwig > > --- > > Feels a bit odd to store the object itself but anyway, > Acked-by: Christian Brauner We could literally store anything we want. The only reason I picked the file is because: a) we have it around and b) that allows passing it to blkdev_put without a branch in blkdev_release. If you prefer something else I can change it.