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 X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5114CC2B9F4 for ; Sat, 19 Jun 2021 12:42:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32C086128C for ; Sat, 19 Jun 2021 12:42:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234208AbhFSMo0 (ORCPT ); Sat, 19 Jun 2021 08:44:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234109AbhFSMo0 (ORCPT ); Sat, 19 Jun 2021 08:44:26 -0400 Received: from zeniv-ca.linux.org.uk (zeniv-ca.linux.org.uk [IPv6:2607:5300:60:148a::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E684AC061574 for ; Sat, 19 Jun 2021 05:42:15 -0700 (PDT) Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1luaIg-009zP9-KW; Sat, 19 Jun 2021 12:42:14 +0000 Date: Sat, 19 Jun 2021 12:42:14 +0000 From: Al Viro To: Arthur Williams Cc: linux-fsdevel@vger.kernel.org Subject: Re: [PATCH] fs: Allow open with O_CREAT to succeed if existing dir is specified Message-ID: References: <20210619110148.30412-1-taaparthur@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210619110148.30412-1-taaparthur@gmail.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Sat, Jun 19, 2021 at 06:01:48AM -0500, Arthur Williams wrote: > Make opening a file with the O_CREAT flag a no-op if the specified file > exists even if it exists as a directory. Allows userspace commands, like > flock, to open a file and create it if it doesn't exist instead of > having to parse errno. Not going to happen. It's a user-visible behaviour, consistent between all kinds of Unices, consistent with POSIX and it does make sense. NAK.