Commit fe0da4e5 authored by Arnd Bergmann's avatar Arnd Bergmann
Browse files

compat_ioctl: bsg: add handler



bsg_ioctl() calls into scsi_cmd_ioctl() for a couple of generic commands
and relies on fs/compat_ioctl.c to handle it correctly in compat mode.

Adding a private compat_ioctl() handler avoids that round-trip and lets
us get rid of the generic emulation once this is done.

Note that bsg implements an SG_IO command that is different from the
other drivers and does not need emulation.

Reviewed-by: default avatarBen Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 7eafd137
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -382,6 +382,7 @@ static const struct file_operations bsg_fops = {
	.open		=	bsg_open,
	.open		=	bsg_open,
	.release	=	bsg_release,
	.release	=	bsg_release,
	.unlocked_ioctl	=	bsg_ioctl,
	.unlocked_ioctl	=	bsg_ioctl,
	.compat_ioctl	=	compat_ptr_ioctl,
	.owner		=	THIS_MODULE,
	.owner		=	THIS_MODULE,
	.llseek		=	default_llseek,
	.llseek		=	default_llseek,
};
};