struct osd_thread_info *oti = osd_oti_get(env);
struct lustre_mdt_attrs *lma = &oti->oti_mdt_attrs;
char *name = oti->oti_name;
+ struct osd_thread_info *info = osd_oti_get(env);
struct dentry *dentry;
struct dentry *parent;
int rc;
dentry = osd_child_dentry_by_inode(env, parent->d_inode,
name, strlen(name));
mutex_lock(&parent->d_inode->i_mutex);
- rc = osd_ldiskfs_add_entry(oh->ot_handle, dentry, obj->oo_inode,
- NULL);
+ rc = osd_ldiskfs_add_entry(info, oh->ot_handle, dentry,
+ obj->oo_inode, NULL);
CDEBUG(D_INODE, "%s: add %s:%lu to remote parent %lu.\n", osd_name(osd),
name, obj->oo_inode->i_ino, parent->d_inode->i_ino);
ldiskfs_inc_count(oh->ot_handle, parent->d_inode);
GOTO(out, rc);
}
+ /* The EA inode should NOT be in OI, old OI scrub may added
+ * such OI mapping by wrong, replace it. */
+ if (unlikely(osd_is_ea_inode(inode))) {
+ iput(inode);
+ goto update;
+ }
+
rc = osd_get_lma(info, inode, dentry, lma);
if (rc == -ENODATA) {
rc = osd_get_idif(info, inode, dentry, oi_fid);
ll_vfs_dq_init(dir->d_inode);
mutex_lock(&dir->d_inode->i_mutex);
- rc = osd_ldiskfs_add_entry(th, child, inode, NULL);
+ rc = osd_ldiskfs_add_entry(info, th, child, inode, NULL);
mutex_unlock(&dir->d_inode->i_mutex);
RETURN(rc);
if (rc != 0)
GOTO(unlock, rc);
- rc = osd_ldiskfs_add_entry(jh, tgt_child, inode, NULL);
+ rc = osd_ldiskfs_add_entry(info, jh, tgt_child, inode, NULL);
GOTO(unlock, rc);