-static int ll_statahead_interpret_common(struct inode *dir,
- struct ll_statahead_info *sai,
- struct req_capsule *pill,
- struct lookup_intent *it,
- struct sa_entry *entry,
- struct mdt_body *body)
-{
- struct inode *child;
- int rc;
-
- ENTRY;
-
- child = entry->se_inode;
- rc = ll_prep_inode(&child, pill, dir->i_sb, it);
- if (rc)
- GOTO(out, rc);
-
- /* If encryption context was returned by MDT, put it in
- * inode now to save an extra getxattr.
- */
- if (body->mbo_valid & OBD_MD_ENCCTX) {
- void *encctx = req_capsule_server_get(pill, &RMF_FILE_ENCCTX);
- __u32 encctxlen = req_capsule_get_size(pill, &RMF_FILE_ENCCTX,
- RCL_SERVER);
-
- if (encctxlen) {
- CDEBUG(D_SEC,
- "server returned encryption ctx for "DFID"\n",
- PFID(ll_inode2fid(child)));
- rc = ll_xattr_cache_insert(child,
- xattr_for_enc(child),
- encctx, encctxlen);
- if (rc)
- CWARN("%s: cannot set enc ctx for "DFID": rc = %d\n",
- ll_i2sbi(child)->ll_fsname,
- PFID(ll_inode2fid(child)), rc);
- }
- }
-
- CDEBUG(D_READA, "%s: setting %.*s"DFID" l_data to inode %p\n",
- ll_i2sbi(dir)->ll_fsname, entry->se_qstr.len,
- entry->se_qstr.name, PFID(ll_inode2fid(child)), child);
- ll_set_lock_data(ll_i2sbi(dir)->ll_md_exp, child, it, NULL);
-
- entry->se_inode = child;
-
- if (agl_should_run(sai, child))
- ll_agl_add(sai, child, entry->se_index);
-
-out:
- RETURN(rc);
-}
-