procfs: always expose /proc/<pid>/map_files/ and make it readable
[deliverable/linux.git] / block / blk-cgroup.c
index 9da02c021ebe2ed296cbdf8560d5bbf2ecd1c48f..d6283b3f5db50674d18ae485970f1e24ed44569d 100644 (file)
@@ -718,8 +718,12 @@ int blkg_conf_prep(struct blkcg *blkcg, const struct blkcg_policy *pol,
                return -EINVAL;
 
        disk = get_gendisk(MKDEV(major, minor), &part);
-       if (!disk || part)
+       if (!disk)
                return -EINVAL;
+       if (part) {
+               put_disk(disk);
+               return -EINVAL;
+       }
 
        rcu_read_lock();
        spin_lock_irq(disk->queue->queue_lock);
This page took 0.041072 seconds and 5 git commands to generate.