Commit 2dc75d3c authored by Jens Axboe's avatar Jens Axboe

block: disable sysfs parts of the disk command filter

We still have life time issues with the sysfs command filter kobject,
so disable it for 2.6.27 release. We can revisit this and make it work
properly for 2.6.28, for 2.6.27 release it's too risky.
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent adee14b2
...@@ -49,6 +49,7 @@ int blk_verify_command(struct blk_cmd_filter *filter, ...@@ -49,6 +49,7 @@ int blk_verify_command(struct blk_cmd_filter *filter,
} }
EXPORT_SYMBOL(blk_verify_command); EXPORT_SYMBOL(blk_verify_command);
#if 0
/* and now, the sysfs stuff */ /* and now, the sysfs stuff */
static ssize_t rcf_cmds_show(struct blk_cmd_filter *filter, char *page, static ssize_t rcf_cmds_show(struct blk_cmd_filter *filter, char *page,
int rw) int rw)
...@@ -233,3 +234,4 @@ void blk_unregister_filter(struct gendisk *disk) ...@@ -233,3 +234,4 @@ void blk_unregister_filter(struct gendisk *disk)
kobject_put(disk->holder_dir->parent); kobject_put(disk->holder_dir->parent);
} }
EXPORT_SYMBOL(blk_unregister_filter); EXPORT_SYMBOL(blk_unregister_filter);
#endif
...@@ -1933,7 +1933,6 @@ static void ide_cd_remove(ide_drive_t *drive) ...@@ -1933,7 +1933,6 @@ static void ide_cd_remove(ide_drive_t *drive)
ide_proc_unregister_driver(drive, info->driver); ide_proc_unregister_driver(drive, info->driver);
blk_unregister_filter(info->disk);
del_gendisk(info->disk); del_gendisk(info->disk);
ide_cd_put(info); ide_cd_put(info);
...@@ -2159,7 +2158,6 @@ static int ide_cd_probe(ide_drive_t *drive) ...@@ -2159,7 +2158,6 @@ static int ide_cd_probe(ide_drive_t *drive)
g->fops = &idecd_ops; g->fops = &idecd_ops;
g->flags |= GENHD_FL_REMOVABLE; g->flags |= GENHD_FL_REMOVABLE;
add_disk(g); add_disk(g);
blk_register_filter(g);
return 0; return 0;
out_free_cd: out_free_cd:
......
...@@ -1875,7 +1875,6 @@ static int sd_probe(struct device *dev) ...@@ -1875,7 +1875,6 @@ static int sd_probe(struct device *dev)
dev_set_drvdata(dev, sdkp); dev_set_drvdata(dev, sdkp);
add_disk(gd); add_disk(gd);
blk_register_filter(gd);
sd_dif_config_host(sdkp); sd_dif_config_host(sdkp);
sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n", sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n",
...@@ -1909,7 +1908,6 @@ static int sd_remove(struct device *dev) ...@@ -1909,7 +1908,6 @@ static int sd_remove(struct device *dev)
struct scsi_disk *sdkp = dev_get_drvdata(dev); struct scsi_disk *sdkp = dev_get_drvdata(dev);
device_del(&sdkp->dev); device_del(&sdkp->dev);
blk_unregister_filter(sdkp->disk);
del_gendisk(sdkp->disk); del_gendisk(sdkp->disk);
sd_shutdown(dev); sd_shutdown(dev);
......
...@@ -656,7 +656,6 @@ static int sr_probe(struct device *dev) ...@@ -656,7 +656,6 @@ static int sr_probe(struct device *dev)
dev_set_drvdata(dev, cd); dev_set_drvdata(dev, cd);
disk->flags |= GENHD_FL_REMOVABLE; disk->flags |= GENHD_FL_REMOVABLE;
add_disk(disk); add_disk(disk);
blk_register_filter(disk);
sdev_printk(KERN_DEBUG, sdev, sdev_printk(KERN_DEBUG, sdev,
"Attached scsi CD-ROM %s\n", cd->cdi.name); "Attached scsi CD-ROM %s\n", cd->cdi.name);
...@@ -895,7 +894,6 @@ static int sr_remove(struct device *dev) ...@@ -895,7 +894,6 @@ static int sr_remove(struct device *dev)
{ {
struct scsi_cd *cd = dev_get_drvdata(dev); struct scsi_cd *cd = dev_get_drvdata(dev);
blk_unregister_filter(cd->disk);
del_gendisk(cd->disk); del_gendisk(cd->disk);
mutex_lock(&sr_ref_mutex); mutex_lock(&sr_ref_mutex);
......
...@@ -843,8 +843,6 @@ extern int blkdev_issue_flush(struct block_device *, sector_t *); ...@@ -843,8 +843,6 @@ extern int blkdev_issue_flush(struct block_device *, sector_t *);
*/ */
extern int blk_verify_command(struct blk_cmd_filter *filter, extern int blk_verify_command(struct blk_cmd_filter *filter,
unsigned char *cmd, int has_write_perm); unsigned char *cmd, int has_write_perm);
extern int blk_register_filter(struct gendisk *disk);
extern void blk_unregister_filter(struct gendisk *disk);
extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter); extern void blk_set_cmd_filter_defaults(struct blk_cmd_filter *filter);
#define MAX_PHYS_SEGMENTS 128 #define MAX_PHYS_SEGMENTS 128
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment