Whamcloud - gitweb
LU-17767 build: struct lsmcontext has slot or id member
[fs/lustre-release.git] / lustre / include / lustre_compat.h
index 5f4c497..99d6c8e 100644 (file)
@@ -774,7 +774,11 @@ ll_shrinker_create(struct ll_shrinker_ops *ops, unsigned int flags,
 static inline void lsmcontext_init(struct lsmcontext *cp, char *context,
                                   u32 size, int slot)
 {
+#ifdef HAVE_LSMCONTEXT_HAS_ID
+       cp->id = slot;
+#else
        cp->slot = slot;
+#endif
        cp->context = context;
        cp->len = size;
 }