]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/partitions/check.c
autofs4: fix pending mount race
[linux-2.6-omap-h63xx.git] / fs / partitions / check.c
index 03f808c5b79d4733e55b2c017ff8a5ab399c45fc..efef715135d34e459ce450eb24ca41e4234cf471 100644 (file)
@@ -401,7 +401,7 @@ void register_disk(struct gendisk *disk)
        disk->dev.parent = disk->driverfs_dev;
        disk->dev.devt = MKDEV(disk->major, disk->first_minor);
 
-       strlcpy(disk->dev.bus_id, disk->disk_name, KOBJ_NAME_LEN);
+       strlcpy(disk->dev.bus_id, disk->disk_name, BUS_ID_SIZE);
        /* ewww... some of these buggers have / in the name... */
        s = strchr(disk->dev.bus_id, '/');
        if (s)
@@ -473,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;