From 86cfd2302074f4bbc2a09e882b70b0b540f019c7 Mon Sep 17 00:00:00 2001 From: Simon Wilkinson Date: Fri, 10 Jul 2009 17:57:16 +0100 Subject: [PATCH] Remove unused variables in vol Remove some unused variables and isolate items that are demand attach only Reviewed-on: http://gerrit.openafs.org/71 Verified-by: Derrick Brashear Reviewed-by: Derrick Brashear --- src/vol/ihandle.c | 2 +- src/vol/vnode.c | 4 +++- src/vol/volume.c | 4 ---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/vol/ihandle.c b/src/vol/ihandle.c index e6dcd31bd..fa6b6f633 100644 --- a/src/vol/ihandle.c +++ b/src/vol/ihandle.c @@ -96,7 +96,7 @@ void *ih_sync_thread(void *); #ifdef AFS_PTHREAD_ENV /* Initialize the global ihandle mutex */ void -ih_glock_init() +ih_glock_init(void) { assert(pthread_mutex_init(&ih_glock_mutex, NULL) == 0); } diff --git a/src/vol/vnode.c b/src/vol/vnode.c index 3d773ca89..d051bbc1b 100644 --- a/src/vol/vnode.c +++ b/src/vol/vnode.c @@ -1582,7 +1582,9 @@ VInvalidateVnodesByVolume_r(Volume * vp, * Traverse the volume's vnode list. Pull all the ihandles out into a * thread-private array for later asynchronous processing. */ - restart_traversal: +#ifdef AFS_DEMAND_ATTACH_FS +restart_traversal: +#endif for (queue_Scan(&vp->vnode_list, vnp, nvnp, Vnode)) { if (vnp->handle != NULL) { if (i == vec_len) { diff --git a/src/vol/volume.c b/src/vol/volume.c index ef3aeef45..d5ed2fc7a 100644 --- a/src/vol/volume.c +++ b/src/vol/volume.c @@ -603,10 +603,7 @@ VInitVolumePackage(ProgramType pt, afs_uint32 nLargeVnodes, afs_uint32 nSmallVno #ifdef AFS_PTHREAD_ENV static void * VInitVolumePackageThread(void * args) { - int errors = 0; /* Number of errors while finding vice partitions. */ - DIR *dirp; - struct dirent *dp; struct DiskPartition64 *diskP; struct vinitvolumepackage_thread_t * params; struct diskpartition_queue_t * dpq; @@ -3696,7 +3693,6 @@ VCheckOffline(register Volume * vp) static int VCheckOffline(register Volume * vp) { - Volume * rvp = NULL; int ret = 0; if (vp->goingOffline && !vp->nUsers) { -- 2.39.5