Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp824645pxb; Fri, 15 Oct 2021 17:22:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRbrd7WyObIlktGAY17TAlxsX24ARXg0GUX2AQQnEDXb94Kf52TlN/nZZIjaXx31MsmIpB X-Received: by 2002:a63:de51:: with SMTP id y17mr11577919pgi.235.1634343755060; Fri, 15 Oct 2021 17:22:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634343755; cv=none; d=google.com; s=arc-20160816; b=OLJ79GJ1mL4rKNBOSVEBnpoLujub/4mU3hTw7NpPWUjYnNy1HlrY8R1hQ49cvBEBA6 7C4D1no7/5xol/GSeqB27OVQobZ1ePRAq0wWxTwD0IS3svnZjTV6OpcQaw5BsdLfZBuI FNZFgJsi6FMWmet8Q2MOKMuJ3E1+B3L6YSxHcv3r3cwwDYh9+dEB9MqOD3EqGREoMlrS e+koVfyNmh2+m45JCBxbfORQV4eNatquecy3+sGc4wONQtLla4aY4mzXoums48VxswzM IncesiCm5t8UO9bj6f7zUF5+v8UScORuLK6yawac+Xa6F1WO5hea+N+Uokn7EDndwK1B bLfQ== 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=ai4Hawm9L0+YfyvXsxKoJvFRQPPtEAYUdrDSGvUezpg=; b=0JmyORaLnk96Xut2x55eSKUpLcUkBAS3uW6JAyPoq9P7souWRI8UvH5lMyZeD/Wvmq abf2QytNmi/Iqwb71WqdmbaR1lKJpBN5ygkeuE9I7WidnJUuPJkR5/15KhzyT81/zzoY SfIQUMNXxlI/s2lt2HWwow14k3PtspvDGTzRB7Jwl0mSFSUrNAykIJrVgIufF3YR8LdD Fk/Z8XfuyiAK9uXRVK9SUW69ezlFW0JhAWYaR7PXa+FnlEc+p8kRXx45XgurkhbwBu9+ DBQCngWB85H+ZJFY0PbfyFRBteC1uRaMfcZ1Aljtct/45iSEIEO1/+EA7jG+TUjfEFGP gZhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="Fv/TNdfZ"; 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 g11si9462571plp.180.2021.10.15.17.22.22; Fri, 15 Oct 2021 17:22:35 -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=bombadil.20210309 header.b="Fv/TNdfZ"; 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 S239535AbhJONbh (ORCPT + 99 others); Fri, 15 Oct 2021 09:31:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236455AbhJONaS (ORCPT ); Fri, 15 Oct 2021 09:30:18 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABF29C06177A; Fri, 15 Oct 2021 06:27:43 -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=ai4Hawm9L0+YfyvXsxKoJvFRQPPtEAYUdrDSGvUezpg=; b=Fv/TNdfZ5HNAZQvGuHlus1BTgZ cp7/gVw0FYdafMMg8RtWpKMrpcV5QXlA2qaZ8jp/MhStUsC9Xl3q/wB9/kg7sOCDhuqjVbI63Um1D h4MlDBQKlR5NZNquOMxzGkd8ROXXi+oxcew3ox5zv9ddNb9kpKVe726+PvFh7RD84Hu/LCuilqO5W Ug5zbJhTnZrFhEpy1p922CcIjcgU0F6i4u96lUI0EBOjyS1r5xOUC1aSEVjb1WEngVGIZVIGyhL0p EmF9/PMsmmCzUiYhS4ifjNGVPpas9tStfxLgkilKELEFACMDHge4tuUAHJDuhXz0IUZYvYUIdjFHG SHJjDLOw==; Received: from [2001:4bb8:199:73c5:ddfe:9587:819b:83b0] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mbNFC-007DIv-6E; Fri, 15 Oct 2021 13:27:30 +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-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, Dave Kleikamp Subject: [PATCH 17/30] jfs: use bdev_nr_bytes instead of open coding it Date: Fri, 15 Oct 2021 15:26:30 +0200 Message-Id: <20211015132643.1621913-18-hch@lst.de> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20211015132643.1621913-1-hch@lst.de> References: <20211015132643.1621913-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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-ext4@vger.kernel.org Use the proper helper to read the block device size. Signed-off-by: Christoph Hellwig Acked-by: Dave Kleikamp --- fs/jfs/resize.c | 2 +- fs/jfs/super.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c index bde787c354fcc..a42dbb0d3d28a 100644 --- a/fs/jfs/resize.c +++ b/fs/jfs/resize.c @@ -199,7 +199,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) txQuiesce(sb); /* Reset size of direct inode */ - sbi->direct_inode->i_size = i_size_read(sb->s_bdev->bd_inode); + sbi->direct_inode->i_size = bdev_nr_bytes(sb->s_bdev); if (sbi->mntflag & JFS_INLINELOG) { /* diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 9030aeaf0f886..9241caa161163 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@ -551,7 +551,7 @@ static int jfs_fill_super(struct super_block *sb, void *data, int silent) ret = -ENOMEM; goto out_unload; } - inode->i_size = i_size_read(sb->s_bdev->bd_inode); + inode->i_size = bdev_nr_bytes(sb->s_bdev); inode->i_mapping->a_ops = &jfs_metapage_aops; inode_fake_hash(inode); mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS); -- 2.30.2