#include <linux/obd_support.h>
#include <linux/lustre_lite.h>
+#include <linux/lustre_dlm.h>
extern struct address_space_operations ll_aops;
void ll_intent_release(struct dentry *de)
{
- struct ldlm_lock *lock;
struct lustre_handle *handle;
ENTRY;
EXIT;
return;
}
-
if (de->d_it->it_lock_mode) {
handle = (struct lustre_handle *)de->d_it->it_lock_handle;
- lock = lustre_handle2object(handle);
- LDLM_DEBUG(lock, "calling ldlm_lock_decref(%d)",
- de->d_it->it_lock_mode);
- ldlm_lock_decref(lock, de->d_it->it_lock_mode);
+ if (de->d_it->it_op == IT_SETATTR) {
+ int rc;
+ ldlm_lock_decref(handle, de->d_it->it_lock_mode);
+ rc = ldlm_cli_cancel(handle);
+ if (rc < 0)
+ CERROR("ldlm_cli_cancel: %d\n", rc);
+ } else
+ ldlm_lock_decref(handle, de->d_it->it_lock_mode);
}
de->d_it = NULL;
EXIT;
{
ENTRY;
+ /* for debugging purposes, we currently always force client re-get */
RETURN(0);
}