Whamcloud - gitweb
LU-506 kernel: FC15 - file_operations relate changes.
[fs/lustre-release.git] / lustre / llite / dir.c
index dcd4331..392dce1 100644 (file)
@@ -1028,9 +1028,14 @@ out:
         RETURN(rc);
 }
 
-static int ll_dir_ioctl(struct inode *inode, struct file *file,
+#ifdef HAVE_UNLOCKED_IOCTL
+static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
+#else
+static int  ll_dir_ioctl(struct inode *unuse, struct file *file,
                         unsigned int cmd, unsigned long arg)
+#endif
 {
+        struct inode *inode = file->f_dentry->d_inode;
         struct ll_sb_info *sbi = ll_i2sbi(inode);
         struct obd_ioctl_data *data;
         int rc = 0;
@@ -1614,6 +1619,10 @@ struct file_operations ll_dir_operations = {
         .release  = ll_dir_release,
         .read     = generic_read_dir,
         .readdir  = ll_readdir,
-        .ioctl    = ll_dir_ioctl,
-        .fsync    = ll_fsync
+#ifdef HAVE_UNLOCKED_IOCTL
+        .unlocked_ioctl   = ll_dir_ioctl,
+#else
+        .ioctl          = ll_dir_ioctl,
+#endif
+        .fsync    = ll_fsync,
 };