aboutsummaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-19 03:00:35 -0500
committerIngo Molnar <mingo@elte.hu>2009-02-19 03:00:35 -0500
commit72c26c9a26ea7f2f3d14f162c2ebb07805f724ea (patch)
treebf1b4bc0b69f96c79474f9edb9cf0e811c95f2dc /block/genhd.c
parent37bd824a35a60abc73e5fa8816bd5f50c913d69b (diff)
parentba95fd47d177d46743ad94055908d22840370e06 (diff)
Merge branch 'linus' into tracing/blktrace
Conflicts: block/blktrace.c Semantic merge: kernel/trace/blktrace.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 397960cf26af..e1eadcc9546a 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -1087,6 +1087,14 @@ dev_t blk_lookup_devt(const char *name, int partno)
1087 if (strcmp(dev_name(dev), name)) 1087 if (strcmp(dev_name(dev), name))
1088 continue; 1088 continue;
1089 1089
1090 if (partno < disk->minors) {
1091 /* We need to return the right devno, even
1092 * if the partition doesn't exist yet.
1093 */
1094 devt = MKDEV(MAJOR(dev->devt),
1095 MINOR(dev->devt) + partno);
1096 break;
1097 }
1090 part = disk_get_part(disk, partno); 1098 part = disk_get_part(disk, partno);
1091 if (part) { 1099 if (part) {
1092 devt = part_devt(part); 1100 devt = part_devt(part);