Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131524
b: refs/heads/master
c: 41b8c85
h: refs/heads/master
v: v3
  • Loading branch information
Neil Brown authored and Jens Axboe committed Feb 18, 2009
1 parent b1bc0a6 commit 2c28734
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 78f707bfc723552e8309b7c38a8d0cc51012e813
refs/heads/master: 41b8c853a495438208faa5be03bbb0050859163b
8 changes: 8 additions & 0 deletions trunk/block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2c28734

Please sign in to comment.