From bed37993522e58aab0c24a2a73977a6259caa46d Mon Sep 17 00:00:00 2001 From: shadow Date: Fri, 26 Jun 2009 11:13:49 +0000 Subject: [PATCH] Avoid leaking dentries and mfds Branch b_release_1_8_1 b=19756 o=green i=shadow i=adilger --- lustre/mds/mds_open.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c index 517a301..0c5a565 100644 --- a/lustre/mds/mds_open.c +++ b/lustre/mds/mds_open.c @@ -587,6 +587,7 @@ static void reconstruct_open(struct mds_update_record *rec, int offset, } dchild = mds_lookup(obd, rec->ur_name, parent, rec->ur_namelen - 1); + l_dput(parent); if (IS_ERR(dchild)) { rc = PTR_ERR(dchild); LCONSOLE_WARN("Child "LPU64"/%u lookup error %d." @@ -595,7 +596,6 @@ static void reconstruct_open(struct mds_update_record *rec, int offset, rc, obd_uuid2str(&exp->exp_client_uuid), obd_export_nid2str(exp)); mds_export_evict(exp); - l_dput(parent); EXIT; return; } @@ -1592,10 +1592,10 @@ out: /* If other clients have this file open for write, rc will be > 0 */ if (rc > 0) rc = 0; - l_dput(mfd->mfd_dentry); - mds_mfd_put(mfd); cleanup: + l_dput(mfd->mfd_dentry); + mds_mfd_put(mfd); if (req != NULL && reply_body != NULL) { rc = mds_finish_transno(mds, NULL, handle, req, rc, 0, 0); } else if (handle) { -- 1.8.3.1