Whamcloud - gitweb
LU-12800 mdd: do not cache atributes on mdd_parent_fid 87/36287/2
authorAndriy Skulysh <c17819@cray.com>
Mon, 5 Aug 2019 15:24:05 +0000 (18:24 +0300)
committerOleg Drokin <green@whamcloud.com>
Wed, 9 Oct 2019 22:35:35 +0000 (22:35 +0000)
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 <c17819@cray.com>
Reviewed-by: Alexander Boyko <c17825@cray.com>
Reviewed-by: Vladimir Saveliev <c17830@cray.com>
Reviewed-on: https://review.whamcloud.com/36287
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Alexandr Boyko <c17825@cray.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/mdd/mdd_dir.c

index f074f23..e3a80bb 100644 (file)
@@ -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)