Subject: afs/fs/cachefs interface.c,1.9,1.10 aops.c,1.32,1.33

From: [email-masked]
Date: Fri, 06 Jun 2003 09:33:39 +0100

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

Modified Files:
	interface.c aops.c 
Log Message:
kAFS now creates indexes and cache files through cachefs

Index: interface.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/interface.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- interface.c	4 Jun 2003 14:25:41 -0000	1.9
+++ interface.c	6 Jun 2003 08:33:36 -0000	1.10
@@ -63,13 +63,13 @@
 	struct cachefs_netfs *ptr;
 	int ret;
 
-	_enter("{%s}",netfs->name);
+	kenter("{%s}",netfs->name);
 
 	INIT_LIST_HEAD(&netfs->link);
 
 	netfs->primary_index = kmem_cache_alloc(cachefs_cookie_jar,SLAB_KERNEL);
 	if (!netfs->primary_index) {
-		_leave(" = -ENOMEM");
+		kleave(" = -ENOMEM");
 		return -ENOMEM;
 	}
 
@@ -105,7 +105,7 @@
  error:
 	up_write(&cachefs_addremove_sem);
 
-	_leave(" = %d",ret);
+	kleave(" = %d",ret);
 	return ret;
 } /* end cachefs_register_netfs() */
 
@@ -118,7 +118,7 @@
  */
 void cachefs_unregister_netfs(struct cachefs_netfs *netfs)
 {
-	_enter("{%s.%u}",netfs->name,netfs->version);
+	kenter("{%s.%u}",netfs->name,netfs->version);
 
 	down_write(&cachefs_addremove_sem);
 
@@ -128,7 +128,7 @@
 
 	up_write(&cachefs_addremove_sem);
 
-	_leave("");
+	kleave("");
 } /* end cachefs_unregister_netfs() */
 
 EXPORT_SYMBOL(cachefs_unregister_netfs);
@@ -558,7 +558,7 @@
 
 	*_cookie = NULL;
 
-	_enter("{%s},{%s},%p,",
+	kenter("{%s},{%s},%p,",
 	       iparent ? (char*)iparent->idef->name : "<no-parent>",
 	       idef ? (char*)idef->name : "<file>",
 	       netfs_data);
@@ -566,7 +566,7 @@
 	/* if no parent cookie, then don't create one here either */
 	if (!iparent) {
 		*_cookie = NULL;
-		_leave(" [no parent]");
+		kleave(" [no parent]");
 		return;
 	}
 
@@ -574,7 +574,7 @@
 	cookie = kmem_cache_alloc(cachefs_cookie_jar,SLAB_KERNEL);
 	if (!cookie) {
 		*_cookie = NULL;
-		_leave(" [ENOMEM]");
+		kleave(" [ENOMEM]");
 		return;
 	}
 
@@ -595,7 +595,7 @@
 	down_read(&cachefs_addremove_sem);
 	if (list_empty(&cachefs_cache_list)) {
 		up_read(&cachefs_addremove_sem);
-		_leave(" [no caches]");
+		kleave(" [no caches]");
 		return;
 	}
 
@@ -617,24 +617,25 @@
 	}
 
 	/* if this object is a file, select a cache on which to store it */
-	if (!cookie->idef) {
-		ret = -ENOMEDIUM;
-		super = cachefs_select_cache_for_file();
-		if (!super)
-			goto error; /* couldn't decide on a cache */
-
-		/* instantiate the file */
-		ret = cachefs_instantiate_object(cookie,super);
-		if (ret==0)
-			goto done;
-	}
+	if (cookie->idef)
+		goto done;
+
+	ret = -ENOMEDIUM;
+	super = cachefs_select_cache_for_file();
+	if (!super)
+		goto error; /* couldn't decide on a cache */
+
+	/* instantiate the file */
+	ret = cachefs_instantiate_object(cookie,super);
+	if (ret==0)
+		goto done;
 
  error:
 	printk("CacheFS: error from cache fs: %d\n",ret);
  done:
 	up_write(&cookie->sem);
 	up_read(&cachefs_addremove_sem);
-	_leave("");
+	kleave("");
 } /* end cachefs_acquire_cookie() */
 
 EXPORT_SYMBOL(cachefs_acquire_cookie);
@@ -649,12 +650,12 @@
 {
 	struct cachefs_inode *inode;
 
-	_enter("{%s},%d",
+	kenter("{%s},%d",
 	       cookie && cookie->idef ? (char*)cookie->idef->name : "<file>",
 	       retire);
 
 	if (!cookie) {
-		_leave(" [no cookie]");
+		kleave(" [no cookie]");
 		return;
 	}
 
@@ -702,7 +703,7 @@
 
 	cachefs_cookie_put(cookie);
 
-	_leave("");
+	kleave("");
 } /* end cachefs_relinquish_cookie() */
 
 EXPORT_SYMBOL(cachefs_relinquish_cookie);

Index: aops.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/aops.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- aops.c	4 Jun 2003 14:25:41 -0000	1.32
+++ aops.c	6 Jun 2003 08:33:36 -0000	1.33
@@ -93,6 +93,8 @@
 	return 0;
 }
 
+EXPORT_SYMBOL(cachefs_page_get_private);
+
 /*
  * I/O completion handler for multipage BIOs.
  *