From: alex Date: Tue, 28 Jun 2005 16:10:08 +0000 (+0000) Subject: - minor optimization: we already have fid in reply, no need to fetch it X-Git-Tag: 1.4.10~969 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=3eb209f5010adb4c022dda732f37e1929e6eb69c;p=fs%2Flustre-release.git - minor optimization: we already have fid in reply, no need to fetch it --- diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 882dd51..a375a98 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -1358,22 +1358,10 @@ got_child: child_mode = LCK_CR; if (!(lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY)) { - struct lustre_id sid; - - down(&dchild->d_inode->i_sem); - rc = mds_read_inode_sid(obd, dchild->d_inode, &sid); - up(&dchild->d_inode->i_sem); - if (rc) { - CERROR("Can't read inode self id, " - "inode %lu, rc %d\n", - dchild->d_inode->i_ino, rc); - GOTO(cleanup, rc); - } - /* In case of replay we do not get a lock assuming that the caller has it already */ - child_res_id.name[0] = id_fid(&sid); - child_res_id.name[1] = id_group(&sid); + child_res_id.name[0] = id_fid(&body->id1); + child_res_id.name[1] = id_group(&body->id1); rc = ldlm_cli_enqueue(NULL, NULL, obd->obd_namespace, child_res_id, LDLM_IBITS, &policy,