Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3122211pxb; Tue, 12 Oct 2021 22:25:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxdOfHWjjr9oW1oE5Ktjf2vzPyr5VhOmXMDP+e0FEwb2A+XHj/QFJcr1d+ChXScNTQmAQmd X-Received: by 2002:a17:90a:df13:: with SMTP id gp19mr8949474pjb.151.1634102709241; Tue, 12 Oct 2021 22:25:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634102709; cv=none; d=google.com; s=arc-20160816; b=UrTEPE0/3EUCC0AX6juTarVwGep79e0y7pGWbz46Z1UM8fK37mwb9v+CPb+cK+DTCe jtvEngCB42fa3bqJaE/JnLYZEzspXiEYzbgy3JBaa8nzJ+Vo3i1n/OOCE3YJxiiOnZPX xHwBLGOqsKHGTYUExQqu7le8BQ9oUlYJwpbdRjcsK6LtEAX1Wv7TUl/UMwP9InncbxKX d5Bi7gGXQwmvTg1vrCGLR/jtfau+xeq9c/L569uSak4N0riA8yOufvWgRcrj1AANjSCk eNDm2B1a39nN/beV08Lueb0oLo2xZDdyt0NUZecr8zEvuAvi/es7ETT3NdxWYqyPgUbK DjLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NsQsVuWr8bWP70PtWOyIIt7IS6He0KNvqjFlC9dYhZ4=; b=zBNuAfYjjKkFY/mkyviqliE0bCSQrdl8TKj5e46tJqfsl7TVtheJLja92VdMX5F82z 2X7iQz69e7pSxLlY/p2WVAWMuUtHhJM5uNPU5AylI32OV03IUAJOWVbojRobWmA0P8rY Anhohch0zfk31+CboP8JXzDC7XArnKlKVGxaGhf5LsJ4eJ/3pFEidL9kfDwJY0/u4zUS 4CaX9LDumQZooT5RpJYNmD/r8ZmvEjiGfaHuVwV//mFVrx9FMucg5HNsInPl49hcq6rq mFnIxZUsNFbsgu4ZFpNC5scJVKWAA20zKJZWTVhBduiyy4Aozcq2+z1lgS3RMobIe24+ mfMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Ew4D4bJU; 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 f13si6727564plg.382.2021.10.12.22.24.56; Tue, 12 Oct 2021 22:25:09 -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; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Ew4D4bJU; 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 S237682AbhJMF0y (ORCPT + 99 others); Wed, 13 Oct 2021 01:26:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229514AbhJMF0y (ORCPT ); Wed, 13 Oct 2021 01:26:54 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9181EC061570; Tue, 12 Oct 2021 22:24:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; 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=NsQsVuWr8bWP70PtWOyIIt7IS6He0KNvqjFlC9dYhZ4=; b=Ew4D4bJU2khGePoaHa7o+E3zV6 +YnBcRQumMxslqX1pbHbi2x3aZu0jSa1syVga+ovHnkiUvqmRfI0DSbvlIBIons91q/y7LwBC+rt7 ljLUIJKylzikWb8/DDtXWEmbo3PVzdLaD5+UeBoEpdghnuFhnyZ+eFhNlSOqy1C3ILd1RRXjsk4SA TIYdV5+Xjmcbs8sMb8rd9XmMwXKKQ77nz+WFSnQ9FDRqElegNQrC/j0gD+AAXIN5BGiLeFOwPFtc5 SSicnwV+Z7JCkg1j3Hfq7OPsge69ggSYDVUW1Y0Wb3vn4pbsJSaM7NthMqM5vfYTZbKzMF89lBaTw B4nut1Lw==; Received: from 089144212063.atnat0021.highway.a1.net ([89.144.212.63] helo=localhost) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1maWfl-0076UD-PC; Wed, 13 Oct 2021 05:20:03 +0000 From: Christoph Hellwig To: Jens Axboe Cc: Coly Li , Mike Snitzer , Song Liu , David Sterba , Josef Bacik , "Theodore Ts'o" , OGAWA Hirofumi , Dave Kleikamp , Ryusuke Konishi , Anton Altaparmakov , Konstantin Komarov , Kees Cook , Phillip Lougher , Jan Kara , linux-block@vger.kernel.org, dm-devel@redhat.com, drbd-dev@lists.linbit.com, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, linux-mtd@lists.infradead.org, linux-nvme@lists.infradead.org, linux-scsi@vger.kernel.org, target-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, jfs-discussion@lists.sourceforge.net, linux-nfs@vger.kernel.org, linux-nilfs@vger.kernel.org, linux-ntfs-dev@lists.sourceforge.net, ntfs3@lists.linux.dev, reiserfs-devel@vger.kernel.org Subject: [PATCH 09/29] fs: simplify init_page_buffers Date: Wed, 13 Oct 2021 07:10:22 +0200 Message-Id: <20211013051042.1065752-10-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211013051042.1065752-1-hch@lst.de> References: <20211013051042.1065752-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org No need to convert from bdev to inode and back. Signed-off-by: Christoph Hellwig --- fs/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/buffer.c b/fs/buffer.c index 3fb9c5b457ab6..ef1fe4f77a952 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -897,7 +897,7 @@ init_page_buffers(struct page *page, struct block_device *bdev, struct buffer_head *head = page_buffers(page); struct buffer_head *bh = head; int uptodate = PageUptodate(page); - sector_t end_block = blkdev_max_block(I_BDEV(bdev->bd_inode), size); + sector_t end_block = blkdev_max_block(bdev, size); do { if (!buffer_mapped(bh)) { -- 2.30.2