Skip to content

Commit

Permalink
reiserfs: use sb_bdev_nr_blocks
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20211018101130.1838532-30-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Christoph Hellwig authored and axboe committed Oct 18, 2021
1 parent ab70041 commit 2ffae49
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/reiserfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1199,9 +1199,7 @@ static int reiserfs_parse_options(struct super_block *s,

if (!strcmp(arg, "auto")) {
/* From JFS code, to auto-get the size. */
*blocks =
i_size_read(s->s_bdev->bd_inode) >> s->
s_blocksize_bits;
*blocks = sb_bdev_nr_blocks(s);
} else {
*blocks = simple_strtoul(arg, &p, 0);
if (*p != '\0') {
Expand Down

0 comments on commit 2ffae49

Please sign in to comment.