From patchwork Mon Aug 7 11:26:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 13343857 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 3883BC41513 for ; Mon, 7 Aug 2023 11:30:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232743AbjHGLag (ORCPT ); Mon, 7 Aug 2023 07:30:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232727AbjHGLaZ (ORCPT ); Mon, 7 Aug 2023 07:30:25 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7966610C6; Mon, 7 Aug 2023 04:27:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description; bh=/Zn3NpNJWq/hZ5prwh3EWG/jr2VOTrVu8Gph2i+fSUQ=; b=1hOyzHBDzvjoL9S9paVvMSG/Ev 86tUyqf5KZEiWSRo8pRl7Qzrf9SVzlA6JoV3gOzYsKNh8QFyAoG7vVUqGGbDG5b/D9IJOvN4wtryF OmwL71CG+z8jKK65wWU6RHq5k6lQ1ZOMxyoDiTRlnHl3JP/poDNyeJp+0s3UxHnG7HKXgGwker+qY CTe+ZQLc8WRFoLmGkpk+5/Y5tEk90PxlZNQWRLfsLuVx1KlS1q/6bIDCWx85dMi3S4g/S+/Y7mT3U jqn9PMlWI1dj+mK97db0zfvhLZEPFSz1Ipf+ZClZ5m9Ss/fN4s8EdfFhIwHjiSwMkPHLsEuNpmpkM OkdQPMpA==; Received: from [82.33.212.90] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1qSyNn-00H58p-3C; Mon, 07 Aug 2023 11:26:44 +0000 From: Christoph Hellwig To: Al Viro , Christian Brauner Cc: "Theodore Ts'o" , Andreas Dilger , Mark Fasheh , Joel Becker , Joseph Qi , Jens Axboe , linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, ocfs2-devel@lists.linux.dev, linux-block@vger.kernel.org Subject: [PATCH 2/4] ext4: don't use bdev->bd_super in __ext4_journal_get_write_access Date: Mon, 7 Aug 2023 12:26:23 +0100 Message-Id: <20230807112625.652089-3-hch@lst.de> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230807112625.652089-1-hch@lst.de> References: <20230807112625.652089-1-hch@lst.de> MIME-Version: 1.0 X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org __ext4_journal_get_write_access already has a super_block available, and there is no need to go from that to the bdev to go back to the owning super_block. Signed-off-by: Christoph Hellwig Acked-by: Theodore Ts'o --- fs/ext4/ext4_jbd2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index 77f318ec8abb78..b38d59581411c0 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c @@ -234,8 +234,7 @@ int __ext4_journal_get_write_access(const char *where, unsigned int line, might_sleep(); - if (bh->b_bdev->bd_super) - ext4_check_bdev_write_error(bh->b_bdev->bd_super); + ext4_check_bdev_write_error(sb); if (ext4_handle_valid(handle)) { err = jbd2_journal_get_write_access(handle, bh);