From 09f865aa6470f6b130c5e9679be733f407679cbc Mon Sep 17 00:00:00 2001 From: yury Date: Fri, 13 Aug 2004 16:07:36 +0000 Subject: [PATCH] - mds_lock_mode_for_dir() should check also MDS_NO_SPLIT_EXPECTED. - mds_reint_link() should use LCK_PW instead of LCK_EX when calling mds_lock_mode_for_dir(). --- lustre/mds/handler.c | 2 +- lustre/mds/mds_reint.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index 9b55c52..735489c 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -180,7 +180,7 @@ int mds_lock_mode_for_dir(struct obd_device *obd, * type of access (lookup/modify/split) - LCK_EX -bzzz */ split = mds_splitting_expected(obd, dentry); - if (split == MDS_NO_SPLITTABLE) { + if (split == MDS_NO_SPLITTABLE || MDS_NO_SPLIT_EXPECTED) { /* this inode won't be splitted. so we need not to protect from * just flush client's cache on modification */ ret_mode = 0; diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c index 1b88793..cb7524f 100644 --- a/lustre/mds/mds_reint.c +++ b/lustre/mds/mds_reint.c @@ -2153,7 +2153,7 @@ static int mds_reint_link(struct mds_update_record *rec, int offset, #ifdef S_PDIROPS if (IS_PDIROPS(de_tgt_dir->d_inode)) { int flags = 0; - update_mode = mds_lock_mode_for_dir(obd, de_tgt_dir, LCK_EX); + update_mode = mds_lock_mode_for_dir(obd, de_tgt_dir, LCK_PW); if (update_mode) { rc = ldlm_cli_enqueue(NULL, NULL, obd->obd_namespace, tgt_dir_res_id, LDLM_IBITS, -- 1.8.3.1