int ll_lookup_it_finish(struct ptlrpc_request *request,
struct lookup_intent *it, void *data)
{
- struct it_cb_data *icbd = data;
- struct dentry **de = icbd->icbd_childp;
- struct inode *parent = icbd->icbd_parent;
- struct inode *inode = NULL;
- __u64 bits = 0;
- int rc;
+ struct it_cb_data *icbd = data;
+ struct dentry **de = icbd->icbd_childp;
+ struct inode *parent = icbd->icbd_parent;
+ struct inode *inode = NULL;
+ __u64 bits = 0;
+ int rc;
ENTRY;
/* NB 1 request reference will be taken away by ll_intent_lock()
* Atoimc_open may passin hashed dentries for open.
*/
if (d_unhashed(*de)) {
- *de = ll_splice_alias(inode, *de);
- if (IS_ERR(*de))
- RETURN(PTR_ERR(*de));
+ struct dentry *alias;
+
+ alias = ll_splice_alias(inode, *de);
+ if (IS_ERR(alias))
+ RETURN(PTR_ERR(alias));
+ *de = alias;
}
if (!it_disposition(it, DISP_LOOKUP_NEG)) {
int do_statahead_enter(struct inode *dir, struct dentry **dentryp,
int only_unplug)
{
- struct ll_inode_info *lli = ll_i2info(dir);
- struct ll_statahead_info *sai = lli->lli_sai;
- struct dentry *parent;
- struct ll_sa_entry *entry;
- struct ptlrpc_thread *thread;
- struct l_wait_info lwi = { 0 };
- int rc = 0;
- struct ll_inode_info *plli;
- ENTRY;
+ struct ll_inode_info *lli = ll_i2info(dir);
+ struct ll_statahead_info *sai = lli->lli_sai;
+ struct dentry *parent;
+ struct ll_sa_entry *entry;
+ struct ptlrpc_thread *thread;
+ struct l_wait_info lwi = { 0 };
+ int rc = 0;
+ struct ll_inode_info *plli;
+ ENTRY;
LASSERT(lli->lli_opendir_pid == current_pid());
ll_inode2fid(inode), &bits);
if (rc == 1) {
if ((*dentryp)->d_inode == NULL) {
- *dentryp = ll_splice_alias(inode,
- *dentryp);
- if (IS_ERR(*dentryp)) {
+ struct dentry *alias;
+
+ alias = ll_splice_alias(inode,
+ *dentryp);
+ if (IS_ERR(alias)) {
ll_sai_unplug(sai, entry);
- RETURN(PTR_ERR(*dentryp));
+ RETURN(PTR_ERR(alias));
}
+ *dentryp = alias;
} else if ((*dentryp)->d_inode != inode) {
/* revalidate, but inode is recreated */
CDEBUG(D_READA,