From: yangsheng Date: Thu, 2 Dec 2010 19:02:46 +0000 (+0800) Subject: b=24037 unlock new inode. X-Git-Tag: 2.1.57.0~6 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=9b481335eca2215e0f69533dd7bc1267e9e26783;p=fs%2Flustre-release.git b=24037 unlock new inode. 2.6.32 kernel return a locked inode after new_inode. So we need unlock it. --- diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 147fd69..c474d4c 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -1459,6 +1459,8 @@ static int osd_create_post(struct osd_thread_info *info, struct osd_object *obj, struct lu_attr *attr, struct thandle *th) { osd_object_init0(obj); + if (obj->oo_inode && (obj->oo_inode->i_state & I_NEW)) + unlock_new_inode(obj->oo_inode); return 0; } @@ -2917,7 +2919,7 @@ static int __osd_ea_add_rec(struct osd_thread_info *info, child = osd_child_dentry_get(info->oti_env, pobj, name, strlen(name)); if (fid_is_igif((struct lu_fid *)fid) || - fid_seq((struct lu_fid *)fid) >= FID_SEQ_NORMAL) { + fid_is_norm((struct lu_fid *)fid)) { ldp = (struct ldiskfs_dentry_param *)info->oti_ldp; osd_get_ldiskfs_dirent_param(ldp, fid); child->d_fsdata = (void*) ldp;