Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp306091rwn; Thu, 8 Sep 2022 01:45:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR7DIE9oTuSb5nLmyqvXQjAxbnME9IwbhWSeCJnUHx+k0GWkYqn6QXBB+AXswtGlj2md1Kp/ X-Received: by 2002:a17:90b:4ac4:b0:202:6d3d:3b60 with SMTP id mh4-20020a17090b4ac400b002026d3d3b60mr1641809pjb.197.1662626734033; Thu, 08 Sep 2022 01:45:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662626734; cv=none; d=google.com; s=arc-20160816; b=u6dOfnhQmECLwzOXPPg47FlQlU0nlklqP8HgtdZf7VhWLsKH+O/E1YsnKb9IhZxNDS Q7u87mckCnoFSnwzDbBalntJWRQDFP9ioIhiVfsyZD2hD5vO3LEtk1zApCIFU2w5jwiS n5OFzxACuY9YOzCY78KAt8Hm7HvgFHFypvruMARNuiZVibTQYlR7ae1JHapcyZ6kmMG8 mMtR3mJMQ7xbzwPrb4HErSQn7leCK1RKH+jDZL1gThjKb+k55LfAJRQmEvr1jdl+vIxL bdc4hLnPkqFaVtQOTM6ZJLK3vezv3mAO7XJk418a7SGv2XvABpJeNhVSLu8XVK1wYtQ0 wDbA== 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:dkim-signature; bh=FbL6wbQTIIA+Tbn+IEhcdmbXS3h7pNSPA7zhMvPEliY=; b=FEL+Oc1/SDwa+B3EINZ5MH9fXS2eHBYErOnp4EGGFqMVhdDWRqaNsy0y+0gVC9qNWk pc6LreugVNq94v88PAUm4jeCQEZfZURIF747LhYyQ4fzXaAXle8V/GYVg3aZ2uTZZqc4 EoxTARwOkOVDHQCJZZfsy7c9a4h/fuCYbdqJN8gQQMDVSawC92OGf2x9hNWKBXKytHs9 ZlbE3ZQcoUk88LS0a7uNgGt12qvrq5gFtKD8QyTetILugRXRQ1vulBoRjpUTTaWXJJjE oclkMJFo9ZVgNVMeCuAfm2EqF0zHO7YyTzQFbnHFNNz4oKHuUKIOv+B/saOa5zIZoluw Qy8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UkA8q9My; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a14-20020a631a0e000000b0042ff15fca8dsi16849889pga.724.2022.09.08.01.45.20; Thu, 08 Sep 2022 01:45:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=UkA8q9My; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231193AbiIHIjs (ORCPT + 99 others); Thu, 8 Sep 2022 04:39:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231171AbiIHIjc (ORCPT ); Thu, 8 Sep 2022 04:39:32 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E8A4764EF for ; Thu, 8 Sep 2022 01:39:28 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id u22so17095396plq.12 for ; Thu, 08 Sep 2022 01:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date; bh=FbL6wbQTIIA+Tbn+IEhcdmbXS3h7pNSPA7zhMvPEliY=; b=UkA8q9My1o0gUvxofouecCNQyUvkIokIJy2tbzGIAGx5XDFqKrwcFWUQG5rrcAay8h S3vV2yzQ1NwUD0xPlrnC5U+PT8KWJOdx2MQNXInL5I5puTP/quwmArjUnKY9vnhGvSnb cvadn32jzVljiUYXNSi1Mq1H2iHAp/iSKh7TGtPZ2/WMtkpvfvykfCyKvTAec9SR7Lkz 8Hji8lNQ5l116YF5c7I69PGsfKyUbFpKwAGfTmtSvjfsq19V4Xx5ShH7tr3FBTTJ0cwy e1SEOXhfOy8QOCk8ADG+TmdUfi1rO79S/d71ZzlVLkakOr8jRzrCcbL9MZexjAWWZo// h01A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date; bh=FbL6wbQTIIA+Tbn+IEhcdmbXS3h7pNSPA7zhMvPEliY=; b=JdZaC7cAianXlgyiK/Wkq9lHu+2FfNImgQbsIn1z2m9ySxEXOQxpEhJoTdxfLeer9i IFXpsYwYCnqk54I3nBvkyuk+RR4OvvmfIahTnRl1sWjaxvQyYFP6Zn235Px4Uq/ZjOzE QLrZWIOI+5zX90uEpUSP1RaPpH2nknDe1T/EKG/Rl1kMFlPacXgSwmaMEX0T1IK2XyHI eR5oX3ZYO/8nFl6rN2nabQRCi0DO13VrVdxOhbqm6Dhv0Dv/8xjcqvrdONZ5rkla4vze hP4M8Fd5iejCNzPq0OBOv+ksnlkWqlXTZ/OZ0nTD2OPGugOP+wVlKPJiKcyN2prSkZQI GbEw== X-Gm-Message-State: ACgBeo0vf9Dy4TgkAW+kwGyZIN2pEuYt5oasob0OPK1CLpOOuZr+Ysoh 3LCkTD4Xkkz66+UAVHKX0eo= X-Received: by 2002:a17:90b:1c11:b0:202:5301:a820 with SMTP id oc17-20020a17090b1c1100b002025301a820mr3095471pjb.193.1662626368311; Thu, 08 Sep 2022 01:39:28 -0700 (PDT) Received: from localhost ([2406:7400:63:83c4:f166:555c:90a1:a48d]) by smtp.gmail.com with ESMTPSA id w24-20020aa79558000000b0053725e331a1sm14019586pfq.82.2022.09.08.01.39.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Sep 2022 01:39:27 -0700 (PDT) Date: Thu, 8 Sep 2022 14:09:22 +0530 From: "Ritesh Harjani (IBM)" To: Jason Yan Cc: tytso@mit.edu, adilger.kernel@dilger.ca, jack@suse.cz, lczerner@redhat.com, linux-ext4@vger.kernel.org Subject: Re: [PATCH v2 01/13] ext4: goto right label 'failed_mount3a' Message-ID: <20220908083922.cbwpwp7lmr3wqco3@riteshh-domain> References: <20220903030156.770313-1-yanaijie@huawei.com> <20220903030156.770313-2-yanaijie@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220903030156.770313-2-yanaijie@huawei.com> 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_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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-ext4@vger.kernel.org On 22/09/03 11:01AM, Jason Yan wrote: > Before these two branches neither loaded the journal nor created the > xattr cache. So the right label to goto is 'failed_mount3a'. Although > this did not cause any issues because the error handler validated if the > pointer is null. However this still made me confused when reading > the code. So it's still worth to modify to goto the right label. > > Signed-off-by: Jason Yan > Reviewed-by: Jan Kara > --- > fs/ext4/super.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) This looks good to me. Reviewed-by: Ritesh Harjani (IBM) > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > index 9a66abcca1a8..6126da867b26 100644 > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -5079,30 +5079,30 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb) > ext4_has_feature_journal_needs_recovery(sb)) { > ext4_msg(sb, KERN_ERR, "required journal recovery " > "suppressed and not mounted read-only"); > - goto failed_mount_wq; > + goto failed_mount3a; > } else { > /* Nojournal mode, all journal mount options are illegal */ > if (test_opt2(sb, EXPLICIT_JOURNAL_CHECKSUM)) { > ext4_msg(sb, KERN_ERR, "can't mount with " > "journal_checksum, fs mounted w/o journal"); > - goto failed_mount_wq; > + goto failed_mount3a; > } > if (test_opt(sb, JOURNAL_ASYNC_COMMIT)) { > ext4_msg(sb, KERN_ERR, "can't mount with " > "journal_async_commit, fs mounted w/o journal"); > - goto failed_mount_wq; > + goto failed_mount3a; > } > if (sbi->s_commit_interval != JBD2_DEFAULT_MAX_COMMIT_AGE*HZ) { > ext4_msg(sb, KERN_ERR, "can't mount with " > "commit=%lu, fs mounted w/o journal", > sbi->s_commit_interval / HZ); > - goto failed_mount_wq; > + goto failed_mount3a; > } > if (EXT4_MOUNT_DATA_FLAGS & > (sbi->s_mount_opt ^ sbi->s_def_mount_opt)) { > ext4_msg(sb, KERN_ERR, "can't mount with " > "data=, fs mounted w/o journal"); > - goto failed_mount_wq; > + goto failed_mount3a; > } > sbi->s_def_mount_opt &= ~EXT4_MOUNT_JOURNAL_CHECKSUM; > clear_opt(sb, JOURNAL_CHECKSUM); > -- > 2.31.1 >