Commit d9928ac5 authored by Mike Snitzer's avatar Mike Snitzer

dm writecache: use bdev_nr_sectors() instead of open-coded equivalent

Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 4134455f
......@@ -978,7 +978,7 @@ static void writecache_resume(struct dm_target *ti)
wc_lock(wc);
wc->data_device_sectors = i_size_read(wc->dev->bdev->bd_inode) >> SECTOR_SHIFT;
wc->data_device_sectors = bdev_nr_sectors(wc->dev->bdev);
if (WC_MODE_PMEM(wc)) {
persistent_memory_invalidate_cache(wc->memory_map, wc->memory_map_size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment