summaryrefslogtreecommitdiff
path: root/block/partitions/efi.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/partitions/efi.c')
-rw-r--r--block/partitions/efi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/partitions/efi.c b/block/partitions/efi.c
index 7ca5c4c374d4..5e9be13a56a8 100644
--- a/block/partitions/efi.c
+++ b/block/partitions/efi.c
@@ -133,7 +133,7 @@ efi_crc32(const void *buf, unsigned long len)
*/
static u64 last_lba(struct gendisk *disk)
{
- return div_u64(disk->part0->bd_inode->i_size,
+ return div_u64(bdev_nr_bytes(disk->part0),
queue_logical_block_size(disk->queue)) - 1ULL;
}