dm bufio: subtract the number of initial sectors in dm_bufio_get_device_size
stable inclusion from stable-5.10.22 commit 7bda53f46387bc2b40a80befb1a5648dd9840e9c bugzilla: 50796 -------------------------------- commit a14e5ec6 upstream. dm_bufio_get_device_size returns the device size in blocks. Before returning the value, we must subtract the nubmer of starting sectors. The number of starting sectors may not be divisible by block size. Note that currently, no target is using dm_bufio_set_sector_offset and dm_bufio_get_device_size simultaneously, so this change has no effect. However, an upcoming dm-verity-fec fix needs this change. Signed-off-by:Mikulas Patocka <mpatocka@redhat.com> Reviewed-by:
Milan Broz <gmazyland@gmail.com> Cc: stable@vger.kernel.org Signed-off-by:
Mike Snitzer <snitzer@redhat.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
Chen Jun <chenjun102@huawei.com> Acked-by:
Weilong Chen <chenweilong@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment