From: tappro Date: Sat, 12 Aug 2006 14:45:01 +0000 (+0000) Subject: small fixes X-Git-Tag: v1_8_0_110~486^2~1195 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=ba4cadc5ba0aceda45c38d7cfd2651b09a83b1b5;p=fs%2Flustre-release.git small fixes --- diff --git a/lustre/mdd/mdd_handler.c b/lustre/mdd/mdd_handler.c index 659754c..70bc64a 100644 --- a/lustre/mdd/mdd_handler.c +++ b/lustre/mdd/mdd_handler.c @@ -96,6 +96,7 @@ static struct lu_object *mdd_object_alloc(const struct lu_context *ctxt, lu_object_init(o, NULL, d); mdd_obj->mod_obj.mo_ops = &mdd_obj_ops; mdd_obj->mod_obj.mo_dir_ops = &mdd_dir_ops; + atomic_set(&mdd_obj->mod_count, 0); o->lo_ops = &mdd_lu_obj_ops; return o; } else { @@ -1634,13 +1635,11 @@ static int mdd_open(const struct lu_context *ctxt, struct md_object *obj) static int mdd_close(const struct lu_context *ctxt, struct md_object *obj, struct md_attr *ma) { - __mdd_attr_get(ctxt, md2mdd_obj(obj), ma); - if (atomic_dec_and_test(&md2mdd_obj(obj)->mod_count)) { - CWARN("File closed\n"); + /*TODO: Remove it from orphan list */ } - - return 0; + + return __mdd_finish_unlink(ctxt, md2mdd_obj(obj), ma); } static int mdd_readpage(const struct lu_context *ctxt, struct md_object *obj,