RETURN(dchild);
res_id[0] = dchild->d_inode->i_ino;
+ res_id[1] = dchild->d_inode->i_generation;
rc = ldlm_match_or_enqueue(NULL, NULL, obd->obd_namespace, NULL,
res_id, LDLM_PLAIN, NULL, 0, lock_mode,
&flags, ldlm_completion_ast,
RETURN(de);
res_id[0] = de->d_inode->i_ino;
+ res_id[1] = de->d_inode->i_generation;
rc = ldlm_match_or_enqueue(NULL, NULL, obd->obd_namespace, NULL,
res_id, LDLM_PLAIN, NULL, 0, lock_mode,
&flags, ldlm_completion_ast,
lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_CW : LCK_PW;
res_id[0] = dir->i_ino;
+ res_id[1] = dir->i_generation;
rc = ldlm_lock_match(obd->obd_namespace, res_id, LDLM_PLAIN,
NULL, 0, lock_mode, &lockh);
/* plan to change the link count on this inode: write lock */
lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_PW : LCK_PW;
res_id[0] = de_src->d_inode->i_ino;
+ res_id[1] = de_src->d_inode->i_generation;
rc = ldlm_lock_match(obd->obd_namespace, res_id, LDLM_PLAIN,
NULL, 0, lock_mode, &srclockh);
lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_PW : LCK_PW;
res_id[0] = de_tgt_dir->d_inode->i_ino;
+ res_id[1] = de_tgt_dir->d_inode->i_generation;
rc = ldlm_lock_match(obd->obd_namespace, res_id, LDLM_PLAIN,
NULL, 0, lock_mode, &tgtlockh);
lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_PW : LCK_PW;
res_id[0] = de_srcdir->d_inode->i_ino;
+ res_id[1] = de_srcdir->d_inode->i_generation;
rc = ldlm_lock_match(obd->obd_namespace, res_id, LDLM_PLAIN,
NULL, 0, lock_mode, &srclockh);
lock_mode = (req->rq_reqmsg->opc == MDS_REINT) ? LCK_PW : LCK_PW;
res_id[0] = de_tgtdir->d_inode->i_ino;
+ res_id[1] = de_tgtdir->d_inode->i_generation;
rc = ldlm_lock_match(obd->obd_namespace, res_id, LDLM_PLAIN,
NULL, 0, lock_mode, &tgtlockh);
out_rename_deold:
if (!rc) {
res_id[0] = de_old->d_inode->i_ino;
+ res_id[1] = de_old->d_inode->i_generation;
flags = 0;
/* Take an exclusive lock on the resource that we're
* about to free, to force everyone to drop their