]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/partitions/check.c
ide-pmac: add ->cable_detect method
[linux-2.6-omap-h63xx.git] / fs / partitions / check.c
index 950bdb4b8f53a679ce3aab3bdae2b9337ec7b3f9..6149e4b58c887a62cd11e4776650b1880745af2a 100644 (file)
@@ -330,8 +330,6 @@ void delete_partition(struct gendisk *disk, int part)
        disk->part[part-1] = NULL;
        p->start_sect = 0;
        p->nr_sects = 0;
-       p->ios[0] = p->ios[1] = 0;
-       p->sectors[0] = p->sectors[1] = 0;
        part_stat_set_all(p, 0);
        kobject_put(p->holder_dir);
        device_del(&p->dev);
@@ -475,6 +473,10 @@ int rescan_partitions(struct gendisk *disk, struct block_device *bdev)
                return 0;
        if (IS_ERR(state))      /* I/O error reading the partition table */
                return -EIO;
+
+       /* tell userspace that the media / partition table may have changed */
+       kobject_uevent(&disk->dev.kobj, KOBJ_CHANGE);
+
        for (p = 1; p < state->limit; p++) {
                sector_t size = state->parts[p].size;
                sector_t from = state->parts[p].from;