Whamcloud - gitweb
- bring b_devel changes into b_io in preparation for file size fixes
authorzab <zab>
Tue, 25 Feb 2003 01:09:17 +0000 (01:09 +0000)
committerzab <zab>
Tue, 25 Feb 2003 01:09:17 +0000 (01:09 +0000)
lustre/mdc/lproc_mdc.c
lustre/mds/lproc_mds.c
lustre/obdfilter/lproc_obdfilter.c
lustre/osc/lproc_osc.c

index f5b5b80..3f81507 100644 (file)
  */
 #define DEBUG_SUBSYSTEM S_CLASS
 
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+#include <asm/statfs.h>
+#endif
 #include <linux/obd_class.h>
 #include <linux/lprocfs_status.h>
 
index eab0cf7..e4522fb 100644 (file)
  */
 #define DEBUG_SUBSYSTEM S_CLASS
 
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+#include <asm/statfs.h>
+#endif
 #include <linux/lustre_lite.h>
 #include <linux/lustre_fsfilt.h>
 #include <linux/lprocfs_status.h>
@@ -37,7 +41,10 @@ static inline
 int lprocfs_mds_statfs(void *data, struct statfs *sfs)
 {
         struct obd_device* dev = (struct obd_device*) data;
-        struct mds_obd *mds = &dev->u.mds;
+        struct mds_obd *mds;
+
+        LASSERT(dev != NULL);
+        mds = &dev->u.mds;
         return vfs_statfs(mds->mds_sb, sfs);
 }
 
@@ -53,6 +60,9 @@ int rd_fstype(char *page, char **start, off_t off, int count, int *eof,
 {
         struct obd_device *obd = (struct obd_device *)data;
 
+        LASSERT(obd != NULL);
+        LASSERT(obd->obd_fsops != NULL);
+        LASSERT(obd->obd_fsops->fs_type != NULL);
         return snprintf(page, count, "%s\n", obd->obd_fsops->fs_type);
 }
 
index ad92f83..c4e0747 100644 (file)
  */
 #define DEBUG_SUBSYSTEM S_CLASS
 
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+#include <asm/statfs.h>
+#endif
 #include <linux/lprocfs_status.h>
 #include <linux/obd.h>
 
@@ -32,6 +36,7 @@ struct lprocfs_vars lprocfs_module_vars[] = { {0} };
 static inline int lprocfs_filter_statfs(void *data, struct statfs *sfs)
 {
         struct obd_device *dev = (struct obd_device *) data;
+        LASSERT(dev != NULL);
         return vfs_statfs(dev->u.filter.fo_sb, sfs);
 }
 
@@ -46,6 +51,7 @@ int rd_fstype(char *page, char **start, off_t off, int count, int *eof,
               void *data)
 {
         struct obd_device *dev = (struct obd_device *)data;
+        LASSERT(dev != NULL);
         return snprintf(page, count, "%s\n", dev->u.filter.fo_fstype);
 }
 
index 69af4bc..d5e4ec1 100644 (file)
  */
 #define DEBUG_SUBSYSTEM S_CLASS
 
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+#include <asm/statfs.h>
+#endif
 #include <linux/obd_class.h>
 #include <linux/lprocfs_status.h>