Whamcloud - gitweb
remove unneed include.
[fs/lustre-release.git] / lustre / obdclass / linux / linux-module.c
index 57da966..3e08cd2 100644 (file)
@@ -29,7 +29,7 @@
 #endif
 
 #ifdef __KERNEL__
-#ifdef HAVE_KERNEL_CONFIG_H
+#ifndef AUTOCONF_INCLUDED
 #include <linux/config.h> /* for CONFIG_PROC_FS */
 #endif
 #include <linux/module.h>
@@ -222,7 +222,7 @@ int obd_proc_read_version(char *page, char **start, off_t off, int count,
                           int *eof, void *data)
 {
         *eof = 1;
-#ifdef LUSTRE_KERNEL_VERSION
+#ifdef HAVE_VFS_INTENT_PATCHES
         return snprintf(page, count, "lustre: %s\nkernel: %u\nbuild:  %s\n",
                         LUSTRE_VERSION_STRING, LUSTRE_KERNEL_VERSION,
                         BUILD_VERSION);
@@ -346,8 +346,8 @@ static void *obd_device_list_seq_next(struct seq_file *p, void *v, loff_t *pos)
 
 static int obd_device_list_seq_show(struct seq_file *p, void *v)
 {
-        int index = *(loff_t *)v;
-        struct obd_device *obd = class_num2obd(index);
+        loff_t index = *(loff_t *)v;
+        struct obd_device *obd = class_num2obd((int)index);
         char *status;
 
         if (obd == NULL)
@@ -356,6 +356,8 @@ static int obd_device_list_seq_show(struct seq_file *p, void *v)
         LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
         if (obd->obd_stopping)
                 status = "ST";
+        else if (obd->obd_inactive)
+                status = "IN";
         else if (obd->obd_set_up)
                 status = "UP";
         else if (obd->obd_attached)