diff options
-rw-r--r-- | block/cmd-filter.c | 3 | ||||
-rw-r--r-- | block/genhd.c | 2 | ||||
-rw-r--r-- | drivers/ide/ide-cd.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sd.c | 2 | ||||
-rw-r--r-- | drivers/scsi/sr.c | 2 |
5 files changed, 8 insertions, 3 deletions
diff --git a/block/cmd-filter.c b/block/cmd-filter.c index 1d4026206ac2..228b6447e89f 100644 --- a/block/cmd-filter.c +++ b/block/cmd-filter.c | |||
@@ -223,6 +223,7 @@ int blk_register_filter(struct gendisk *disk) | |||
223 | 223 | ||
224 | return 0; | 224 | return 0; |
225 | } | 225 | } |
226 | EXPORT_SYMBOL(blk_register_filter); | ||
226 | 227 | ||
227 | void blk_unregister_filter(struct gendisk *disk) | 228 | void blk_unregister_filter(struct gendisk *disk) |
228 | { | 229 | { |
@@ -231,4 +232,4 @@ void blk_unregister_filter(struct gendisk *disk) | |||
231 | kobject_put(&filter->kobj); | 232 | kobject_put(&filter->kobj); |
232 | kobject_put(disk->holder_dir->parent); | 233 | kobject_put(disk->holder_dir->parent); |
233 | } | 234 | } |
234 | 235 | EXPORT_SYMBOL(blk_unregister_filter); | |
diff --git a/block/genhd.c b/block/genhd.c index 656c2c7abf99..d9743ff67898 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -190,7 +190,6 @@ void add_disk(struct gendisk *disk) | |||
190 | disk->minors, NULL, exact_match, exact_lock, disk); | 190 | disk->minors, NULL, exact_match, exact_lock, disk); |
191 | register_disk(disk); | 191 | register_disk(disk); |
192 | blk_register_queue(disk); | 192 | blk_register_queue(disk); |
193 | blk_register_filter(disk); | ||
194 | 193 | ||
195 | bdi = &disk->queue->backing_dev_info; | 194 | bdi = &disk->queue->backing_dev_info; |
196 | bdi_register_dev(bdi, MKDEV(disk->major, disk->first_minor)); | 195 | bdi_register_dev(bdi, MKDEV(disk->major, disk->first_minor)); |
@@ -203,7 +202,6 @@ EXPORT_SYMBOL(del_gendisk); /* in partitions/check.c */ | |||
203 | 202 | ||
204 | void unlink_gendisk(struct gendisk *disk) | 203 | void unlink_gendisk(struct gendisk *disk) |
205 | { | 204 | { |
206 | blk_unregister_filter(disk); | ||
207 | sysfs_remove_link(&disk->dev.kobj, "bdi"); | 205 | sysfs_remove_link(&disk->dev.kobj, "bdi"); |
208 | bdi_unregister(&disk->queue->backing_dev_info); | 206 | bdi_unregister(&disk->queue->backing_dev_info); |
209 | blk_unregister_queue(disk); | 207 | blk_unregister_queue(disk); |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 49a8c589e346..f1489999cf91 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -1933,6 +1933,7 @@ static void ide_cd_remove(ide_drive_t *drive) | |||
1933 | 1933 | ||
1934 | ide_proc_unregister_driver(drive, info->driver); | 1934 | ide_proc_unregister_driver(drive, info->driver); |
1935 | 1935 | ||
1936 | blk_unregister_filter(info->disk); | ||
1936 | del_gendisk(info->disk); | 1937 | del_gendisk(info->disk); |
1937 | 1938 | ||
1938 | ide_cd_put(info); | 1939 | ide_cd_put(info); |
@@ -2158,6 +2159,7 @@ static int ide_cd_probe(ide_drive_t *drive) | |||
2158 | g->fops = &idecd_ops; | 2159 | g->fops = &idecd_ops; |
2159 | g->flags |= GENHD_FL_REMOVABLE; | 2160 | g->flags |= GENHD_FL_REMOVABLE; |
2160 | add_disk(g); | 2161 | add_disk(g); |
2162 | blk_register_filter(g); | ||
2161 | return 0; | 2163 | return 0; |
2162 | 2164 | ||
2163 | out_free_cd: | 2165 | out_free_cd: |
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index e5e7d7856454..2a2bc89aba83 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c | |||
@@ -1875,6 +1875,7 @@ static int sd_probe(struct device *dev) | |||
1875 | 1875 | ||
1876 | dev_set_drvdata(dev, sdkp); | 1876 | dev_set_drvdata(dev, sdkp); |
1877 | add_disk(gd); | 1877 | add_disk(gd); |
1878 | blk_register_filter(gd); | ||
1878 | sd_dif_config_host(sdkp); | 1879 | sd_dif_config_host(sdkp); |
1879 | 1880 | ||
1880 | sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", | 1881 | sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", |
@@ -1908,6 +1909,7 @@ static int sd_remove(struct device *dev) | |||
1908 | struct scsi_disk *sdkp = dev_get_drvdata(dev); | 1909 | struct scsi_disk *sdkp = dev_get_drvdata(dev); |
1909 | 1910 | ||
1910 | device_del(&sdkp->dev); | 1911 | device_del(&sdkp->dev); |
1912 | blk_unregister_filter(sdkp->disk); | ||
1911 | del_gendisk(sdkp->disk); | 1913 | del_gendisk(sdkp->disk); |
1912 | sd_shutdown(dev); | 1914 | sd_shutdown(dev); |
1913 | 1915 | ||
diff --git a/drivers/scsi/sr.c b/drivers/scsi/sr.c index 27f5bfd1def3..3292965bfd84 100644 --- a/drivers/scsi/sr.c +++ b/drivers/scsi/sr.c | |||
@@ -656,6 +656,7 @@ static int sr_probe(struct device *dev) | |||
656 | dev_set_drvdata(dev, cd); | 656 | dev_set_drvdata(dev, cd); |
657 | disk->flags |= GENHD_FL_REMOVABLE; | 657 | disk->flags |= GENHD_FL_REMOVABLE; |
658 | add_disk(disk); | 658 | add_disk(disk); |
659 | blk_register_filter(disk); | ||
659 | 660 | ||
660 | sdev_printk(KERN_DEBUG, sdev, | 661 | sdev_printk(KERN_DEBUG, sdev, |
661 | "Attached scsi CD-ROM %s\n", cd->cdi.name); | 662 | "Attached scsi CD-ROM %s\n", cd->cdi.name); |
@@ -894,6 +895,7 @@ static int sr_remove(struct device *dev) | |||
894 | { | 895 | { |
895 | struct scsi_cd *cd = dev_get_drvdata(dev); | 896 | struct scsi_cd *cd = dev_get_drvdata(dev); |
896 | 897 | ||
898 | blk_unregister_filter(cd->disk); | ||
897 | del_gendisk(cd->disk); | 899 | del_gendisk(cd->disk); |
898 | 900 | ||
899 | mutex_lock(&sr_ref_mutex); | 901 | mutex_lock(&sr_ref_mutex); |