+void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry)
+{
+ LASSERT(it != NULL);
+ LASSERT(dentry != NULL);
+
+ if (it->d.lustre.it_lock_mode && dentry->d_inode != NULL) {
+ struct inode *inode = dentry->d_inode;
+ CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u)\n",
+ inode, inode->i_ino, inode->i_generation);
+ mdc_set_lock_data(&it->d.lustre.it_lock_handle, inode);
+ }
+
+ /* drop IT_LOOKUP locks */
+ if (it->it_op == IT_LOOKUP)
+ ll_intent_release(it);
+}
+
+void ll_frob_intent(struct lookup_intent **itp, struct lookup_intent *deft)
+{
+ struct lookup_intent *it = *itp;
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
+ if (it && it->it_magic != INTENT_MAGIC) {
+ CERROR("WARNING: uninitialized intent\n");
+ LBUG();
+ }
+ if (it && (it->it_op == IT_GETATTR || it->it_op == 0))
+ it->it_op = IT_LOOKUP;
+
+#endif
+ if (!it || it->it_op == IT_GETXATTR)
+ it = *itp = deft;
+
+ it->it_op_release = ll_intent_release;
+}
+
+int ll_revalidate_it(struct dentry *de, int flags, struct lookup_intent *it)