From 0cad561f8c6fc67ed5efb3544228dd078ca52fc7 Mon Sep 17 00:00:00 2001 From: mmacy Date: Sat, 19 May 2018 04:08:11 +0000 Subject: [PATCH] cache_lookup remove unused variable and initialize used --- sys/kern/vfs_cache.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 0ed71900709a..475ae0caa2e1 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -752,6 +752,7 @@ cache_negative_shrink_select(int start, struct namecache **ncpp, int i; *ncpp = ncp = NULL; + neglist = NULL; for (i = start; i < numneglists; i++) { neglist = &neglists[i]; @@ -1230,7 +1231,7 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct namecache_ts *ncp_ts; struct namecache *ncp; struct rwlock *blp; - struct mtx *dvlp, *dvlp2; + struct mtx *dvlp; uint32_t hash; int error, ltype; @@ -1249,12 +1250,12 @@ cache_lookup(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, retry: blp = NULL; + dvlp = NULL; error = 0; if (cnp->cn_namelen == 2 && cnp->cn_nameptr[0] == '.' && cnp->cn_nameptr[1] == '.') { counter_u64_add(dotdothits, 1); dvlp = VP2VNODELOCK(dvp); - dvlp2 = NULL; mtx_lock(dvlp); ncp = dvp->v_cache_dd; if (ncp == NULL) { @@ -1629,6 +1630,7 @@ cache_enter_time(struct vnode *dvp, struct vnode *vp, struct componentname *cnp, cache_celockstate_init(&cel); ndd = NULL; + ncp_ts = NULL; flag = 0; if (cnp->cn_nameptr[0] == '.') { if (cnp->cn_namelen == 1)