RETURN(-ENOMEM);
if (!it || !it->d.lustre.it_disposition) {
+ struct ll_sb_info *sbi = ll_i2sbi(inode);
+
/* Convert f_flags into access mode. We cannot use file->f_mode,
* because everything but O_ACCMODE mask was stripped from
* there */
ll_file_data_put(fd);
GOTO(out, rc);
}
+
+ md_set_lock_data(sbi->ll_md_exp, &it->d.lustre.it_lock_handle,
+ file->f_dentry->d_inode);
}
lprocfs_counter_incr(ll_i2sbi(inode)->ll_stats, LPROC_LL_OPEN);
repbody = req_capsule_server_get(&info->mti_pill, &RMF_MDT_BODY);
lh = &info->mti_lh[MDT_LH_PARENT];
- lh->mlh_mode = LCK_PW;
+ lh->mlh_mode = LCK_EX;
parent = mdt_object_find_lock(info, rr->rr_fid1,
lh, MDS_INODELOCK_UPDATE);