From a38c587cbf3be2e9870941601f34e355e6dced2f Mon Sep 17 00:00:00 2001 From: Andriy Skulysh Date: Mon, 5 Aug 2019 18:24:05 +0300 Subject: [PATCH] LU-12800 mdd: do not cache atributes on mdd_parent_fid mdd_is_parent() brings link xattrs of not locked objects into osp cache. Invalidate osp cache built during mdd_is_subdir(). Change-Id: Id9e34af3ff4712af9d4f3ae984e8082448e5fd3f Cray-bug-id: LUS-7634 Signed-off-by: Andriy Skulysh Reviewed-by: Alexander Boyko Reviewed-by: Vladimir Saveliev Reviewed-on: https://review.whamcloud.com/36287 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Alexandr Boyko Reviewed-by: Oleg Drokin --- lustre/mdd/mdd_dir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lustre/mdd/mdd_dir.c b/lustre/mdd/mdd_dir.c index f074f23..e3a80bb 100644 --- a/lustre/mdd/mdd_dir.c +++ b/lustre/mdd/mdd_dir.c @@ -234,6 +234,9 @@ static inline int mdd_parent_fid(const struct lu_env *env, if (rc != 0) GOTO(lookup, rc); + /* the obj is not locked, don't cache attributes */ + mdd_invalidate(env, &obj->mod_obj); + LASSERT(ldata.ld_leh != NULL); /* Directory should only have 1 parent */ if (ldata.ld_leh->leh_reccount > 1) -- 1.8.3.1