Whamcloud - gitweb
- minor fix: lmv object leak in lmv_get_mea_and_update_object()
authoralex <alex>
Mon, 21 Jun 2004 16:42:05 +0000 (16:42 +0000)
committeralex <alex>
Mon, 21 Jun 2004 16:42:05 +0000 (16:42 +0000)
- CERROR() against leaked lmv objects

lustre/lmv/lmv_obd.c
lustre/lmv/lmv_objmgr.c

index 3316368..324793e 100644 (file)
@@ -720,6 +720,7 @@ int lmv_get_mea_and_update_object(struct obd_export *exp, struct ll_fid *fid)
         if (IS_ERR(obj))
                 rc = PTR_ERR(obj);
         
+        lmv_put_obj(obj);
         obd_free_memmd(exp, (struct lov_stripe_md **)&md.mea);
 
 cleanup:
index feb470f..7c2c8e5 100644 (file)
@@ -374,6 +374,12 @@ lmv_cleanup_mgr(struct obd_device *obd)
                         continue;
 
                 obj->state |= O_FREEING;
+                if (atomic_read(&obj->count) > 1)
+                        CERROR("obj %lu/%lu/%lu has count > 1 (%d)\n",
+                               (unsigned long) obj->fid.mds,
+                               (unsigned long) obj->fid.id,
+                               (unsigned long) obj->fid.generation,
+                               atomic_read(&obj->count));
                 __put_obj(obj);
         }
         spin_unlock(&lmv_obj_list_lock);