projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4134455
)
dm writecache: use bdev_nr_sectors() instead of open-coded equivalent
author
Mike Snitzer
<snitzer@redhat.com>
Tue, 9 Feb 2021 21:53:05 +0000
(16:53 -0500)
committer
Mike Snitzer
<snitzer@redhat.com>
Tue, 9 Feb 2021 22:09:02 +0000
(17:09 -0500)
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-writecache.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm-writecache.c
b/drivers/md/dm-writecache.c
index
baf5a9c
..
844c4be
100644
(file)
--- a/
drivers/md/dm-writecache.c
+++ b/
drivers/md/dm-writecache.c
@@
-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);