summaryrefslogtreecommitdiff
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-10-18 13:11:29 +0300
committerJens Axboe <axboe@kernel.dk>2021-10-18 23:43:23 +0300
commit2ffae493dc15ee2225bd68254e1cdb1449b81ec7 (patch)
treefeb600e156f75a1553243cb9a505639133860d0f /fs/reiserfs
parentab70041731a6c2f153120e47746fb303aa6f237a (diff)
downloadlinux-2ffae493dc15ee2225bd68254e1cdb1449b81ec7.tar.xz
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>
Diffstat (limited to 'fs/reiserfs')
-rw-r--r--fs/reiserfs/super.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index 8647a00434ea..076f9ab94306 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -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') {