summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-11-09 20:16:20 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2021-11-09 20:16:20 +0100
commit1dc1f92e24d6a5479ae8ceea3e2fac69f8d9dab7 (patch)
tree157795c66461605484ebec4d682d5e3285ba7b43 /include
parentMerge tag 'io_uring-5.16-2021-11-09' of git://git.kernel.dk/linux-block (diff)
parentblock: use new bdev_nr_bytes() helper for blkdev_{read,write}_iter() (diff)
downloadlinux-1dc1f92e24d6a5479ae8ceea3e2fac69f8d9dab7.tar.xz
linux-1dc1f92e24d6a5479ae8ceea3e2fac69f8d9dab7.zip
Merge tag 'for-5.16/bdev-size-2021-11-09' of git://git.kernel.dk/linux-block
Pull more bdev size updates from Jens Axboe: "Two followup changes for the bdev-size series from this merge window: - Add loff_t cast to bdev_nr_bytes() (Christoph) - Use bdev_nr_bytes() consistently for the block parts at least (me)" * tag 'for-5.16/bdev-size-2021-11-09' of git://git.kernel.dk/linux-block: block: use new bdev_nr_bytes() helper for blkdev_{read,write}_iter() block: add a loff_t cast to bdev_nr_bytes
Diffstat (limited to 'include')
-rw-r--r--include/linux/genhd.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/genhd.h b/include/linux/genhd.h
index 59eabbc3a36b..462634b4b48f 100644
--- a/include/linux/genhd.h
+++ b/include/linux/genhd.h
@@ -250,7 +250,7 @@ static inline sector_t bdev_nr_sectors(struct block_device *bdev)
static inline loff_t bdev_nr_bytes(struct block_device *bdev)
{
- return bdev_nr_sectors(bdev) << SECTOR_SHIFT;
+ return (loff_t)bdev_nr_sectors(bdev) << SECTOR_SHIFT;
}
static inline sector_t get_capacity(struct gendisk *disk)