X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fobdfilter%2Flproc_obdfilter.c;h=c4e07477143272387d96a6ef559b550a9b6bfec7;hb=040033cef24c5aca2967daf2da7a862abcd074cf;hp=ad92f83343ffd3156c3220108a1519f10fd6cd83;hpb=5c0b2855f617d17e3c0749244edeca1b706f8a7e;p=fs%2Flustre-release.git diff --git a/lustre/obdfilter/lproc_obdfilter.c b/lustre/obdfilter/lproc_obdfilter.c index ad92f83..c4e0747 100644 --- a/lustre/obdfilter/lproc_obdfilter.c +++ b/lustre/obdfilter/lproc_obdfilter.c @@ -21,6 +21,10 @@ */ #define DEBUG_SUBSYSTEM S_CLASS +#include +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)) +#include +#endif #include #include @@ -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); }