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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8F807C7115A for ; Tue, 17 Jun 2025 11:48:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=913pLyjLeqhCNIXJ0FrmHL5ixlhClcGyrDmFtT0rU2c=; b=O9XTLQVFkUyCzc LcpsytH7UeizZ/eFQtpaHerR51tRY6KAEl1aJN9Mh4yqTiBb22wWVc6AnE7WU3TbhFR4fNBKashEM rkZIVrQlErSPYO4Ap822HatO+VEvuiAzN8jZcpmQFRnbkFaks1kVVJAwhXpCiNtNwp63kjnfZOcyP /FSZYNWKwEvn7HD7SGtuFkcTz+K5XfNuacosj4fE3yD7vC6zM50Jl31sfB5vwlC87TaiQDBDrn/Dz MyQ8dxMV2TD60l045OwWQWG7raOMUr5xvptVMIJX0JwFhxgv3JhsMZjVOpWa9jKF+dMOWjMtJgEmW SWIOwQI8odyBJedb8+KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uRUnq-0000000751B-2MZY; Tue, 17 Jun 2025 11:48:34 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uRUnn-0000000750I-309I; Tue, 17 Jun 2025 11:48:33 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id E682744DD6; Tue, 17 Jun 2025 11:48:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 40C6FC4CEE3; Tue, 17 Jun 2025 11:48:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1750160910; bh=Vnr3kmvDQPz8s5uZNmSkWKP9XPj/+f6PNSLS1Tx/MzQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=i76Wd947DS4XwAcDpAS8fpuf+Ela4lfUx5B4Zl+sE1WJ8kzwgrCbFciE3rigUUS/6 wkwvrTbKDnBSYG4C5HYytRyvy7B3ZkCeJ/5F35ij31zEXxn65NXesNNhKSYHlLq/2D R33NY8eYZWteN9O+9G//EUF0UQxUiz+Y2C7gC+ejd2PqldQ355joR8oksRp/9Bu+B9 HCJ+eqE2ygFdOjJuUuFVDO+rKmgk2g66UaZmVaAWhJlsobI+L+ldnr5kvasHnLLQtL 3ZDhNpWvRvvYFALgNe61XXKpKO8zT2d+3DmY+NeMp1GFEAHy45cWCYw7RMgE+f8kCe WOUfPvP6PlRuw== Date: Tue, 17 Jun 2025 13:48:04 +0200 From: Christian Brauner To: Jan Kara Cc: Lorenzo Stoakes , Christoph Hellwig , Andrew Morton , "Liam R . Howlett" , Jens Axboe , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tvrtko Ursulin , David Airlie , Simona Vetter , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , David Sterba , David Howells , Marc Dionne , Alexander Viro , Benjamin LaHaise , Miklos Szeredi , Amir Goldstein , Kent Overstreet , "Tigran A . Aivazian" , Kees Cook , Chris Mason , Josef Bacik , Xiubo Li , Ilya Dryomov , Jan Harkes , coda@cs.cmu.edu, Tyler Hicks , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Sandeep Dhavale , Hongbo Li , Namjae Jeon , Sungjong Seo , Yuezhang Mo , Theodore Ts'o , Andreas Dilger , Jaegeuk Kim , OGAWA Hirofumi , Viacheslav Dubeyko , John Paul Adrian Glaubitz , Yangtao Li , Richard Weinberger , Anton Ivanov , Johannes Berg , Mikulas Patocka , David Woodhouse , Dave Kleikamp , Trond Myklebust , Anna Schumaker , Ryusuke Konishi , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Bob Copeland , Mike Marshall , Martin Brandenburg , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Bharath SM , Zhihao Cheng , Hans de Goede , Carlos Maiolino , Damien Le Moal , Naohiro Aota , Johannes Thumshirn , Dan Williams , Matthew Wilcox , Vlastimil Babka , Jann Horn , Pedro Falcato , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-afs@lists.infradead.org, linux-aio@kvack.org, linux-unionfs@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-mm@kvack.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@coda.cs.cmu.edu, ecryptfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-um@lists.infradead.org, linux-mtd@lists.infradead.org, jfs-discussion@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, linux-karma-devel@lists.sourceforge.net, devel@lists.orangefs.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-xfs@vger.kernel.org, nvdimm@lists.linux.dev Subject: Re: [PATCH 03/10] fs: consistently use file_has_valid_mmap_hooks() helper Message-ID: <20250617-mitstreiter-bewahren-455b96bd1d50@brauner> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250617_044831_794127_6018DD56 X-CRM114-Status: GOOD ( 22.94 ) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Tue, Jun 17, 2025 at 12:08:13PM +0200, Jan Kara wrote: > On Tue 17-06-25 06:25:34, Lorenzo Stoakes wrote: > > On Mon, Jun 16, 2025 at 10:11:28PM -0700, Christoph Hellwig wrote: > > > On Mon, Jun 16, 2025 at 08:33:22PM +0100, Lorenzo Stoakes wrote: > > > > Since commit c84bf6dd2b83 ("mm: introduce new .mmap_prepare() file > > > > callback"), the f_op->mmap() hook has been deprecated in favour of > > > > f_op->mmap_prepare(). > > > > > > > > Additionally, commit bb666b7c2707 ("mm: add mmap_prepare() compatibility > > > > layer for nested file systems") permits the use of the .mmap_prepare() hook > > > > even in nested filesystems like overlayfs. > > > > > > > > There are a number of places where we check only for f_op->mmap - this is > > > > incorrect now mmap_prepare exists, so update all of these to use the > > > > general helper file_has_valid_mmap_hooks(). > > > > > > > > Most notably, this updates the elf logic to allow for the ability to > > > > execute binaries on filesystems which have the .mmap_prepare hook, but > > > > additionally we update nested filesystems. > > > > > > Can you please give the function a better name before spreading it? > > > file operations aren't hooks by any classic definition. > > > > > > > can_mmap_file()? > > I like this name more as well :). With this patch looks good to me. Again a Fixed in-tree. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/