ldlm_lock_decref_internal_nolock(lock, mode);
- /* release lvb data for layout lock */
- if (ns_is_client(ns) && !lock->l_readers && !lock->l_writers &&
- ldlm_has_layout(lock) && lock->l_flags & LDLM_FL_LVB_READY) {
- /* this is the last user of a layout lock and stripe has
- * been set up, lvb is no longer used.
- * This may be a large amount of memory, so we should free it
- * when possible. */
- if (lock->l_lvb_data != NULL) {
- OBD_FREE_LARGE(lock->l_lvb_data, lock->l_lvb_len);
- lock->l_lvb_data = NULL;
- lock->l_lvb_len = 0;
- }
- }
-
if (lock->l_flags & LDLM_FL_LOCAL &&
!lock->l_readers && !lock->l_writers) {
/* If this is a local lock on a server namespace and this was
LDLM_DEBUG(lock, "File %p/"DFID" being reconfigured: %d.\n",
inode, PFID(&lli->lli_fid), reconf);
+ /* in case this is a caching lock and reinstate with new inode */
+ md_set_lock_data(sbi->ll_md_exp, &lockh->cookie, inode, NULL);
+
lock_res_and_lock(lock);
lvb_ready = !!(lock->l_flags & LDLM_FL_LVB_READY);
unlock_res_and_lock(lock);
ll_finish_md_op_data(op_data);
- md_set_lock_data(sbi->ll_md_exp, &it.d.lustre.it_lock_handle, inode, NULL);
-
mode = it.d.lustre.it_lock_mode;
it.d.lustre.it_lock_mode = 0;
ll_intent_drop_lock(&it);