unsigned conf, const char *name,
const char *units);
extern void lprocfs_free_obd_stats(struct obd_device *obddev);
+extern void lprocfs_free_md_stats(struct obd_device *obddev);
struct obd_export;
struct nid_stat;
extern int lprocfs_add_clear_entry(struct obd_device * obd,
#define LPROCFS_EXIT() do { \
up_read(&_lprocfs_lock); \
} while(0)
-#define LPROCFS_ENTRY_AND_CHECK(dp) do { \
- typecheck(struct proc_dir_entry *, dp); \
- LPROCFS_ENTRY(); \
- if ((dp)->deleted) { \
- LPROCFS_EXIT(); \
- return -ENODEV; \
- } \
-} while(0)
+
+#ifdef HAVE_PROCFS_DELETED
+static inline
+int LPROCFS_ENTRY_AND_CHECK(struct proc_dir_entry *dp)
+{
+ LPROCFS_ENTRY();
+ if ((dp)->deleted) {
+ LPROCFS_EXIT();
+ return -ENODEV;
+ }
+ return 0;
+}
+#else
+static inline
+int LPROCFS_ENTRY_AND_CHECK(struct proc_dir_entry *dp)
+{
+ LPROCFS_ENTRY();
+ return 0;
+}
+#endif
+
#define LPROCFS_WRITE_ENTRY() do { \
down_write(&_lprocfs_lock); \
} while(0)
up_write(&_lprocfs_lock); \
} while(0)
+
/* You must use these macros when you want to refer to
* the import in a client obd_device for a lprocfs entry */
#define LPROCFS_CLIMP_CHECK(obd) do { \
{ return 0; }
static inline void lprocfs_free_obd_stats(struct obd_device *obddev)
{ return; }
+static inline void lprocfs_free_md_stats(struct obd_device *obddev)
+{ return; }
struct obd_export;
static inline int lprocfs_add_clear_entry(struct obd_export *exp)