block: move bd_part_count to struct gendisk
[linux-2.6-microblaze.git] / block / ioctl.c
index 8ba1ed8..24beec9 100644 (file)
@@ -89,7 +89,7 @@ static int blkdev_reread_part(struct block_device *bdev, fmode_t mode)
                return -EINVAL;
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
-       if (bdev->bd_part_count)
+       if (bdev->bd_disk->open_partitions)
                return -EBUSY;
 
        /*