Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1540802pxv; Fri, 2 Jul 2021 06:22:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx5tB4HoQYbw5Jl+lzq4uWZBo1rb0VnNFaZeLX3eLtMlBmu/1C65ZmZapiSKzDE+ostUfsV X-Received: by 2002:a05:6602:1c4:: with SMTP id w4mr34067iot.44.1625232127566; Fri, 02 Jul 2021 06:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625232127; cv=none; d=google.com; s=arc-20160816; b=XB5jYnKFijm2lajQyrzsfkMlwbcLwpp47AxKe6Wy3c77eyl1IWw/XjerTC+P8zvPI8 lasH3dgKojaAmtsI5OyGuAdxJYwbTkVGC46Bt0EsOpRAAh1d5tDHIig7+oLvHUIDKM9f xw2UHzSdtJ6kIIpoeaKV584mgMkJkRd9MqhwBRnjlXafm7cyuetvxclKXtUu2pYchOSm /4OcIB2AlAfr1HEb4wg7WgfTqFda906Rcz+p+fDxaOWpUtsR2h5tSthcxMqTVfOUXLo5 LEO6SYa+ABT+osDSwyNtvBha5LNx/M+SPtdFnTiqdJiw05ehdtc6eNH34tGZYePzT2Mp 6kJA== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=LmsPUJBnT141nRco1ufRbc73VVjW9zGY2LMvIKKPiDA=; b=tzHYIIW1iqlUT/2qmv3kcK9zdDdcQK42MEE7Co2NfFEx0Yu5mD7EBquMjMSZje323z HlfrHG2Ct5JHaYJq37q2jfxfXU4sC7T+wZvdLwE63lrKjuDcpBEKZ7sYK8tlFUABTcTA eOMok0mOUAj6m5RJKVqIhaUW0mpDoaa8t4n59g3kTXhbZ1yksCz+BT0RjuiU41B6mYa7 Hh87bQ3hHp2hTdUdYEIClUFeAU0L0e6v+Ni5+pWAE6sqHiOFY0fMjItTceTEPdS7WoC7 tUFBnctOJCndrhf3qIILRv/Zouua++hqIp0Usf9CthnjXy4aY7cgaYIXHF4SaGlgwCIb Ydvw== 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 c14si3348886ilu.89.2021.07.02.06.21.50; Fri, 02 Jul 2021 06:22:07 -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 S231700AbhGBNQV (ORCPT + 99 others); Fri, 2 Jul 2021 09:16:21 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:40717 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231743AbhGBNQU (ORCPT ); Fri, 2 Jul 2021 09:16:20 -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 162DDKDI002165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 2 Jul 2021 09:13:21 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id AE97615C3CE4; Fri, 2 Jul 2021 09:13:20 -0400 (EDT) Date: Fri, 2 Jul 2021 09:13:20 -0400 From: "Theodore Ts'o" To: Guoqing Jiang Cc: Sachin Sant , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, yi.zhang@huawei.com, jack@suse.cz 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Fri, Jul 02, 2021 at 05:38:10PM +0800, Guoqing Jiang wrote: > > > I guess the problem is j_jh_shrink_count was destroyed in ext4_put_super _>? > jbd2_journal_unregister_shrinker > which is before the path ext4_put_super -> jbd2_journal_destroy -> > jbd2_log_do_checkpoint to call > percpu_counter_dec(&journal->j_jh_shrink_count). > > And since jbd2_journal_unregister_shrinker is already called inside > jbd2_journal_destroy, does it make sense > to do this? > > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -1176,7 +1176,6 @@ static void ext4_put_super(struct super_block *sb) > ??????? ext4_unregister_sysfs(sb); > > ??????? if (sbi->s_journal) { > -?????????????? jbd2_journal_unregister_shrinker(sbi->s_journal); > ??????????????? aborted = is_journal_aborted(sbi->s_journal); > ??????????????? err = jbd2_journal_destroy(sbi->s_journal); > ??????????????? sbi->s_journal = NULL; Good catch. There's another place where we call jbd2_journal_unregister_shrinker(), in the failure path for ext4_fill_super(). - Ted P.S. Whatever outgoing mailer you are using, it's not preserving TAB characters correctly. You might want to look into that before trying to submit a patch.