From 3eb209f5010adb4c022dda732f37e1929e6eb69c Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 28 Jun 2005 16:10:08 +0000 Subject: [PATCH] - minor optimization: we already have fid in reply, no need to fetch it --- lustre/mds/mds_open.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) 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, -- 1.8.3.1