Message ID | 4A136090.5090705@cn.fujitsu.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/block/elevator-fq.c b/block/elevator-fq.c index 1a0ca07..b620768 100644 --- a/block/elevator-fq.c +++ b/block/elevator-fq.c @@ -1650,6 +1650,9 @@ static int devname_to_devnum(const char *buf, dev_t *dev) return -ENODEV; disk = get_gendisk(bdev->bd_dev, &part); + if (part) + return -EINVAL; + *dev = MKDEV(disk->major, disk->first_minor); bdput(bdev);