partitions/efi: Fix off-by-one error in 'last_lba'
LBAs are numbered starting from zero so the last LBA # would be equal to total number of blocks minus one. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
9a4cb25a39
commit
84dc21e185
|
@ -55,7 +55,7 @@ static u64 last_lba(struct block_device *bdev)
|
|||
{
|
||||
if (!bdev)
|
||||
return 0;
|
||||
return bdev->num_blocks;
|
||||
return bdev->num_blocks - 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue