Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp2861461rdh; Wed, 27 Sep 2023 15:27:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGz+VpqeAfN1vvEAEySXBwtW9IMYEJqVWowp8ITalsYtfVDo0z3kPglGeaeYxFpxCH1Lfkg X-Received: by 2002:a05:6358:9042:b0:145:6e16:fa86 with SMTP id f2-20020a056358904200b001456e16fa86mr4460850rwf.22.1695853622193; Wed, 27 Sep 2023 15:27:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695853622; cv=none; d=google.com; s=arc-20160816; b=aYWbYGKulXf5jEIEFipTX/4noIaywSd3izTryNeXBpCysabYOH+DuD/wZQD0qw+Fts 6KQiVsLusRa/pY98Y6pDvTx4+XQnWQQIvnfrqRSgjMJtmyTtRTrJY/cTHdkycZ7L98/D pYehn10zakmPRZx2lv9p3Ws0tF4CFO58s9wDYO9nttt/pH4H1MmPsNd5DkAxvDqt26lA aS5XJ9oxwuT4p3fREu2q3wFnJg6YgIrEjWdmdsEG4NODUMQuQ+J07u3dx78Dynnc9DCn fQomRVtGYqzD88iWKV1KscgvydjmrgHUGzMSGqGx97+XqrJJP6abIp9UQ4dusnpvKOk3 N+pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:references :in-reply-to:mime-version:dkim-signature; bh=1wcyeaO32bSJUSTh9kt7Myh0bGIAbOaRoe3l7edBb+0=; fh=7iUx9eNj8ESRbILXIwt44C6GlUAWyLWvjd+Z197w0M0=; b=RjMGhld2UH5xNONMwVbWXHjAx6t5J3C5vWyWG8RCJwwkJGyH/fZOimPDQtR/C6jzM+ JIIpAWGXXeDwG+F8dNGK4R97VYppYKimeK6LJK38fmDIZQ0TFDKXnwwuFqehaIcvi3+I gYkMSPsvEnJOy/+HKUGeV+O5QQ3/Stc5nn2YhF+rlJ4MBwBuHm7/H7zOf1RnPd9zg/4l MkrBDafqBAs1ERc7wwGFEPwA75LW85OGy2s9B5hcSwTSEwSrECUsFsDXrG0jplAu7kL8 ULNFCGMF6NXhveY04n9jmyi8/IcO77YdYqODuzWNplTr9kqJOzUYd61ABCNeFlKd1E+d K14w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gN0548ic; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id fa40-20020a056a002d2800b0068ff3927553si17917008pfb.35.2023.09.27.15.27.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Sep 2023 15:27:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=gN0548ic; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id DF8D9804BDF4; Wed, 27 Sep 2023 07:35:00 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232141AbjI0Oey (ORCPT + 99 others); Wed, 27 Sep 2023 10:34:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232050AbjI0Oev (ORCPT ); Wed, 27 Sep 2023 10:34:51 -0400 Received: from mail-oo1-xc2f.google.com (mail-oo1-xc2f.google.com [IPv6:2607:f8b0:4864:20::c2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 801ABF9; Wed, 27 Sep 2023 07:34:48 -0700 (PDT) Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-57bb6b1f764so4102693eaf.2; Wed, 27 Sep 2023 07:34:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695825288; x=1696430088; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1wcyeaO32bSJUSTh9kt7Myh0bGIAbOaRoe3l7edBb+0=; b=gN0548ichyFLvn5itazQb0pK2HlGGlxOzAN9FDiSEz1E74ZUK42ttWwZ4TNYVhUdbv DkHdVK4rdwGFSza5dq41kSgqwrs7GJYpbZSFli7bIygcC2F5LuBU9n9TdfB047eQf2ly Pc4ckyipXDORsMOki3wHnr7aUtDAopElgpc+u0GMYfSeCO8VjqR+OeQJLGs3mvBPcs9z nsOjnJIzJvKJx3yxHe90lxCCYpNRfQoG6OWrRwjV/7WjBCNpx9Mpi5rcENZyWtaiurQ0 fur+hHXYj+ykpLHm1hf/M21jntZ0pgQOHy6sP4WiOndIjxna2fFiU/AeLJcfYRQLb40m qxwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695825288; x=1696430088; h=cc:to:subject:message-id:date:from:references:in-reply-to :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1wcyeaO32bSJUSTh9kt7Myh0bGIAbOaRoe3l7edBb+0=; b=XcJhc2woiHD5ugW8TOMcvLbLj/xhKa3yPquyy8sJ+EDS9TpJnvVMw8S+RoJxhlcWvB nNhnaZze/LjZE/E/LvkqVP8heSGzSZatMunsRho98jksHyl5I/7HESFmbpmY0PJOnHGA hDuU3pkXLIcE9XRQiYpbDYvZCrqTBDvEusOFi7GComCmt6CR5/69zvb+UhrgV6p9ZI0h cyQZqWX8+Y7PIRtfZ6QwdudEPkLtVbyShr7AIEIEadN9YWOhi/VYRV+R8aX0FJ/rmkt3 EcE/mYlcFjC28ydUoM13ANvlJxZtgjNrFLnbbLeqWnLimpCUMEDAqk5+EcWejHjTl/qQ g2iA== X-Gm-Message-State: AOJu0YxK0oCpOQL3FwJ4XRganb/ZcZOr3Pp36i2khc0+Q0+P6Fk153G3 a1OdfO9OwUZOv3nOoXZqZKMJG1iSs76zEeq2KAQ= X-Received: by 2002:a4a:6c58:0:b0:57b:6ab1:87c9 with SMTP id u24-20020a4a6c58000000b0057b6ab187c9mr2324019oof.0.1695825287657; Wed, 27 Sep 2023 07:34:47 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:5785:0:b0:4f0:1250:dd51 with HTTP; Wed, 27 Sep 2023 07:34:47 -0700 (PDT) In-Reply-To: <20230927-kosmetik-babypuppen-75bee530b9f0@brauner> References: <20230926162228.68666-1-mjguzik@gmail.com> <20230927-kosmetik-babypuppen-75bee530b9f0@brauner> From: Mateusz Guzik Date: Wed, 27 Sep 2023 16:34:47 +0200 Message-ID: Subject: Re: [PATCH v2] vfs: shave work on failed file open To: Christian Brauner Cc: Linus Torvalds , viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 27 Sep 2023 07:35:01 -0700 (PDT) On 9/27/23, Christian Brauner wrote: >> I don't have a strong opinion, I think my variant is cleaner and more >> generic, but this boils down to taste and this is definitely not the >> hill I'm willing to die on. > > I kinda like the release_empty_file() approach but we should keep the > WARN_ON_ONCE() so we can see whether anyone is taking an extra reference > on this thing. It's super unlikely but I guess zebras exist and if some > (buggy) code were to call get_file() during ->open() and keep that > reference for some reason we'd want to know why. But I don't think > anything does that. > > No need to resend I can massage this well enough in-tree. > Ok, I'm buggering off to other patches. Thanks. -- Mateusz Guzik