Whamcloud - gitweb
Fixes with refcounting.
authoryury <yury>
Mon, 21 Jun 2004 15:28:37 +0000 (15:28 +0000)
committeryury <yury>
Mon, 21 Jun 2004 15:28:37 +0000 (15:28 +0000)
lustre/lmv/lmv_intent.c
lustre/lmv/lmv_internal.h
lustre/lmv/lmv_obd.c
lustre/lmv/lmv_objmgr.c

index 8726bda..bc3bbe3 100644 (file)
@@ -325,11 +325,10 @@ void lmv_update_body_from_obj(struct mds_body *body, struct lmv_inode *obj)
 {
         /* update size */
         body->size += obj->size;
-
-        /* update atime */
-        /* update ctime */
-        /* update mtime */
-        /* update nlink */
+/*        body->atime = obj->atime;
+        body->ctime = obj->ctime;
+        body->mtime = obj->mtime;
+        body->nlink = obj->nlink;*/
 }
 
 int lmv_lookup_slaves(struct obd_export *exp, struct ptlrpc_request **reqp)
index 42afd67..377fb43 100644 (file)
@@ -26,6 +26,10 @@ struct lmv_obj {
         int                objcount;       /* number of slaves */
         struct lmv_inode   *objs;          /* array of dirobjs */
         struct obd_device  *obd;           /* pointer to LMV itself */
+       unsigned long      mtime;
+       unsigned long      ctime;
+       unsigned long      atime;
+       unsigned long      nlink;
 };
 
 static inline void
index 80b54e2..3316368 100644 (file)
@@ -1130,10 +1130,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 {
index d00877d..feb470f 100644 (file)
@@ -316,8 +316,6 @@ lmv_create_obj(struct obd_export *exp, struct ll_fid *fid, struct mea *mea)
                        (unsigned long)fid->generation);
                 GOTO(cleanup, obj = ERR_PTR(-ENOMEM));
         }
-        
-        lmv_put_obj(obj);
 cleanup:
         if (req)       
                 ptlrpc_req_finished(req);