Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2366105rdb; Tue, 10 Oct 2023 01:29:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEsKkUR/2l4KYiHZvTyOxIXskIofjDVPCQ+KA3yeCW7VIKhHUJGKGeq3RMPrnmSjO/0kc1k X-Received: by 2002:a0d:cf42:0:b0:595:59f:28d7 with SMTP id r63-20020a0dcf42000000b00595059f28d7mr18853842ywd.48.1696926592530; Tue, 10 Oct 2023 01:29:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696926592; cv=none; d=google.com; s=arc-20160816; b=UM/rdNULne76ebep4m/iP2+ocZt/40JyVKW/RHu2FpM3eX8bqgVet+zVjhpac/A4FI M720l4abNSDpjt+NH52iS4cuaJ5SaYtEWyXicZXF0Hm7oQD6jFKpszKsxe0lzV1xnXE1 qhRwwYuEjXAWu5L0oxlwfmHRPQG+4INlIm66m+JQQ/DcFefmWhmDEZgP5w40vwwm62Em PnHIl2bbFio+a3xb0v6a1X2n8L/f6P2CIcjqj1ie0OnzAlII7HK25FV2iGWKVN1H0P97 vYFEGUvsAV8H1gseP4RyeWLogLQxWx6GwoCKfySBHJ3xDT6f3W18mzL3QnGEbMQXRxEv 5nAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=G2gmxPo9qr9q/4sMZhVjrIqHjAU+6zUl+OhCaYFRPbA=; fh=w9d0I1kAUui9QpulBeXRIHKhJMRdW64hxEqvE/vpF40=; b=U6TVFAtIsHa4ZYICP8jcAnq8Q16QMYsYrEtOA8LbFTnRcN55tHJUQJ7uLqNwaUvaV5 S7zX19KTEQBIthCBxSh+Orn5tmQKzAdOJJYve5aVe7xl0aOyxA+9DpMJRKeGwgQDvYxw iB2f1f+G9WZy1uoIUYxEFhnwBLqcL3CIv2M5T5RS3tdGOhhGSFdQWy0HAPbV7QsyOlXt FFyAHE7cYOfGYn/9M1VnAmsrFARANHvNieYQUqZgur+u0kSDKeG9K/clsEUcWA1dzzjv DWaU6snGaT42rkYoVVXk2V55TQsL0LSlhLQLWre663RyO1lBw7E40Iq59NpBVtuXOMUe IoSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZCNENh56; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id by9-20020a056a02058900b00584af3ee495si13182922pgb.623.2023.10.10.01.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 01:29:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZCNENh56; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 88AD08095DF3; Tue, 10 Oct 2023 01:29:42 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442801AbjJJI3f (ORCPT + 99 others); Tue, 10 Oct 2023 04:29:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1442752AbjJJI3e (ORCPT ); Tue, 10 Oct 2023 04:29:34 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1ACC997; Tue, 10 Oct 2023 01:29:33 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 226F3C433C8; Tue, 10 Oct 2023 08:29:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1696926572; bh=7d1pzrVgBWaePffrFrHQloqudlsSNdK77SHld6pc7yI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZCNENh56r+Er4L033UlCmt84XhkbTUJa0O3+gIvDQPtyRTCW+GgPquxngRPIgDQ/D LwojG4+uK1IFIS8gAh4v2Z3vTje98Xmm2c/JfFIHYcgmbpUXdbsXhAc5Gb/1mOZn7z S28lL5WUebUYjS1VzAmIIHQkxY+OnJUyIjGALQXUH/bpyHg+5FGio7f+nCFmsvAatn dVI2+VcaMGKwKPcFsrJu4jyiubF+pSylaIKhsSvHJv3eQjYrxYR3qii5fY1di3szVZ oJsdtdHow+jR6KpH28zxGiTAYpFrJuxZ/DknYciTasKpVprg9adVKfHtekWpc7SKTv HvpCjWtJuyXuw== Date: Tue, 10 Oct 2023 10:29:27 +0200 From: Christian Brauner To: Al Viro Cc: Linus Torvalds , Mateusz Guzik , Jann Horn , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2] vfs: shave work on failed file open Message-ID: <20231010-statik-zoomen-49dd9e81aff6@brauner> References: <20230929-kerzen-fachjargon-ca17177e9eeb@brauner> <20230929-test-lauf-693fda7ae36b@brauner> <20230930-glitzer-errungenschaft-b86880c177c4@brauner> <20231010030615.GO800259@ZenIV> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20231010030615.GO800259@ZenIV> X-Spam-Status: No, score=2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 10 Oct 2023 01:29:42 -0700 (PDT) X-Spam-Level: ** > is buried in the previous paragraph and it's not obvious that it applies to > the last one as well. Incidentally, I would probably turn that fragment massaged to clarify > (in io_uring/openclose.c:io_close()) into > spin_lock(&files->file_lock); > file = files_lookup_fd_locked(files, close->fd); > if (!file || io_is_uring_fops(file)) { > spin_unlock(&files->file_lock); > goto err; > } done