Skip to content

Commit 2ffae49

Browse files
Christoph Hellwigaxboe
authored andcommitted
reiserfs: use sb_bdev_nr_blocks
Use the sb_bdev_nr_blocks helper instead of open coding it. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent ab70041 commit 2ffae49

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/reiserfs/super.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,9 +1199,7 @@ static int reiserfs_parse_options(struct super_block *s,
11991199

12001200
if (!strcmp(arg, "auto")) {
12011201
/* From JFS code, to auto-get the size. */
1202-
*blocks =
1203-
i_size_read(s->s_bdev->bd_inode) >> s->
1204-
s_blocksize_bits;
1202+
*blocks = sb_bdev_nr_blocks(s);
12051203
} else {
12061204
*blocks = simple_strtoul(arg, &p, 0);
12071205
if (*p != '\0') {

0 commit comments

Comments
 (0)