From 514bc5371d097bfca4b021dd49a063b4efd8b78f Mon Sep 17 00:00:00 2001 From: yury Date: Mon, 21 Jun 2004 15:28:37 +0000 Subject: [PATCH] Fixes with refcounting. --- lustre/lmv/lmv_intent.c | 9 ++++----- lustre/lmv/lmv_internal.h | 4 ++++ lustre/lmv/lmv_obd.c | 6 ++---- lustre/lmv/lmv_objmgr.c | 2 -- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lustre/lmv/lmv_intent.c b/lustre/lmv/lmv_intent.c index 8726bda..bc3bbe3 100644 --- a/lustre/lmv/lmv_intent.c +++ b/lustre/lmv/lmv_intent.c @@ -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) diff --git a/lustre/lmv/lmv_internal.h b/lustre/lmv/lmv_internal.h index 42afd67..377fb43 100644 --- a/lustre/lmv/lmv_internal.h +++ b/lustre/lmv/lmv_internal.h @@ -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 diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 80b54e2..3316368 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -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 { diff --git a/lustre/lmv/lmv_objmgr.c b/lustre/lmv/lmv_objmgr.c index d00877d..feb470f 100644 --- a/lustre/lmv/lmv_objmgr.c +++ b/lustre/lmv/lmv_objmgr.c @@ -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); -- 1.8.3.1