RETURN(rc);
}
+#ifdef HAVE_UNLOCKED_IOCTL
+long ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+{
+ struct inode *inode = file->f_dentry->d_inode;
+#else
int ll_file_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned long arg)
{
+#endif
struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
int flags;
ENTRY;
#else
.aio_write = ll_file_aio_write,
#endif
+#ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = ll_file_ioctl,
+#else
.ioctl = ll_file_ioctl,
+#endif
.open = ll_file_open,
.release = ll_file_release,
.mmap = ll_file_mmap,
#else
.aio_write = ll_file_aio_write,
#endif
+#ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = ll_file_ioctl,
+#else
.ioctl = ll_file_ioctl,
+#endif
.open = ll_file_open,
.release = ll_file_release,
.mmap = ll_file_mmap,
#else
.aio_write = ll_file_aio_write,
#endif
+#ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = ll_file_ioctl,
+#else
.ioctl = ll_file_ioctl,
+#endif
.open = ll_file_open,
.release = ll_file_release,
.mmap = ll_file_mmap,
}
/* to control /dev/obd */
+#ifdef HAVE_UNLOCKED_IOCTL
+static long obd_class_ioctl(struct file *filp, unsigned int cmd,
+ unsigned long arg)
+#else
static int obd_class_ioctl(struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg)
+#endif
{
int err = 0;
ENTRY;
/* declare character device */
static struct file_operations obd_psdev_fops = {
.owner = THIS_MODULE,
+#if HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = obd_class_ioctl, /* unlocked_ioctl */
+#else
.ioctl = obd_class_ioctl, /* ioctl */
+#endif
.open = obd_class_open, /* open */
.release = obd_class_release, /* release */
};
int i;
ENTRY;
+#ifndef HAVE_UNLOCKED_IOCTL
unlock_kernel();
-
+#endif
memset(&dummy_oti, 0, sizeof(dummy_oti));
obd = exp->exp_obd;
ldlm_lock_decref(&ack_lock->lock, ack_lock->mode);
}
+#ifndef HAVE_UNLOCKED_IOCTL
lock_kernel();
-
+#endif
return rc;
}