Skip to content

Commit

Permalink
block: disable sysfs parts of the disk command filter
Browse files Browse the repository at this point in the history
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: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Jens Axboe committed Sep 11, 2008
1 parent adee14b commit 2dc75d3
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions block/cmd-filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ int blk_verify_command(struct blk_cmd_filter *filter,
}
EXPORT_SYMBOL(blk_verify_command);

#if 0
/* and now, the sysfs stuff */
static ssize_t rcf_cmds_show(struct blk_cmd_filter *filter, char *page,
int rw)
Expand Down Expand Up @@ -233,3 +234,4 @@ void blk_unregister_filter(struct gendisk *disk)
kobject_put(disk->holder_dir->parent);
}
EXPORT_SYMBOL(blk_unregister_filter);
#endif
2 changes: 0 additions & 2 deletions drivers/ide/ide-cd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,6 @@ static void ide_cd_remove(ide_drive_t *drive)

ide_proc_unregister_driver(drive, info->driver);

blk_unregister_filter(info->disk);
del_gendisk(info->disk);

ide_cd_put(info);
Expand Down Expand Up @@ -2159,7 +2158,6 @@ static int ide_cd_probe(ide_drive_t *drive)
g->fops = &idecd_ops;
g->flags |= GENHD_FL_REMOVABLE;
add_disk(g);
blk_register_filter(g);
return 0;

out_free_cd:
Expand Down
2 changes: 0 additions & 2 deletions drivers/scsi/sd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,6 @@ static int sd_probe(struct device *dev)

dev_set_drvdata(dev, sdkp);
add_disk(gd);
blk_register_filter(gd);
sd_dif_config_host(sdkp);

sd_printk(KERN_NOTICE, sdkp, "Attached SCSI %sdisk\n",
Expand Down Expand Up @@ -1909,7 +1908,6 @@ static int sd_remove(struct device *dev)
struct scsi_disk *sdkp = dev_get_drvdata(dev);

device_del(&sdkp->dev);
blk_unregister_filter(sdkp->disk);
del_gendisk(sdkp->disk);
sd_shutdown(dev);

Expand Down
2 changes: 0 additions & 2 deletions drivers/scsi/sr.c
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,6 @@ static int sr_probe(struct device *dev)
dev_set_drvdata(dev, cd);
disk->flags |= GENHD_FL_REMOVABLE;
add_disk(disk);
blk_register_filter(disk);

sdev_printk(KERN_DEBUG, sdev,
"Attached scsi CD-ROM %s\n", cd->cdi.name);
Expand Down Expand Up @@ -895,7 +894,6 @@ static int sr_remove(struct device *dev)
{
struct scsi_cd *cd = dev_get_drvdata(dev);

blk_unregister_filter(cd->disk);
del_gendisk(cd->disk);

mutex_lock(&sr_ref_mutex);
Expand Down
2 changes: 0 additions & 2 deletions include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,6 @@ extern int blkdev_issue_flush(struct block_device *, sector_t *);
*/
extern int blk_verify_command(struct blk_cmd_filter *filter,
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);

#define MAX_PHYS_SEGMENTS 128
Expand Down

0 comments on commit 2dc75d3

Please sign in to comment.