Subject: afs/fs/afs vlocation.c,1.15,1.16 cell.c,1.14,1.15

From: [email-masked]
Date: Tue, 16 Sep 2003 17:43:57 +0100

Update of /home/cvs/afs/fs/afs
In directory phoenix.infradead.org:/tmp/cvs-serv19774/fs/afs

Modified Files:
	vlocation.c cell.c 
Log Message:
use list_for_each_entry() properly

Index: vlocation.c
===================================================================
RCS file: /home/cvs/afs/fs/afs/vlocation.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- vlocation.c	10 Sep 2003 13:32:37 -0000	1.15
+++ vlocation.c	16 Sep 2003 16:43:54 -0000	1.16
@@ -245,7 +245,6 @@
 			 struct afs_vlocation **_vlocation)
 {
 	struct afs_cache_vlocation vldb;
-	struct list_head *_p;
 	struct afs_vlocation *vlocation;
 	afs_voltype_t voltype;
 	afs_volid_t vid;
@@ -259,8 +258,7 @@
 	}
 
 	/* search the cell's active list first */
-	list_for_each(_p, &cell->vl_list) {
-		vlocation = list_entry(_p, struct afs_vlocation, link);
+	list_for_each_entry(vlocation, &cell->vl_list, link) {
 		if (namesz < sizeof(vlocation->vldb.name) &&
 		    vlocation->vldb.name[namesz] != '\0')
 			continue;
@@ -271,8 +269,7 @@
 
 	/* search the cell's graveyard list second */
 	spin_lock(&cell->vl_gylock);
-	list_for_each(_p, &cell->vl_graveyard) {
-		vlocation = list_entry(_p, struct afs_vlocation, link);
+	list_for_each_entry(vlocation, &cell->vl_graveyard, link) {
 		if (namesz < sizeof(vlocation->vldb.name) &&
 		    vlocation->vldb.name[namesz] != '\0')
 			continue;
@@ -425,8 +422,9 @@
 
 	afs_kafstimod_add_timer(&vlocation->upd_timer, 10 * HZ);
 
-#if 0
-	/* TODO: update volume entry in local cache */
+#ifdef AFS_CACHING_SUPPORT
+	/* update volume entry in local cache */
+	cachefs_update_cookie(vlocation->cache);
 #endif
 
 	*_vlocation = vlocation;

Index: cell.c
===================================================================
RCS file: /home/cvs/afs/fs/afs/cell.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- cell.c	10 Sep 2003 13:32:37 -0000	1.14
+++ cell.c	16 Sep 2003 16:43:54 -0000	1.15
@@ -206,10 +206,11 @@
 		list_for_each_entry(cell, &afs_cells, link) {
 			if (strncmp(cell->name, name, namesz) == 0) {
 				afs_get_cell(cell);
-				break;
+				goto found;
 			}
-			cell = NULL;
 		}
+		cell = NULL;
+	found:
 
 		read_unlock(&afs_cells_lock);