Whamcloud - gitweb
LU-6078 utils: fix copytool file bounds checking
[fs/lustre-release.git] / lustre / lod / lod_dev.c
index 3cb7171..e9cf6ce 100644 (file)
@@ -591,9 +591,12 @@ static int lod_trans_stop(const struct lu_env *env, struct dt_device *dt,
        int                             rc;
        ENTRY;
 
+       thandle_get(th);
        rc = dt_trans_stop(env, th->th_dev, th);
-       if (likely(tu == NULL))
+       if (likely(tu == NULL)) {
+               thandle_put(th);
                RETURN(rc);
+       }
 
        list_for_each_entry_safe(update, tmp,
                                 &tu->tu_remote_update_list,
@@ -603,6 +606,7 @@ static int lod_trans_stop(const struct lu_env *env, struct dt_device *dt,
                if (unlikely(rc2 != 0 && rc == 0))
                        rc = rc2;
        }
+       thandle_put(th);
 
        RETURN(rc);
 }
@@ -1195,8 +1199,8 @@ static int __init lod_mod_init(void)
                return rc;
 
        type = class_search_type(LUSTRE_LOD_NAME);
-       type->typ_procsym = lprocfs_seq_register("lov", proc_lustre_root,
-                                                NULL, NULL);
+       type->typ_procsym = lprocfs_register("lov", proc_lustre_root,
+                                            NULL, NULL);
        if (IS_ERR(type->typ_procsym)) {
                CERROR("lod: can't create compat entry \"lov\": %d\n",
                       (int)PTR_ERR(type->typ_procsym));