From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from submarine.notk.org (submarine.notk.org [62.210.214.84]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C6822C0270; Sat, 8 Nov 2025 06:13:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.210.214.84 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762582386; cv=none; b=h1pusQwfaQxnPeg6yU3BqrThk4NwPltas9Shxy60ruowit28ttmw02GAZer2DX6aHj4SYN6RT7Ay32QppMdQarTBfFmUP9UohsBwSLIqmHM9IjQdULOolIb7ltCUJ4DciUgXu2FYv8MpFmDC4+9a7EjRsX60UtHHWw2RXcYVY5w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1762582386; c=relaxed/simple; bh=DgH5GUT7j3a/+liLaMLDQ+ppgc87s/ERzvidbBqi8Oc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=bkikl/JRoX4zln4YTg/f/wrUrA+yGv5EE4xNA2rco9ct1p3/Ep5t5+ccuLWMtRTY0rjfC0TZpHDgxaxIbymlkTKFPAEjnUy3Pv5GTMV9SHITJvc/mS4ym28yzZzas4icQjD63IrTsk21HMoVa6qVLROFf7rJ/2/TH8os8YoZzn8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=codewreck.org; spf=pass smtp.mailfrom=codewreck.org; dkim=pass (2048-bit key) header.d=codewreck.org header.i=@codewreck.org header.b=B+D3byKt; arc=none smtp.client-ip=62.210.214.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=codewreck.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=codewreck.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=codewreck.org header.i=@codewreck.org header.b="B+D3byKt" 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> Precedence: bulk X-Mailing-List: ceph-devel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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> 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 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 lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (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 18F6BCCFA1A for ; Sat, 8 Nov 2025 06:32:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:In-Reply-To:MIME-Version:References:Message-ID:To:From:Date:Sender: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7gj5cYumCssdzCrlJIiHE6ooQtVEBuwMWuG+RtLL+eQ=; b=LmPi/TCXYtJP8p5R684bY8FTji 5hJ7BpX47mbGCxmEAF2FFh1r2FjEAfUHFfBaidHnjk+pjEvoRjrfraK/F9u5imwv2hM1QydLmXudM sJNU6oiU41bP8XMXDdNJWd7pfrZfjUWrAYMLPfpblo5HO1ze4tTed0ZhmuunAcwgw4zM=; Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1vHcUQ-0003cw-0P; Sat, 08 Nov 2025 06:31:58 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1vHcUL-0003cd-JH; Sat, 08 Nov 2025 06:31:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=LTM5LkyL3mfB0IbHJeS1oRharyj4iNDNdaZ7y5irjmg=; b=DnzaufUhsKuCnw/Let6ku7+kn2 1YV/u+276LisnmCAqrsiamrACo3fUOhztJB4q0Z2hBF4wlwpQuI/3GIORmxXjp9oE3k5pSsIn8Xz2 Q99YL/atqvcqnRUFuoil7jcdIp4hzb1KfqDxp+si3yfm0uAHWNHJv04yQHwYUBOUFPeQ=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=LTM5LkyL3mfB0IbHJeS1oRharyj4iNDNdaZ7y5irjmg=; b=m5P1eTyUCVTW52/h9QvF1r5B/k +wp1LbEPRHTfPfVw54gU6MUev6Wwf0LZxe/kSN3cgrsSoKPxDhNbe1Z0nj8XJ4aXFgv5HwJk71QXf 5Z7ms2KS5KihuHzWLZwvE4YSK1gLnGFX1U7tehuxmH+woIzg1n1v0erGi3gyWwGlE27Y=; Received: from submarine.notk.org ([62.210.214.84]) by sfi-mx-2.v28.lw.sourceforge.com with esmtp (Exim 4.95) id 1vHcUJ-0001QA-Tt; Sat, 08 Nov 2025 06:31:53 +0000 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 Message-ID: References: <20251107-create-excl-v2-1-f678165d7f3f@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20251107-create-excl-v2-1-f678165d7f3f@kernel.org> X-Headers-End: 1vHcUJ-0001QA-Tt Subject: Re: [f2fs-dev] [PATCH v2] vfs: remove the excl argument from the ->create() inode_operation X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Latchesar Ionkov , Paulo Alcantara , Mike Marshall , linux-xfs@vger.kernel.org, Tyler Hicks , devel@lists.orangefs.org, Shyam Prasad N , Jan Harkes , linux-um@lists.infradead.org, Alexander Viro , Ronnie Sahlberg , John Paul Adrian Glaubitz , Eric Van Hensbergen , Christian Brauner , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Andrew Morton , Trond Myklebust , Dave Kleikamp , David Hildenbrand , linux-cifs@vger.kernel.org, linux-nilfs@vger.kernel.org, Hugh Dickins , codalist@coda.cs.cmu.edu, Namjae Jeon , Yangtao Li , ocfs2-devel@lists.linux.dev, Jaegeuk Kim , OGAWA Hirofumi , Theodore Ts'o , Miklos Szeredi , "Gustavo A. R. Silva" , linux-f2fs-devel@lists.sourceforge.net, gfs2@lists.linux.dev, Anna Schumaker , linux-efi@vger.kernel.org, Martin Brandenburg , Kees Cook , Yuezhang Mo , Carlos Maiolino , Chris Mason , linux-mtd@lists.infradead.org, linux-hardening@vger.kernel.org, Marc Dionne , linux-afs@lists.infradead.org, Jonathan Corbet , NeilBrown , linux-doc@vger.kernel.org, "Matthew Wilcox \(Oracle\)" , coda@cs.cmu.edu, Viacheslav Dubeyko , Ilya Dryomov , linux-ext4@vger.kernel.org, Amir Goldstein , Baolin Wang , ceph-devel@vger.kernel.org, Oscar Salvador , David Howells , linux-nfs@vger.kernel.org, Joseph Qi , samba-technical@lists.samba.org, Steve French , Jeremy Kerr , ntfs3@lists.linux.dev, Hans de Goede , jfs-discussion@lists.sourceforge.net, Muchun Song , Jan Kara , Christian Schoenebeck , Bob Copeland , Konstantin Komarov , linux-mm@kvack.org, Andreas Dilger , Mikulas Patocka , Ard Biesheuvel , Anton Ivanov , Andreas Gruenbacher , Richard Weinberger , Mark Fasheh , ecryptfs@vger.kernel.org, Tom Talpey , Bharath SM , "Tigran A. Aivazian" , David Sterba , Xiubo Li , Ryusuke Konishi , v9fs@lists.linux.dev, linux-unionfs@vger.kernel.org, Johannes Berg , Sungjong Seo , David Woodhouse , linux-karma-devel@lists.sourceforge.net, linux-btrfs@vger.kernel.org, Joel Becker Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net 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 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel 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 02AADCCFA18 for ; Sat, 8 Nov 2025 06:13:16 +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=9pzhsXiX34ARFVL0K4hzI0GNEYeKNshRl8m9qYHj3QA=; b=toFKzq/5qMZeZX 6S/qkwizA+MGbxVhvlSuhFSgyk52nOefCU3Me/QeX13ttxOn6Aw6flsjlVufkD5DIb2+k49dn/rpH I3dSQseeLPNHeZZNeO1/3aHyPSGosmcomHeGi2VdulnVPzDQO19sbenWIHz7QGfGFg+7ZL6A1TzRp tt7g8azpikXXKGtfLZXg4nN8Pp6b9Rww+DVtaz35Bvp6Da0VnIqYzd5TMLzAJcX7vBbuv76T37H9a izD9RbXhNNS/tc4821DX4pcY2845/OkZkDqxIsS7Vkbm3FNegmVlSSH7U3HyWJMWVy6N/3/sNJkxC VaoovNCXp2P2wKDljTtA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vHcC8-00000002aMP-0XpO; Sat, 08 Nov 2025 06:13:04 +0000 Received: from submarine.notk.org ([62.210.214.84]) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vHcC4-00000002aLm-2aHl; Sat, 08 Nov 2025 06:13:02 +0000 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-Disposition: inline In-Reply-To: <20251107-create-excl-v2-1-f678165d7f3f@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251107_221301_072936_674B4C53 X-CRM114-Status: GOOD ( 18.36 ) 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 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 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/