From d99389a97ba2e098fdd9e61bd9ac7ce2a1b1fc26 Mon Sep 17 00:00:00 2001 From: huanghua Date: Mon, 5 Jun 2006 09:48:12 +0000 Subject: [PATCH] (1) In MDT, call mo_open of CMM in mdt_md_open; (2) fix some syntax error in md_objects. --- lustre/include/md_object.h | 4 ++-- lustre/mdt/mdt_reint.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lustre/include/md_object.h b/lustre/include/md_object.h index bd70ba4..a45bd37 100644 --- a/lustre/include/md_object.h +++ b/lustre/include/md_object.h @@ -185,7 +185,7 @@ static inline int mo_xattr_get(const struct lu_context *cx, struct md_object *m, void *buf, int buf_len, const char *name) { - if (m->mo_ops->moo_xattr_get); + if (m->mo_ops->moo_xattr_get) return m->mo_ops->moo_xattr_get(cx, m, buf, buf_len, name); else return -ENODEV; @@ -243,7 +243,7 @@ static inline int mdo_name_insert(const struct lu_context *cx, const char *name, const struct lu_fid *f, struct lu_attr *at) { - if (p->mo_dir_ops->mdo_name_insert); + if (p->mo_dir_ops->mdo_name_insert) return p->mo_dir_ops->mdo_name_insert(cx, p, name, f, at); else return -ENODEV; diff --git a/lustre/mdt/mdt_reint.c b/lustre/mdt/mdt_reint.c index 2b1c1fe..95b3616 100644 --- a/lustre/mdt/mdt_reint.c +++ b/lustre/mdt/mdt_reint.c @@ -38,9 +38,10 @@ /* object operations */ -static int mdt_md_open(struct mdt_thread_info *info, struct mdt_object *obj) +static int mdt_md_open(struct mdt_thread_info *info, struct mdt_object *child) { - return 0; + return mo_open(info->mti_ctxt, mdt_object_child(child)); + } static int mdt_md_create(struct mdt_thread_info *info) @@ -312,7 +313,7 @@ static int mdt_reint_open(struct mdt_thread_info *info) /*FIXME add permission checking here */ if (S_ISREG(mode)) ; - + /* Open it now. */ result = mdt_md_open(info, child); out_child: -- 1.8.3.1