summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/partitions/check.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/partitions/check.c b/fs/partitions/check.c
index 63302534023..6d5b213b8a9 100644
--- a/fs/partitions/check.c
+++ b/fs/partitions/check.c
@@ -577,7 +577,7 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
}
#ifdef CONFIG_BLK_DEV_MD
if (state->parts[p].flags & ADDPART_FLAG_RAID)
- md_autodetect_dev(bdev->bd_dev+p);
+ md_autodetect_dev(part_to_dev(part)->devt);
#endif
}
kfree(state);