From e8379acd184725d2b31f7e5914a56043707318f1 Mon Sep 17 00:00:00 2001 From: tappro Date: Mon, 8 Aug 2005 23:03:16 +0000 Subject: [PATCH] b=7277 dentry is used before initialization. --- lustre/mds/mds_reint.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index d6e771a..114a174 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -3269,11 +3269,6 @@ static int mds_reint_rename_create_name(struct mds_update_record *rec, CDEBUG(D_OTHER, "%s: request to create name %s for "DLID4"\n", obd->obd_name, rec->ur_tgt, OLID4(rec->ur_id1)); - /* get parent id: ldlm lock on the parent protects ea */ - rc = mds_read_inode_sid(obd, de_tgtdir->d_inode, &ids[1]); - if (rc) - GOTO(cleanup, rc); - /* first, lookup the target */ rc = mds_get_parent_child_locked(obd, mds, rec->ur_id2, parent_lockh, &de_tgtdir, LCK_PW, MDS_INODELOCK_UPDATE, @@ -3283,6 +3278,11 @@ static int mds_reint_rename_create_name(struct mds_update_record *rec, if (rc) GOTO(cleanup, rc); + /* get parent id: ldlm lock on the parent protects ea */ + rc = mds_read_inode_sid(obd, de_tgtdir->d_inode, &ids[1]); + + if (rc) + GOTO(cleanup, rc); cleanup_phase = 1; LASSERT(de_tgtdir); -- 1.8.3.1