+/**
+ * Generate fake attributes for a non-existing object
+ *
+ * While the client was waiting for the reply, the original transaction
+ * got committed and corresponding rep-ack lock got released, then another
+ * client was able to destroy the object. But we still need to send some
+ * attributes back. So we fake them and set nlink=0, so the client will
+ * be able to detect a non-existing object and drop it from the cache
+ * immediately.
+ *
+ * \param[out] ma attributes to fill
+ */
+static void mdt_fake_ma(struct md_attr *ma)
+{
+ ma->ma_valid = MA_INODE;
+ memset(&ma->ma_attr, 0, sizeof(ma->ma_attr));
+ ma->ma_attr.la_valid = LA_NLINK;
+ ma->ma_attr.la_mode = S_IFREG;
+}
+