diff --git a/[refs] b/[refs] index 0d749f44ca57..7783d1d977d4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 78f707bfc723552e8309b7c38a8d0cc51012e813 +refs/heads/master: 41b8c853a495438208faa5be03bbb0050859163b diff --git a/trunk/block/genhd.c b/trunk/block/genhd.c index 397960cf26af..e1eadcc9546a 100644 --- a/trunk/block/genhd.c +++ b/trunk/block/genhd.c @@ -1087,6 +1087,14 @@ dev_t blk_lookup_devt(const char *name, int partno) if (strcmp(dev_name(dev), name)) continue; + if (partno < disk->minors) { + /* We need to return the right devno, even + * if the partition doesn't exist yet. + */ + devt = MKDEV(MAJOR(dev->devt), + MINOR(dev->devt) + partno); + break; + } part = disk_get_part(disk, partno); if (part) { devt = part_devt(part);