Whamcloud - gitweb
LU-1187 osd: add remote entry insert for ZFS DNE.
[fs/lustre-release.git] / lustre / obdclass / linux / linux-module.c
index 5c85087..0648e9a 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, Whamcloud, Inc.
+ * Copyright (c) 2011, 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -43,9 +43,6 @@
 #define DEBUG_SUBSYSTEM S_CLASS
 
 #ifdef __KERNEL__
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h> /* for CONFIG_PROC_FS */
-#endif
 #include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/kernel.h>
 #include <linux/highmem.h>
 #include <asm/io.h>
 #include <asm/ioctls.h>
-#include <asm/system.h>
 #include <asm/poll.h>
 #include <asm/uaccess.h>
 #include <linux/miscdevice.h>
-#include <linux/smp_lock.h>
 #include <linux/seq_file.h>
 #else
 # include <liblustre.h>
@@ -163,6 +158,7 @@ int obd_ioctl_getdata(char **buf, int *len, void *arg)
         EXIT;
         return 0;
 }
+EXPORT_SYMBOL(obd_ioctl_getdata);
 
 int obd_ioctl_popdata(void *arg, void *data, int len)
 {
@@ -173,8 +169,6 @@ int obd_ioctl_popdata(void *arg, void *data, int len)
                 err = -EFAULT;
         return err;
 }
-
-EXPORT_SYMBOL(obd_ioctl_getdata);
 EXPORT_SYMBOL(obd_ioctl_popdata);
 
 /*  opening /dev/obd */
@@ -277,7 +271,7 @@ static int obd_proc_read_health(char *page, char **start, off_t off,
         if (libcfs_catastrophe)
                 rc += snprintf(page + rc, count - rc, "LBUG\n");
 
-        cfs_read_lock(&obd_dev_lock);
+       read_lock(&obd_dev_lock);
         for (i = 0; i < class_devno_max(); i++) {
                 struct obd_device *obd;
 
@@ -290,7 +284,7 @@ static int obd_proc_read_health(char *page, char **start, off_t off,
                         continue;
 
                 class_incref(obd, __FUNCTION__, cfs_current());
-                cfs_read_unlock(&obd_dev_lock);
+               read_unlock(&obd_dev_lock);
 
                 if (obd_health_check(NULL, obd)) {
                         rc += snprintf(page + rc, count - rc,
@@ -298,9 +292,9 @@ static int obd_proc_read_health(char *page, char **start, off_t off,
                                        obd->obd_name);
                 }
                 class_decref(obd, __FUNCTION__, cfs_current());
-                cfs_read_lock(&obd_dev_lock);
+               read_lock(&obd_dev_lock);
         }
-        cfs_read_unlock(&obd_dev_lock);
+       read_unlock(&obd_dev_lock);
 
         if (rc == 0)
                 return snprintf(page, count, "healthy\n");
@@ -329,6 +323,7 @@ static int obd_proc_wr_jobid_var(struct file *file, const char *buffer,
 
 /* Root for /proc/fs/lustre */
 struct proc_dir_entry *proc_lustre_root = NULL;
+EXPORT_SYMBOL(proc_lustre_root);
 
 struct lprocfs_vars lprocfs_base[] = {
        { "version", obd_proc_read_version, NULL, NULL },