#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>
ENTRY;
+ /* FID is from disk or network, zero FID is meaningless, return error
+ * early to avoid assertion in lu_object_put. If a zero FID is wanted,
+ * it should be allocated via lu_object_anon().
+ */
+ if (fid_is_zero(f))
+ RETURN(ERR_PTR(-EINVAL));
+
/*
* This uses standard index maintenance protocol:
*
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.
*/