*/
#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>
*/
#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>
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);
}
{
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);
}
*/
#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>
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);
}
void *data)
{
struct obd_device *dev = (struct obd_device *)data;
+ LASSERT(dev != NULL);
return snprintf(page, count, "%s\n", dev->u.filter.fo_fstype);
}
*/
#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>