From patchwork Wed Nov 1 17:25:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 16146 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:abcd:0:b0:403:3b70:6f57 with SMTP id f13csp583317vqx; Wed, 1 Nov 2023 10:27:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGKodU6yOtmSNCbz8jVzqbsqBOj6B8hmNWkcJ3yOZqKtsGlD68KGgpBU759ttIa1GvFynyr X-Received: by 2002:a05:6a21:7782:b0:181:731:89b7 with SMTP id bd2-20020a056a21778200b00181073189b7mr6005904pzc.41.1698859645951; Wed, 01 Nov 2023 10:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698859645; cv=none; d=google.com; s=arc-20160816; b=Fdv/otROOt9Jzs1QkpLH8Z68yeywXeaw3vlAH8rSWtKbpk0nyGRQBFsG+qda+5Vw/u WD1olh+4VHyHc7t3OjVDilu28MsSVh+IBtvyRTRTQyQpCbgACSNnciMPMkl0nFqNoCMI NYSWNNWqAtAqQz0ZHCItiTW/bH5Ylnzb+h48fO4l2X0rd3gyi6zAfBMPIN5oP7H6ASOk zjtnJyo041TPOvIkTj7td7fruBuzkyDD8qJdqd+49fF8cc93RHsij0uAZ0lLeIoWsjYv 7xCO++Snhwkr6oEdAc7mkgD9uEeB2rXlM8BSDS+2fomDRnRnRpABt7U9rDr8Ec3Bo4Bq 2mZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:user-agent:message-id; bh=t0mrBzb7CyqyXP/VwBGcEY6qUqPt24hxnFxOR8GSWzk=; fh=YYLYUNl9fi7Qz/ewHIchNEmCcZiQFtZ0DRgTn9EckYA=; b=gjBuM2ZbNkNaiqlSW7/eb7Jqi1EQXVF5E7BBJjI+6m/RSa2tZ5AeDw3lG/cPAM0Www oS5zbU3lwT2Gzmyf78iSiQXb76HpioN/irzJFRXtIiajOUs8LAM5IvIaA9unMTeaRA5z AY+Cu+xuVPKK/8xKSouWi8WVCnheoXgSOgq/Bl79xA7mFRmimWx1i/DtxyguQaXZrFNS 7Z0gQFOrlAKGhQwyN2BbVnV+nHGnZwVNW4aB8e+WaJMWhylUR2C6Zh8Ko9aKi96H9q/s 8uiOpCmthU71EUokxlWFEemdi86RC6f9PZ/39mG8xq+Ubx2bVI5gT2W09xi7zWVxfon8 wJRA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id q10-20020a65524a000000b005ae22729b09si283864pgp.683.2023.11.01.10.27.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 10:27:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 583A280CC210; Wed, 1 Nov 2023 10:27:13 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344405AbjKAR0y (ORCPT + 34 others); Wed, 1 Nov 2023 13:26:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231233AbjKAR0x (ORCPT ); Wed, 1 Nov 2023 13:26:53 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7E15A6 for ; Wed, 1 Nov 2023 10:26:50 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20062C433C7; Wed, 1 Nov 2023 17:26:50 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.96) (envelope-from ) id 1qyEzR-00EZrW-04; Wed, 01 Nov 2023 13:26:49 -0400 Message-ID: <20231101172541.971928390@goodmis.org> User-Agent: quilt/0.66 Date: Wed, 01 Nov 2023 13:25:41 -0400 From: Steven Rostedt To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Andrew Morton Subject: [PATCH v6 0/8] eventfs: Fixing dynamic creation X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 01 Nov 2023 10:27:13 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781383451963396454 X-GMAIL-MSGID: 1781383451963396454 Changes since v5: https://lore.kernel.org/all/20231031223326.794680978@goodmis.org/ This was originally based on: [PATCH] eventfs: Process deletion of dentry more thoroughly https://lore.kernel.org/linux-trace-kernel/20231031144703.71eef3a0@gandalf.local.home/ But Al Viro asked why I do not use use simple_recursive_removal()? Which at first I thought I could not, but after playing with it more I realized I could (with a little addition of dget()'s to balance the dput()s). This simplifies the code. But to do this, it really needs to be done *after* these changes. Hence, I moved that patch to after this series and to handle this rebase, I'm reposting all the patches and including the above mentioned patch at the end and renamed to: eventfs: Use simple_recursive_removal() to clean up dentries I hope this is the last series, as this *is* for this merge window! Steven Rostedt (Google) (8): eventfs: Remove "is_freed" union with rcu head eventfs: Have a free_ei() that just frees the eventfs_inode eventfs: Test for ei->is_freed when accessing ei->dentry eventfs: Save ownership and mode eventfs: Hold eventfs_mutex when calling callback functions eventfs: Delete eventfs_inode when the last dentry is freed eventfs: Remove special processing of dput() of events directory eventfs: Use simple_recursive_removal() to clean up dentries ---- fs/tracefs/event_inode.c | 420 ++++++++++++++++++++++++++++++++--------------- fs/tracefs/internal.h | 29 +++- include/linux/tracefs.h | 43 +++++ 3 files changed, 357 insertions(+), 135 deletions(-)