Whamcloud - gitweb
LU-6970 llog: free thandle if declare failed 51/15951/2
authorHongchao Zhang <hongchao.zhang@intel.com>
Tue, 19 May 2015 20:38:24 +0000 (04:38 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Fri, 28 Aug 2015 02:07:17 +0000 (02:07 +0000)
in llog_osd_put_cat_list, the "thandle" should be cleaned up
if the following "declare" operation failed.

Change-Id: I0befba0068cb91fe685502f1e833c2fb6d6477bd
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: http://review.whamcloud.com/15951
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/llog_osd.c

index 4912db9..a8a53e4 100644 (file)
@@ -1918,7 +1918,7 @@ int llog_osd_put_cat_list(const struct lu_env *env, struct dt_device *d,
        lgi->lgi_buf.lb_buf = idarray;
        rc = dt_declare_record_write(env, o, &lgi->lgi_buf, lgi->lgi_off, th);
        if (rc)
-               GOTO(out, rc);
+               GOTO(out_trans, rc);
 
        /* For update log, this happens during initialization,
         * see lod_sub_prep_llog(), and we need make sure catlog