ntfs3: use bdev_nr_bytes instead of open coding it
authorChristoph Hellwig <hch@lst.de>
Mon, 18 Oct 2021 17:37:15 +0000 (11:37 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 18 Oct 2021 20:43:23 +0000 (14:43 -0600)
Use the proper helper to read the block device size.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20211018101130.1838532-21-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/ntfs3/super.c

index d41d76979e121fd9e836ef0072b122ab6de3735b..29813200c7af9f71bc6b1217d249996215ffe1bc 100644 (file)
@@ -921,7 +921,7 @@ static int ntfs_fill_super(struct super_block *sb, struct fs_context *fc)
 
        /* Parse boot. */
        err = ntfs_init_from_boot(sb, rq ? queue_logical_block_size(rq) : 512,
-                                 bdev->bd_inode->i_size);
+                                 bdev_nr_bytes(bdev));
        if (err)
                goto out;