Whamcloud - gitweb
- three lmv obj leaks fixed
[fs/lustre-release.git] / lustre / lmv / lmv_obd.c
index 80b54e2..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:
@@ -1130,10 +1131,8 @@ int lmv_setattr(struct obd_export *exp, struct mdc_op_data *data,
                                 ptlrpc_req_finished(req);
                         }
 
-                        if (rc) {
-                                lmv_put_obj(obj);
-                                RETURN(rc);
-                        }
+                        if (rc)
+                                break;
                 }
                 lmv_put_obj(obj);
         } else {