dget_locked(dentry);
lock_dentry(dentry);
__d_drop(dentry);
-#ifdef DCACHE_LUSTRE_INVALID
- dentry->d_flags &= ~DCACHE_LUSTRE_INVALID;
-#endif
unlock_dentry(dentry);
ll_dops_init(dentry, 0);
d_rehash_cond(dentry, 0); /* avoid taking dcache_lock inside */
"refc %d\n", last_discon, last_discon->d_inode,
atomic_read(&last_discon->d_count));
dget_locked(last_discon);
+ lock_dentry(last_discon);
+ last_discon->d_flags |= DCACHE_LUSTRE_INVALID;
+ unlock_dentry(last_discon);
spin_unlock(&dcache_lock);
spin_unlock(&ll_lookup_lock);
ll_dops_init(last_discon, 1);
iput(inode);
return last_discon;
}
-
+ de->d_flags |= DCACHE_LUSTRE_INVALID;
ll_d_add(de, inode);
spin_unlock(&dcache_lock);
* when I return */
if (!it_disposition(it, DISP_LOOKUP_NEG)) {
struct dentry *save = *de;
+ __u32 bits;
rc = ll_prep_inode(&inode, request, (*de)->d_sb);
if (rc)
CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u)\n",
inode, inode->i_ino, inode->i_generation);
md_set_lock_data(sbi->ll_md_exp,
- &it->d.lustre.it_lock_handle, inode);
+ &it->d.lustre.it_lock_handle, inode, &bits);
/* We used to query real size from OSTs here, but actually
this is not needed. For stat() calls size would be updated
lld->lld_sa_generation = 0;
}
}
+ /* we have lookup look - unhide dentry */
+ if (bits & MDS_INODELOCK_LOOKUP) {
+ lock_dentry(*de);
+ (*de)->d_flags &= ~(DCACHE_LUSTRE_INVALID);
+ unlock_dentry(*de);
+ }
} else {
ll_dops_init(*de, 1);
/* Check that parent has UPDATE lock. If there is none, we
ll_d_add(*de, NULL);
spin_unlock(&dcache_lock);
} else {
+ /* negative lookup - and don't have update lock to
+ * parent */
+ lock_dentry(*de);
+ (*de)->d_flags |= DCACHE_LUSTRE_INVALID;
+ unlock_dentry(*de);
+
(*de)->d_inode = NULL;
/* We do not want to hash the dentry if don`t have a
* lock, but if this dentry is later used in d_move,
CDEBUG(D_DLMTRACE, "setting l_ast_data to inode %p (%lu/%u)\n",
inode, inode->i_ino, inode->i_generation);
md_set_lock_data(sbi->ll_md_exp,
- &it->d.lustre.it_lock_handle, inode);
+ &it->d.lustre.it_lock_handle, inode, NULL);
EXIT;
out:
ptlrpc_req_finished(request);