cache_inode_lookup should not trust cache when icreate is active.

This is exposed with a very slow FSAL create, just after file object
created but before the entry is added to cache. Client's retry create
will fail with EXIST and then lookup will fail due to parent's not
yet invalidated.

A refcnt is added to cache entry and inc before any create happens
and dec after it's added to dentry cache. trust_negative_cache should
evaluate this counter.

Signed-off-by: Rong Zeng <>
4 files changed