From: yury Date: Wed, 25 Oct 2006 13:01:23 +0000 (+0000) Subject: - fixes in mdt_rename_lock() X-Git-Tag: v1_8_0_110~486^2~354 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=723a14286b4edb7729fd99d01a15e1002bc8ce25;p=fs%2Flustre-release.git - fixes in mdt_rename_lock() --- diff --git a/lustre/mdt/mdt_reint.c b/lustre/mdt/mdt_reint.c index 3583497..14fee60 100644 --- a/lustre/mdt/mdt_reint.c +++ b/lustre/mdt/mdt_reint.c @@ -607,7 +607,6 @@ static int mdt_rename_lock(struct mdt_thread_info *info, { ldlm_policy_data_t policy = { .l_inodebits = { MDS_INODELOCK_UPDATE } }; struct ldlm_namespace *ns = info->mti_mdt->mdt_namespace; - int flags = LDLM_FL_LOCAL_ONLY | LDLM_FL_ATOMIC_CB; struct ldlm_res_id res_id; struct lu_site *ls; int rc; @@ -617,6 +616,8 @@ static int mdt_rename_lock(struct mdt_thread_info *info, fid_build_reg_res_name(&LUSTRE_BFL_FID, &res_id); if (ls->ls_control_exp == NULL) { + int flags = LDLM_FL_LOCAL_ONLY | LDLM_FL_ATOMIC_CB; + /* * Current node is controller, that is mdt0, where we should * take BFL lock. @@ -626,6 +627,8 @@ static int mdt_rename_lock(struct mdt_thread_info *info, ldlm_completion_ast, NULL, NULL, 0, NULL, lh); } else { + int flags = 0; + /* * This is the case mdt0 is remote node, issue DLM lock like * other clients.