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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04D0FC04A94 for ; Tue, 8 Aug 2023 18:41:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232921AbjHHSl1 (ORCPT ); Tue, 8 Aug 2023 14:41:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232427AbjHHSlI (ORCPT ); Tue, 8 Aug 2023 14:41:08 -0400 Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CBF07B0D5A; Tue, 8 Aug 2023 10:48:56 -0700 (PDT) Received: from in02.mta.xmission.com ([166.70.13.52]:60450) by out02.mta.xmission.com with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1qTQp5-005HbQ-UB; Tue, 08 Aug 2023 11:48:48 -0600 Received: from ip68-227-168-167.om.om.cox.net ([68.227.168.167]:53030 helo=email.froward.int.ebiederm.org.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1qTQp4-007M6d-Rd; Tue, 08 Aug 2023 11:48:47 -0600 From: "Eric W. Biederman" To: Linus Torvalds Cc: Christian Brauner , Mateusz Guzik , viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, oleg@redhat.com, Matthew Wilcox References: <20230806230627.1394689-1-mjguzik@gmail.com> <87o7jidqlg.fsf@email.froward.int.ebiederm.org> <20230808-jacken-feigen-46727b8d37ad@brauner> Date: Tue, 08 Aug 2023 12:48:05 -0500 In-Reply-To: (Linus Torvalds's message of "Tue, 8 Aug 2023 10:22:18 -0700") Message-ID: <87ttt9ctnu.fsf@email.froward.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1qTQp4-007M6d-Rd;;;mid=<87ttt9ctnu.fsf@email.froward.int.ebiederm.org>;;;hst=in02.mta.xmission.com;;;ip=68.227.168.167;;;frm=ebiederm@xmission.com;;;spf=pass X-XM-AID: U2FsdGVkX1/Qb/aRBSYlgQSNZ4G5ISBQguxHy+ocYwk= X-SA-Exim-Connect-IP: 68.227.168.167 X-SA-Exim-Mail-From: ebiederm@xmission.com Subject: Re: [PATCH] fs: use __fput_sync in close(2) X-SA-Exim-Version: 4.2.1 (built Sat, 08 Feb 2020 21:53:50 +0000) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus Torvalds writes: > On Tue, 8 Aug 2023 at 10:15, Christian Brauner wrote: >> >> I think you're at least missing the removal of the PF_KTHREAD check > > Yup. > >> It'd be neat to leave that in so >> __fput_sync() doesn't get proliferated to non PF_KTHREAD without us >> noticing. So maybe we just need a tiny primitive. > > Considering that over the decade we've had this, we've only grown two > cases of actually using it, I think we're fine. That and two cases of flush_delayed_fput() followed by task_work_run(). That combined with a maintainer who was actively against any new calls to __fput_sync and a version of __fput_sync that called BUG_ON if you used it. So I am not 100% convinced that there were so few calls to __fput_sync simply because people couldn't think of a need for it. Eric