From: wangdi Date: Thu, 28 Sep 2006 10:50:58 +0000 (+0000) Subject: Branch: b_new_cmd X-Git-Tag: v1_8_0_110~486^2~787 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=8e7effb44369916fa98a02e98f91358a1792bc90;p=fs%2Flustre-release.git Branch: b_new_cmd missing some readlock in mdd api --- diff --git a/lustre/mdd/mdd_handler.c b/lustre/mdd/mdd_handler.c index 456c162..d7caeea 100644 --- a/lustre/mdd/mdd_handler.c +++ b/lustre/mdd/mdd_handler.c @@ -696,7 +696,9 @@ static int mdd_readlink(const struct lu_context *ctxt, struct md_object *obj, LASSERT(lu_object_exists(&obj->mo_lu)); next = mdd_object_child(mdd_obj); + mdd_read_lock(ctxt, mdd_obj); rc = next->do_body_ops->dbo_read(ctxt, next, buf, buf_len, &pos); + mdd_read_unlock(ctxt, mdd_obj); RETURN(rc); } @@ -712,7 +714,9 @@ static int mdd_xattr_list(const struct lu_context *ctxt, struct md_object *obj, LASSERT(lu_object_exists(&obj->mo_lu)); next = mdd_object_child(mdd_obj); + mdd_read_lock(ctxt, mdd_obj); rc = next->do_ops->do_xattr_list(ctxt, next, buf, buf_len); + mdd_read_unlock(ctxt, mdd_obj); RETURN(rc); }