Whamcloud - gitweb
LU-7068 mdd: object leak in mdd_migrate_entries 84/16384/4
authorwang di <di.wang@intel.com>
Thu, 10 Sep 2015 04:34:47 +0000 (21:34 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 30 Nov 2015 17:19:33 +0000 (17:19 +0000)
mdd_migrate_entries should release the object
if mdd_trans_start() fails.

Signed-off-by: wang di <di.wang@intel.com>
Change-Id: If10dce8b450e8c19bb93465beb08118e98c4ed96
Reviewed-on: http://review.whamcloud.com/16384
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
lustre/mdd/mdd_dir.c

index 430568d..db4ddad 100644 (file)
@@ -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