diff options
author | Christoph Hellwig <hch@lst.de> | 2021-10-18 12:11:27 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-18 22:43:23 +0200 |
commit | dd0c0bdf97a44c2e2b5541e9febde0643a9d0dbf (patch) | |
tree | d42c1c625809ca850bd9100def0985e6dcb653e3 /fs/jfs | |
parent | ext4: use sb_bdev_nr_blocks (diff) | |
download | linux-dd0c0bdf97a44c2e2b5541e9febde0643a9d0dbf.tar.xz linux-dd0c0bdf97a44c2e2b5541e9febde0643a9d0dbf.zip |
jfs: use sb_bdev_nr_blocks
Use the sb_bdev_nr_blocks helper instead of open coding it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Acked-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Link: https://lore.kernel.org/r/20211018101130.1838532-28-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/resize.c | 3 | ||||
-rw-r--r-- | fs/jfs/super.c | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/fs/jfs/resize.c b/fs/jfs/resize.c index a42dbb0d3d28..8b9a72ae5efa 100644 --- a/fs/jfs/resize.c +++ b/fs/jfs/resize.c @@ -86,8 +86,7 @@ int jfs_extendfs(struct super_block *sb, s64 newLVSize, int newLogSize) goto out; } - VolumeSize = i_size_read(sb->s_bdev->bd_inode) >> sb->s_blocksize_bits; - + VolumeSize = sb_bdev_nr_blocks(sb); if (VolumeSize) { if (newLVSize > VolumeSize) { printk(KERN_WARNING "jfs_extendfs: invalid size\n"); diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 9241caa16116..24cbc9946e01 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c @@ -284,8 +284,7 @@ static int parse_options(char *options, struct super_block *sb, s64 *newLVSize, } case Opt_resize_nosize: { - *newLVSize = i_size_read(sb->s_bdev->bd_inode) >> - sb->s_blocksize_bits; + *newLVSize = sb_bdev_nr_blocks(sb); if (*newLVSize == 0) pr_err("JFS: Cannot determine volume size\n"); break; |