From 8e7effb44369916fa98a02e98f91358a1792bc90 Mon Sep 17 00:00:00 2001 From: wangdi Date: Thu, 28 Sep 2006 10:50:58 +0000 Subject: [PATCH] Branch: b_new_cmd missing some readlock in mdd api --- lustre/mdd/mdd_handler.c | 4 ++++ 1 file changed, 4 insertions(+) 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); } -- 1.8.3.1