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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BCA75CCFA1A for ; Sat, 8 Nov 2025 06:13:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id EA9958E0006; Sat, 8 Nov 2025 01:13:01 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E59EA8E0003; Sat, 8 Nov 2025 01:13:01 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CD3D38E0006; Sat, 8 Nov 2025 01:13:01 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id B16A08E0003 for ; Sat, 8 Nov 2025 01:13:01 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 264AF13B97A for ; Sat, 8 Nov 2025 06:13:01 +0000 (UTC) X-FDA: 84086421762.09.7A54097 Received: from submarine.notk.org (submarine.notk.org [62.210.214.84]) by imf20.hostedemail.com (Postfix) with ESMTP id 92D721C0007 for ; Sat, 8 Nov 2025 06:12:57 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=codewreck.org header.s=2 header.b=B+D3byKt; spf=pass (imf20.hostedemail.com: domain of asmadeus@codewreck.org designates 62.210.214.84 as permitted sender) smtp.mailfrom=asmadeus@codewreck.org; dmarc=pass (policy=none) header.from=codewreck.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1762582379; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LTM5LkyL3mfB0IbHJeS1oRharyj4iNDNdaZ7y5irjmg=; b=kNMD5RLT2KI6xpNen5vTwPBbdMVI021Ul9koAhfFvBjYo45NGOPb0FCveF53IheYGPiD8b CwQg0zEVRNdyXGEthMzlBDNk967RDE+rKIqUPoEHy4Cr49rYkEoGi/D3e2OdVqqzQdWoYt BfrgK6dvH6yNU4GokO/DiKH5X70wppM= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=codewreck.org header.s=2 header.b=B+D3byKt; spf=pass (imf20.hostedemail.com: domain of asmadeus@codewreck.org designates 62.210.214.84 as permitted sender) smtp.mailfrom=asmadeus@codewreck.org; dmarc=pass (policy=none) header.from=codewreck.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1762582379; a=rsa-sha256; cv=none; b=PL/7fmvoWCrnQibWVQzf23EaKQifIYiUkGxpJfq+H5w89p0coXOLW6xSF6AV7SHbkSq7wb XJk8XWR4ha3PNGd7KsW1xqK/AA5t4zM5PCrmiV/ePoCXtfD/SWUKkHmZuYibWh70H2pbf2 RLnq9Hls9sIvhyzX2gNoz9AHbzOo/Cw= Received: from gaia.codewreck.org (localhost [127.0.0.1]) by submarine.notk.org (Postfix) with ESMTPS id A419014C2D3; Sat, 8 Nov 2025 07:12:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codewreck.org; s=2; t=1762582373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=LTM5LkyL3mfB0IbHJeS1oRharyj4iNDNdaZ7y5irjmg=; b=B+D3byKtJ5aLyRiu2rooP0B2TJlyh9NnWKaBHKY3oGl5WrI9R/ZTOokRqfrmQkRjA4d6PF hVA+2jtaIxDHKJVm19YOlIu00RJFzbMjiJ2IJMY5v8SjTtfCjEZWBxEPfRtzuPasj++KiY 8Sahe5eVbfmwmhQeo5uzL3Rp7AKK7Nzr7m3ipU5qmaiTEStLej1x9iBcfVqKnY9WidAi8X rwVB6qqUGBZMEcUSkoPWBbqf240gmgWcLbAb7B4RNHuho0O1rPy72OuweBfiXGGrgaJqO1 amO1aDXHVrMyRWIApKs7c+o9NFvUODZZvMkcXugNCGdZ2S65dzPgh2BACKmoHA== Received: from localhost (gaia.codewreck.org [local]) by gaia.codewreck.org (OpenSMTPD) with ESMTPA id 26a2c8b4; Sat, 8 Nov 2025 06:12:25 +0000 (UTC) Date: Sat, 8 Nov 2025 15:12:10 +0900 From: Dominique Martinet To: Jeff Layton Cc: Eric Van Hensbergen , Latchesar Ionkov , Christian Schoenebeck , David Sterba , David Howells , Marc Dionne , Alexander Viro , Christian Brauner , Jan Kara , "Tigran A. Aivazian" , Chris Mason , Xiubo Li , Ilya Dryomov , Jan Harkes , coda@cs.cmu.edu, Tyler Hicks , Jeremy Kerr , Ard Biesheuvel , Namjae Jeon , Sungjong Seo , Yuezhang Mo , Theodore Ts'o , Andreas Dilger , Jaegeuk Kim , Chao Yu , OGAWA Hirofumi , Miklos Szeredi , Andreas Gruenbacher , Viacheslav Dubeyko , John Paul Adrian Glaubitz , Yangtao Li , Richard Weinberger , Anton Ivanov , Johannes Berg , Mikulas Patocka , Muchun Song , Oscar Salvador , David Hildenbrand , David Woodhouse , Dave Kleikamp , Trond Myklebust , Anna Schumaker , Ryusuke Konishi , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Bob Copeland , Mike Marshall , Martin Brandenburg , Amir Goldstein , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Bharath SM , Zhihao Cheng , Hans de Goede , Carlos Maiolino , Hugh Dickins , Baolin Wang , Andrew Morton , Kees Cook , "Gustavo A. R. Silva" , Jonathan Corbet , "Matthew Wilcox (Oracle)" , NeilBrown , linux-kernel@vger.kernel.org, v9fs@lists.linux.dev, linux-fsdevel@vger.kernel.org, linux-afs@lists.infradead.org, linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org, codalist@coda.cs.cmu.edu, ecryptfs@vger.kernel.org, linux-efi@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, gfs2@lists.linux.dev, linux-um@lists.infradead.org, linux-mm@kvack.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-unionfs@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org, linux-xfs@vger.kernel.org, linux-hardening@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v2] vfs: remove the excl argument from the ->create() inode_operation Message-ID: References: <20251107-create-excl-v2-1-f678165d7f3f@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20251107-create-excl-v2-1-f678165d7f3f@kernel.org> X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 92D721C0007 X-Stat-Signature: hdouddhbpd5b3gghas8erzadrtajh5t9 X-Rspam-User: X-HE-Tag: 1762582377-890090 X-HE-Meta: U2FsdGVkX18i+jVGEZD9vdt6bnoS0PmaBgB7qUtZkdA3kPD2vONq5hgM1sP7MhDrhhZ+mo+x7cjo1XpdC0mwIIWLfptr/wMGUYiUpxz1SERV97tncvKrUwQLa3iGu+71vf8plt4wqITOCK37xgWnfqTZAfNxPrXMw1/b8jtN4w0KabzQNAmi34TsbS2XBUTlmLi3v5K98tcIEEzukVpeU9P9NOxeBTNECEjwtOBIPWPsWLOglIRHg4xTjhBmt8vqgB5miaVoWFi3YqnOaK6RdV4tVHkXideylocfa+T2/76DgvrHWnbishJFRbdwc/7637THnDCPgHJhq4+nQcPZx0+M+WQ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knggItWyVO4PnPzTSvoqgt0wIQBLGOLyoBxNLbL7NIiFuPoL8Gb2oFkrvazY X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Jeff Layton wrote on Fri, Nov 07, 2025 at 10:05:03AM -0500: > With two exceptions, ->create() methods provided by filesystems ignore > the "excl" flag. Those exception are NFS and GFS2 which both also > provide ->atomic_open. > > Since ce8644fcadc5 ("lookup_open(): expand the call of vfs_create()"), > the "excl" argument to the ->create() inode_operation is always set to > true in vfs_create(). The ->create() call in lookup_open() sets it > according to the O_EXCL open flag, but is never called if the filesystem > provides ->atomic_open(). > > The excl flag is therefore always either ignored or true. Remove it, > and change NFS and GFS2 to act as if it were always true. > > Signed-off-by: Jeff Layton Good cleanup, just one whitespace nitpick below but: Reviewed-by: Dominique Martinet > diff --git a/Documentation/filesystems/vfs.rst b/Documentation/filesystems/vfs.rst > index 4f13b01e42eb5e2ad9d60cbbce7e47d09ad831e6..7a55e491e0c87a0d18909bd181754d6d68318059 100644 > --- a/Documentation/filesystems/vfs.rst > +++ b/Documentation/filesystems/vfs.rst > @@ -505,7 +505,10 @@ otherwise noted. > if you want to support regular files. The dentry you get should > not have an inode (i.e. it should be a negative dentry). Here > you will probably call d_instantiate() with the dentry and the > - newly created inode > + newly created inode. This operation should always provide O_EXCL This and the block below change halfway from tab (old text) to spaces (your patch) Looks like the file has a few space-indented sections though so it won't be the first if that goes in as is, the html-rendering doesn't seem to care :) Cheers, -- Dominique Martinet | Asmadeus