Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1666483pxv; Fri, 2 Jul 2021 09:12:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwK7hJZDtQQVWY1b4TefGY5s6lIoTxN3RcYI6XWgB81IBuVX7mBbfTjBFvLSDApHw745iC X-Received: by 2002:a50:8a9e:: with SMTP id j30mr323095edj.72.1625242379279; Fri, 02 Jul 2021 09:12:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625242379; cv=none; d=google.com; s=arc-20160816; b=LvgsS58XQ2iIasJXcUu3aTuCWENt5exC41DDid4r5B3kLSQZPCa5RPGsm60WJrVlYE u0XCYEMEOzOSmEP/yJabTLRxJdcxNQIcMmo2Hsm84WSGqxWKPzPNAK83u7/k3oXCnN+R Z4MyGDdnbjJHsUveDO9liW3AhgPoO4ZXD4CLS7r8lycKKfMnes2Tkv4BX2Sb/yIBmUdJ lVzRacRI49dMiriGQ5zpJ4LYUD8sfA7bXsUnOSji+cgrec68J+NvSkdka8WZzsAls3Yb njSzqnYoAMz+INzUVdUwtvRSIPwQGvFKdFlnpDOSi2D/pBrr6+5o4qjRkkvVPVVDtfYi Cj2Q== 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; bh=AbH+kHiMbtIRqxFdPdH/ZHiqG8/I0M+oAZlj/oaN9uA=; b=c//abZLuGynR1C+gvzTYLj9fA9glb2Gtm52uyVsP1m+bSqK3bHKVLaqFTkX3eqiJYJ YAfs208KBWr25AIploqUdjQ3xa7CNM65FJMhBvWybicEWTzhIAcnEt5vqeICGX4tHJ/a gJ0pyGjaZruyMeUeV+sxUQs/JkaTzz/Ick/3eQUMvXzc+Dlmt+VIaILusHton7qpHy+g WAcRh1wrNZolLphwd086m5WG1N6TYQS1zfeWTOj5zFwtuPqxGVsZ90c5ficrpMMODQqt r16SdRXphaReTuQEFlzIeHFShpJ2dGQG2/BOj7RaFhhEYiUEAS7rUJWV8HdE0pgFSaE6 9tog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ne13si2144750ejc.151.2021.07.02.09.12.32; Fri, 02 Jul 2021 09:12:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229455AbhGBQOx (ORCPT + 99 others); Fri, 2 Jul 2021 12:14:53 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:32792 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229499AbhGBQOx (ORCPT ); Fri, 2 Jul 2021 12:14:53 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 162GBsrr031631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 2 Jul 2021 12:11:55 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 2749C15C3CE4; Fri, 2 Jul 2021 12:11:54 -0400 (EDT) Date: Fri, 2 Jul 2021 12:11:54 -0400 From: "Theodore Ts'o" To: Zhang Yi Cc: Jan Kara , linuxppc-dev@lists.ozlabs.org, Guoqing Jiang , Sachin Sant , Ext4 Developers List , "linux-fsdevel@vger.kernel.org" Subject: Re: [powerpc][5.13.0-next-20210701] Kernel crash while running ltp(chdir01) tests Message-ID: References: <26ACA75D-E13D-405B-9BFC-691B5FB64243@linux.vnet.ibm.com> <4cc87ab3-aaa6-ed87-b690-5e5b99de8380@huawei.com> <03f734bd-f36e-f55b-0448-485b8a0d5b75@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <03f734bd-f36e-f55b-0448-485b8a0d5b75@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Jul 02, 2021 at 09:52:13PM +0800, Zhang Yi wrote: > > Sorry about not catching this problem, this fix is not format corrected, > if you think this fix is OK, I can send a patch after test. The issue I see with your approach, which removes the jbd2_journal_unregister_shrinker() call from jbd2_destsroy_journal(), is that means that *all* callers of jbd2_destroy_journal now have to be responsible for calling jbd2_journal_unregister_shrinker() --- and there a number of call sites to jbd2_journal_unregister_shrinker(): fs/ext4/super.c: err = jbd2_journal_destroy(sbi->s_journal); fs/ext4/super.c: jbd2_journal_destroy(sbi->s_journal); fs/ext4/super.c: jbd2_journal_destroy(journal); fs/ext4/super.c: jbd2_journal_destroy(journal); fs/ext4/super.c: jbd2_journal_destroy(journal); fs/ocfs2/journal.c: if (!jbd2_journal_destroy(journal->j_journal) && !status) { fs/ocfs2/journal.c: jbd2_journal_destroy(journal); fs/ocfs2/journal.c: jbd2_journal_destroy(journal); So it probably makes more sense to keep jbd2_journal_unregister_shrinker() in jbd2_destroy_journal(), since arguably the fact that we are using a shrinker is an internal implementation detail, and the users of jbd2 ideally shouldn't need to be expected to know they have unregister jbd2's shirnkers. Similarly, perhaps we should be moving jbd2_journal_register_shirnker() into jbd2_journal_init_common(). We can un-export the register and unshrink register functions, and declare them as static functions internal to fs/jbd2/journal.c. What do you think? - Ted