reiserfs: 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> 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>
This commit is contained in:
parent
ab70041731
commit
2ffae493dc
@ -1199,9 +1199,7 @@ static int reiserfs_parse_options(struct super_block *s,
|
|||||||
|
|
||||||
if (!strcmp(arg, "auto")) {
|
if (!strcmp(arg, "auto")) {
|
||||||
/* From JFS code, to auto-get the size. */
|
/* From JFS code, to auto-get the size. */
|
||||||
*blocks =
|
*blocks = sb_bdev_nr_blocks(s);
|
||||||
i_size_read(s->s_bdev->bd_inode) >> s->
|
|
||||||
s_blocksize_bits;
|
|
||||||
} else {
|
} else {
|
||||||
*blocks = simple_strtoul(arg, &p, 0);
|
*blocks = simple_strtoul(arg, &p, 0);
|
||||||
if (*p != '\0') {
|
if (*p != '\0') {
|
||||||
|
Loading…
Reference in New Issue
Block a user