]> git.proxmox.com Git - mirror_spl-debian.git/commitdiff
Linux 2.6.36 compat, use fops->unlocked_ioctl()
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 10 Nov 2010 20:58:07 +0000 (12:58 -0800)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 10 Nov 2010 21:16:12 +0000 (13:16 -0800)
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 SPL 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().

module/spl/spl-module.c
module/splat/splat-ctl.c

index ee6bd696a5ce6d51f8416cb529915d496e3f74dd..3b5161b6da7a089fde28be5f0231a4bdf9f3a5cd 100644 (file)
@@ -53,10 +53,11 @@ out:
        return di;
 }
 
-static int
-mod_generic_ioctl(struct inode *ino, struct file *file,
-                 unsigned int cmd, unsigned long arg)
+static long
+mod_generic_unlocked_ioctl(struct file *file,
+                          unsigned int cmd, unsigned long arg)
 {
+       struct inode *ino = file->f_dentry->d_inode;
        struct dev_info *di;
        int rc, flags = 0, rvalp = 0;
        cred_t *cr = NULL;
@@ -84,7 +85,7 @@ static long
 mod_generic_compat_ioctl(struct file *file,
                         unsigned int cmd, unsigned long arg)
 {
-       return mod_generic_ioctl(file->f_dentry->d_inode, file, cmd, arg);
+       return mod_generic_unlocked_ioctl(file, cmd, arg);
 }
 #endif /* CONFIG_COMPAT */
 
@@ -125,7 +126,7 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type,
        /* Setup the fops to cb_ops mapping */
        fops->owner = mod;
        if (cb_ops->cb_ioctl) {
-               fops->ioctl = mod_generic_ioctl;
+               fops->unlocked_ioctl = mod_generic_unlocked_ioctl;
 #ifdef CONFIG_COMPAT
                fops->compat_ioctl = mod_generic_compat_ioctl;
 #endif
index ba68de212269b0a5d504496a89b2d106e0e0f727..de72b805f99630385a835b541db4faf67a22c657 100644 (file)
@@ -445,9 +445,8 @@ splat_ioctl_cmd(struct file *file, unsigned int cmd, unsigned long arg)
        return rc;
 }
 
-static int
-splat_ioctl(struct inode *inode, struct file *file,
-           unsigned int cmd, unsigned long arg)
+static long
+splat_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
         unsigned int minor = iminor(file->f_dentry->d_inode);
        int rc = 0;
@@ -480,7 +479,7 @@ splat_ioctl(struct inode *inode, struct file *file,
 static long
 splat_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-       return splat_ioctl(NULL, file, cmd, arg);
+       return splat_unlocked_ioctl(file, cmd, arg);
 }
 #endif /* CONFIG_COMPAT */
 
@@ -601,7 +600,7 @@ static struct file_operations splat_fops = {
        .owner          = THIS_MODULE,
        .open           = splat_open,
        .release        = splat_release,
-       .ioctl          = splat_ioctl,
+       .unlocked_ioctl = splat_unlocked_ioctl,
 #ifdef CONFIG_COMPAT
        .compat_ioctl   = splat_compat_ioctl,
 #endif