Whamcloud - gitweb
LU-14291 lustre: only include nrs headers when needed
[fs/lustre-release.git] / lustre / obdclass / lu_object.c
index e174dfa..264caca 100644 (file)
@@ -48,6 +48,7 @@
 
 #include <libcfs/libcfs.h>
 #include <libcfs/linux/linux-mem.h>
+#include <libcfs/linux/linux-hash.h>
 #include <obd_class.h>
 #include <obd_support.h>
 #include <lustre_disk.h>
@@ -1389,6 +1390,17 @@ void lu_object_header_fini(struct lu_object_header *h)
 EXPORT_SYMBOL(lu_object_header_fini);
 
 /**
+ * Free lu_object_header with proper RCU handling
+ */
+void lu_object_header_free(struct lu_object_header *h)
+{
+       lu_object_header_fini(h);
+       OBD_FREE_PRE(h, sizeof(*h), "kfreed");
+       kfree_rcu(h, loh_rcu);
+}
+EXPORT_SYMBOL(lu_object_header_free);
+
+/**
  * Given a compound object, find its slice, corresponding to the device type
  * \a dtype.
  */