From 2242d244b53ad36c3a24c2f458ce09a8f74c4393 Mon Sep 17 00:00:00 2001 From: nikita Date: Sun, 15 Oct 2006 13:43:20 +0000 Subject: [PATCH] mdt: do not zero mdt_thread_info --- lustre/mdt/mdt_handler.c | 8 +++----- lustre/mdt/mdt_lib.c | 5 +---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 9fb35f4..986bf19 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -1732,11 +1732,6 @@ static void mdt_thread_info_init(struct ptlrpc_request *req, LASSERT(info->mti_env != req->rq_svc_thread->t_env); - /* - * XXX Leave zeroing here, unless everything is fixed. - */ - memset(info, 0, sizeof *info); - info->mti_rep_buf_nr = ARRAY_SIZE(info->mti_rep_buf_size); for (i = 0; i < ARRAY_SIZE(info->mti_rep_buf_size); i++) info->mti_rep_buf_size[i] = -1; @@ -1754,6 +1749,9 @@ static void mdt_thread_info_init(struct ptlrpc_request *req, req_capsule_init(&info->mti_pill, req, RCL_SERVER, info->mti_rep_buf_size); memset(&info->mti_attr, 0, sizeof info->mti_attr); + info->mti_transno = 0; + info->mti_has_trans = 0; + info->mti_no_need_trans = 0; } static void mdt_thread_info_fini(struct mdt_thread_info *info) diff --git a/lustre/mdt/mdt_lib.c b/lustre/mdt/mdt_lib.c index 14956d1..7060d7d 100644 --- a/lustre/mdt/mdt_lib.c +++ b/lustre/mdt/mdt_lib.c @@ -535,7 +535,7 @@ int mdt_handle_last_unlink(struct mdt_thread_info *info, struct mdt_object *mo, /* If it is a remote object, and we do not retrieve * EA back unlink reg file*/ mode = S_IFREG; - else + else mode = lu_object_attr(&mo->mot_obj.mo_lu); LASSERT(ma->ma_lmm_size); @@ -648,10 +648,7 @@ static int mdt_epoch_unpack(struct mdt_thread_info *info) if (req_capsule_get_size(pill, &RMF_MDT_EPOCH, RCL_CLIENT)) info->mti_epoch = req_capsule_client_get(pill, &RMF_MDT_EPOCH); else - /* it is set to NULL already. info->mti_epoch = NULL; - */ - ; RETURN(info->mti_epoch == NULL ? -EFAULT : 0); } -- 1.8.3.1