On Sun, Jul 20, 2008 at 05:34:06PM +0100, Al Viro wrote:
Actually, cmd_filter changeset breaks all users of blk_verify_command().
It expects that struct file passed to will be that of a block device:
inode = file->f_dentry->d_inode;
if (!inode)
return -EINVAL;
disk = inode->i_bdev->bd_disk;
return blk_cmd_filter_verify_command(&disk->cmd_filter,
cmd, &file->f_mode);
Unfortunately, all of those can get struct file of *character* device, with
obvious results.
The minimal fix is to pass disk / mode explicitly. I'll post the patch,
but that still leaves bsg broken.
--