From 0e54f0715572c8352478bff99801c534a9ef0658 Mon Sep 17 00:00:00 2001 From: wang di Date: Wed, 9 Sep 2015 21:34:47 -0700 Subject: [PATCH] LU-7068 mdd: object leak in mdd_migrate_entries mdd_migrate_entries should release the object if mdd_trans_start() fails. Signed-off-by: wang di Change-Id: If10dce8b450e8c19bb93465beb08118e98c4ed96 Reviewed-on: http://review.whamcloud.com/16384 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Reviewed-by: Lai Siyao --- lustre/mdd/mdd_dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/mdd/mdd_dir.c b/lustre/mdd/mdd_dir.c index 430568d..db4ddad 100644 --- a/lustre/mdd/mdd_dir.c +++ b/lustre/mdd/mdd_dir.c @@ -3667,7 +3667,7 @@ static int mdd_migrate_entries(const struct lu_env *env, handle = mdd_trans_create(env, mdd); if (IS_ERR(handle)) - GOTO(out, rc = PTR_ERR(handle)); + GOTO(out_put, rc = PTR_ERR(handle)); /* Note: this transaction is part of migration, and it is not * the last step of migration, so we set th_local = 1 to avoid -- 1.8.3.1