When zapping v_cache_dd for !MAKEENTRY case in cache_lookup(), we shall

lock cache as writer.

Reviewed by:	kan
This commit is contained in:
kib 2009-04-11 16:12:20 +00:00
parent dc27114478
commit 9260481d50

View File

@ -410,6 +410,8 @@ cache_lookup(dvp, vpp, cnp)
goto unlock;
}
if ((cnp->cn_flags & MAKEENTRY) == 0) {
if (!wlocked && !CACHE_UPGRADE_LOCK())
goto wlock;
if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT)
cache_zap(dvp->v_cache_dd);
dvp->v_cache_dd = NULL;