mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
Linux 2.6.36 compat, use fops->unlocked_ioctl()
As of linux-2.6.36 the last in-tree consumer of fops->ioctl() has been removed and thus fops()->ioctl() has also been removed. The replacement hook is fops->unlocked_ioctl() which has existed in kernel since 2.6.12. Since the ZFS code only contains support back to 2.6.18 vintage kernels, I'm not adding an autoconf check for this and simply moving everything to use fops->unlocked_ioctl().
This commit is contained in:
parent
8326eb4605
commit
1f30b9d432
@ -1104,11 +1104,10 @@ out_cmd:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static long
|
||||||
zpios_ioctl(struct inode *inode, struct file *file,
|
zpios_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||||
unsigned int cmd, unsigned long arg)
|
|
||||||
{
|
{
|
||||||
unsigned int minor = iminor(inode);
|
unsigned int minor = iminor(file->f_dentry->d_inode);
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
/* Ignore tty ioctls */
|
/* Ignore tty ioctls */
|
||||||
@ -1139,7 +1138,7 @@ zpios_ioctl(struct inode *inode, struct file *file,
|
|||||||
static long
|
static long
|
||||||
zpios_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
zpios_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
||||||
{
|
{
|
||||||
return zpios_ioctl(file->f_dentry->d_inode, file, cmd, arg);
|
return zpios_unlocked_ioctl(file, cmd, arg);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_COMPAT */
|
#endif /* CONFIG_COMPAT */
|
||||||
|
|
||||||
@ -1262,7 +1261,7 @@ static struct file_operations zpios_fops = {
|
|||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.open = zpios_open,
|
.open = zpios_open,
|
||||||
.release = zpios_release,
|
.release = zpios_release,
|
||||||
.ioctl = zpios_ioctl,
|
.unlocked_ioctl = zpios_unlocked_ioctl,
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
.compat_ioctl = zpios_compat_ioctl,
|
.compat_ioctl = zpios_compat_ioctl,
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user