summaryrefslogtreecommitdiff
path: root/block/bio.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/bio.c')
-rw-r--r--block/bio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/bio.c b/block/bio.c
index fa01bef35bb1..669bb47a3198 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -613,8 +613,8 @@ void guard_bio_eod(struct bio *bio)
rcu_read_lock();
part = __disk_get_part(bio->bi_disk, bio->bi_partno);
if (part)
- maxsector = part_nr_sects_read(part);
- else
+ maxsector = bdev_nr_sectors(part->bdev);
+ else
maxsector = get_capacity(bio->bi_disk);
rcu_read_unlock();