Page MenuHomeFreeBSD

D50107.diff
No OneTemporary

D50107.diff

diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c
--- a/sys/kern/vfs_cache.c
+++ b/sys/kern/vfs_cache.c
@@ -2628,28 +2628,20 @@
("wrong vnode type %p", vp));
atomic_thread_fence_rel();
atomic_store_ptr(&dvp->v_cache_dd, ncp);
- }
-
- if (vp != NULL) {
- if (flag != NCF_ISDOTDOT) {
- /*
- * For this case, the cache entry maps both the
- * directory name in it and the name ".." for the
- * directory's parent.
- */
- if ((ndd = vp->v_cache_dd) != NULL) {
- if ((ndd->nc_flag & NCF_ISDOTDOT) != 0)
- cache_zap_locked(ndd);
- else
- ndd = NULL;
- }
- atomic_thread_fence_rel();
- atomic_store_ptr(&vp->v_cache_dd, ncp);
- } else if (vp->v_type != VDIR) {
- if (vp->v_cache_dd != NULL) {
- atomic_store_ptr(&vp->v_cache_dd, NULL);
- }
+ } else if (vp != NULL) {
+ /*
+ * For this case, the cache entry maps both the
+ * directory name in it and the name ".." for the
+ * directory's parent.
+ */
+ if ((ndd = vp->v_cache_dd) != NULL) {
+ if ((ndd->nc_flag & NCF_ISDOTDOT) != 0)
+ cache_zap_locked(ndd);
+ else
+ ndd = NULL;
}
+ atomic_thread_fence_rel();
+ atomic_store_ptr(&vp->v_cache_dd, ncp);
}
if (flag != NCF_ISDOTDOT) {

File Metadata

Mime Type
text/plain
Expires
Sun, Jan 25, 5:36 PM (5 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27954970
Default Alt Text
D50107.diff (1 KB)

Event Timeline