mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
Revert "Revert "dm bufio: subtract the number of initial sectors..."
Revert submission 1672946 Reason for revert: getting back to mainline with a proper fix Reverted Changes: I96ee9a0a8:Revert "dm bufio: subtract the number of initial s... I23d4da47b:Revert "dm verity: fix FEC for RS roots unaligned ... Change-Id: Ie37a318c2a2fd61969f1102452b47b4e376071d9
This commit is contained in:
parent
2feb4789b7
commit
fc503912fd
|
|
@ -1526,6 +1526,10 @@ EXPORT_SYMBOL_GPL(dm_bufio_get_block_size);
|
|||
sector_t dm_bufio_get_device_size(struct dm_bufio_client *c)
|
||||
{
|
||||
sector_t s = i_size_read(c->bdev->bd_inode) >> SECTOR_SHIFT;
|
||||
if (s >= c->start)
|
||||
s -= c->start;
|
||||
else
|
||||
s = 0;
|
||||
if (likely(c->sectors_per_block_bits >= 0))
|
||||
s >>= c->sectors_per_block_bits;
|
||||
else
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user