[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b9fdcc41-2ec5-d628-968b-0aea1091cf9a@oracle.com>
Date: Wed, 13 Oct 2021 09:13:57 -0500
From: Dave Kleikamp <dave.kleikamp@...cle.com>
To: Christoph Hellwig <hch@....de>, Jens Axboe <axboe@...nel.dk>
Cc: Coly Li <colyli@...e.de>, Mike Snitzer <snitzer@...hat.com>,
Song Liu <song@...nel.org>, David Sterba <dsterba@...e.com>,
Josef Bacik <josef@...icpanda.com>,
Theodore Ts'o <tytso@....edu>,
OGAWA Hirofumi <hirofumi@...l.parknet.co.jp>,
Ryusuke Konishi <konishi.ryusuke@...il.com>,
Anton Altaparmakov <anton@...era.com>,
Konstantin Komarov <almaz.alexandrovich@...agon-software.com>,
Kees Cook <keescook@...omium.org>,
Phillip Lougher <phillip@...ashfs.org.uk>,
Jan Kara <jack@...e.com>, linux-block@...r.kernel.org,
dm-devel@...hat.com, drbd-dev@...ts.linbit.com,
linux-bcache@...r.kernel.org, linux-raid@...r.kernel.org,
linux-mtd@...ts.infradead.org, linux-nvme@...ts.infradead.org,
linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-btrfs@...r.kernel.org,
linux-ext4@...r.kernel.org, jfs-discussion@...ts.sourceforge.net,
linux-nfs@...r.kernel.org, linux-nilfs@...r.kernel.org,
linux-ntfs-dev@...ts.sourceforge.net, ntfs3@...ts.linux.dev,
reiserfs-devel@...r.kernel.org
Subject: Re: [PATCH 16/29] jfs: use bdev_nr_sectors instead of open coding it
On 10/13/21 12:10AM, Christoph Hellwig wrote:
> Use the proper helper to read the block device size.
>
> Signed-off-by: Christoph Hellwig <hch@....de>
Acked-by: Dave Kleikamp <dave.kleikamp@...cle.com>
> ---
> 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..51a8b22e71030 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_sectors(sb->s_bdev) << SECTOR_SHIFT;
>
> if (sbi->mntflag & JFS_INLINELOG) {
> /*
> diff --git a/fs/jfs/super.c b/fs/jfs/super.c
> index 9030aeaf0f886..992870160903d 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_sectors(sb->s_bdev) << SECTOR_SHIFT;
> inode->i_mapping->a_ops = &jfs_metapage_aops;
> inode_fake_hash(inode);
> mapping_set_gfp_mask(inode->i_mapping, GFP_NOFS);
>
Powered by blists - more mailing lists