Subject: afs/fs/cachefs rootdir.c,1.18,1.19 recycling.c,1.30,1.31 interface.c,1.16,1.17 index.c,1.29,1.30 cachefs-int.h,1.41,1.42 aops.c,1.45,1.46

From: [email-masked]
Date: Tue, 19 Aug 2003 14:37:10 +0100

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

Modified Files:
	rootdir.c recycling.c interface.c index.c cachefs-int.h aops.c 
Log Message:
made the CacheFS interface functions always present in cachefs.h, even if
CONFIG_CACHEFS is not set

Index: rootdir.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/rootdir.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- rootdir.c	13 Aug 2003 10:05:28 -0000	1.18
+++ rootdir.c	19 Aug 2003 13:37:07 -0000	1.19
@@ -699,7 +699,7 @@
 	trans->jentry->block = __cachefs_get_page_block(ixpage)->bix;
 
 	cachefs_trans_affects_inode(trans, inode);
-	cachefs_trans_affects_page(trans, __cachefs_page_get_private(ixpage),
+	cachefs_trans_affects_page(trans, cachefs_page_grab_private(ixpage),
 				   trans->jentry->entry, sizeof(*xent));
 
 	ret = cachefs_trans_mark(trans);

Index: recycling.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/recycling.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- recycling.c	18 Jul 2003 08:53:54 -0000	1.30
+++ recycling.c	19 Aug 2003 13:37:07 -0000	1.31
@@ -538,7 +538,7 @@
 		cachefs_metadata_postread(iinode);
 
 		cachefs_trans_affects_page(trans,
-					   __cachefs_page_get_private(ixpage),
+					   cachefs_page_grab_private(ixpage),
 					   trans->jentry->entry,
 					   trans->jentry->count);

Index: interface.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/interface.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- interface.c	10 Jul 2003 14:21:24 -0000	1.16
+++ interface.c	19 Aug 2003 13:37:07 -0000	1.17
@@ -58,8 +58,8 @@
 /*
  * register a network filesystem for caching
  */
-int cachefs_register_netfs(struct cachefs_netfs *netfs,
-			   struct cachefs_index_def *primary_idef)
+int __cachefs_register_netfs(struct cachefs_netfs *netfs,
+			     struct cachefs_index_def *primary_idef)
 {
 	struct cachefs_netfs *ptr;
 	int ret;
@@ -111,16 +111,16 @@
 
 	_leave(" = %d", ret);
 	return ret;
-} /* end cachefs_register_netfs() */
+} /* end __cachefs_register_netfs() */
 
-EXPORT_SYMBOL(cachefs_register_netfs);
+EXPORT_SYMBOL(__cachefs_register_netfs);
 
 /*****************************************************************************/
 /*
  * unregister a network filesystem from the cache
  * - all cookies must have been released first
  */
-void cachefs_unregister_netfs(struct cachefs_netfs *netfs)
+void __cachefs_unregister_netfs(struct cachefs_netfs *netfs)
 {
 	_enter("{%s.%u}", netfs->name, netfs->version);
 
@@ -135,9 +135,9 @@
 	printk("CacheFS: netfs '%s' unregistered from caching\n", netfs->name);
 
 	_leave("");
-} /* end cachefs_unregister_netfs() */
+} /* end __cachefs_unregister_netfs() */
 
-EXPORT_SYMBOL(cachefs_unregister_netfs);
+EXPORT_SYMBOL(__cachefs_unregister_netfs);
 
 /*****************************************************************************/
 /*
@@ -450,7 +450,8 @@
  *   filled out)
  * - all parent index objects are instantiated if necessary
  */
-static int cachefs_instantiate_object(struct cachefs_cookie *cookie, struct cachefs_super *super)
+static int cachefs_instantiate_object(struct cachefs_cookie *cookie,
+				      struct cachefs_super *super)
 {
 	struct cachefs_search_result *srch;
 	struct cachefs_cookie *iparent;
@@ -588,10 +589,10 @@
  * - we never let on to the netfs about errors
  *   - we may set a NULL cookie pointer, but that's okay
  */
-void cachefs_acquire_cookie(struct cachefs_cookie *iparent,
-			    struct cachefs_index_def *idef,
-			    void *netfs_data,
-			    struct cachefs_cookie **_cookie)
+void __cachefs_acquire_cookie(struct cachefs_cookie *iparent,
+			      struct cachefs_index_def *idef,
+			      void *netfs_data,
+			      struct cachefs_cookie **_cookie)
 {
 	struct cachefs_cookie *cookie;
 	struct cachefs_super *super;
@@ -727,9 +728,9 @@
 	up_write(&cookie->sem);
 	up_read(&cachefs_addremove_sem);
 	_leave(" [%p]", cookie);
-} /* end cachefs_acquire_cookie() */
+} /* end __cachefs_acquire_cookie() */
 
-EXPORT_SYMBOL(cachefs_acquire_cookie);
+EXPORT_SYMBOL(__cachefs_acquire_cookie);
 
 /*****************************************************************************/
 /*
@@ -738,7 +739,7 @@
  * - all dependents of this cookie must have already been unregistered
  *   (indexes/files/pages)
  */
-void cachefs_relinquish_cookie(struct cachefs_cookie *cookie, int retire)
+void __cachefs_relinquish_cookie(struct cachefs_cookie *cookie, int retire)
 {
 	struct cachefs_inode *inode;
 
@@ -801,9 +802,9 @@
 	cachefs_cookie_put(cookie);
 
 	_leave("");
-} /* end cachefs_relinquish_cookie() */
+} /* end __cachefs_relinquish_cookie() */
 
-EXPORT_SYMBOL(cachefs_relinquish_cookie);
+EXPORT_SYMBOL(__cachefs_relinquish_cookie);
 
 /*****************************************************************************/
 /*
@@ -933,11 +934,11 @@
  *   - the v-journal will be marked to note the block contains invalid data
  *   - -ENODATA will be returned
  */
-int cachefs_read_or_alloc_page(struct cachefs_cookie *cookie,
-			       struct page *page,
-			       cachefs_rw_complete_t end_io_func,
-			       void *end_io_data,
-			       unsigned long gfp)
+int __cachefs_read_or_alloc_page(struct cachefs_cookie *cookie,
+				 struct page *page,
+				 cachefs_rw_complete_t end_io_func,
+				 void *end_io_data,
+				 unsigned long gfp)
 {
 	struct cachefs_io_end *end_io = NULL;
 	struct cachefs_inode *inode;
@@ -1091,9 +1092,9 @@
 		kfree(end_io);
 	_leave(" = %d", ret);
 	return ret;
-} /* end cachefs_read_or_alloc_page() */
+} /* end __cachefs_read_or_alloc_page() */
 
-EXPORT_SYMBOL(cachefs_read_or_alloc_page);
+EXPORT_SYMBOL(__cachefs_read_or_alloc_page);
 
 /*****************************************************************************/
 /*
@@ -1148,11 +1149,11 @@
  *     be erased
  *   - returns 0
  */
-int cachefs_write_page(struct cachefs_cookie *cookie,
-		       struct page *page,
-		       cachefs_rw_complete_t end_io_func,
-		       void *end_io_data,
-		       unsigned long gfp)
+int __cachefs_write_page(struct cachefs_cookie *cookie,
+			 struct page *page,
+			 cachefs_rw_complete_t end_io_func,
+			 void *end_io_data,
+			 unsigned long gfp)
 {
 	struct cachefs_io_end *end_io = NULL;
 	struct cachefs_block *block;
@@ -1241,9 +1242,9 @@
 		kfree(end_io);
 	_leave(" = %d", ret);
 	return ret;
-} /* end cachefs_write_page() */
+} /* end __cachefs_write_page() */
 
-EXPORT_SYMBOL(cachefs_write_page);
+EXPORT_SYMBOL(__cachefs_write_page);
 
 /*****************************************************************************/
 /*
@@ -1251,7 +1252,7 @@
  * - if the block backing the page still has a vjentry then the block will be
  *   recycled
  */
-void cachefs_uncache_page(struct cachefs_cookie *cookie, struct page *page)
+void __cachefs_uncache_page(struct cachefs_cookie *cookie, struct page *page)
 {
 	struct cachefs_block *block, *xblock;
 	struct cachefs_page *pageio;
@@ -1302,6 +1303,6 @@
 
 	_leave("");
 	return;
-} /* end cachefs_uncache_page() */
+} /* end __cachefs_uncache_page() */
 
-EXPORT_SYMBOL(cachefs_uncache_page);
+EXPORT_SYMBOL(__cachefs_uncache_page);

Index: index.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/index.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- index.c	17 Jul 2003 12:02:13 -0000	1.29
+++ index.c	19 Aug 2003 13:37:07 -0000	1.30
@@ -85,7 +85,7 @@
 	trans->jentry->auxblock	= inode->metadata->bix;
 	trans->jentry->auxentry	= inode->metadata_offset;
 
-	cachefs_trans_affects_page(trans, __cachefs_page_get_private(ixpage),
+	cachefs_trans_affects_page(trans, cachefs_page_grab_private(ixpage),
 				   ixoffset, sizeof(*xent));
 	cachefs_trans_affects_inode(trans, inode);
 
@@ -171,7 +171,7 @@
 	trans->jentry->entry	= ixoffset;
 	trans->jentry->count	= rec->iinode->index_esize;
 
-	cachefs_trans_affects_page(trans, __cachefs_page_get_private(ixpage),
+	cachefs_trans_affects_page(trans, cachefs_page_grab_private(ixpage),
 				   ixoffset, sizeof(*xent));
 
 	rec->index->idef->update(rec->target->netfs_data,
@@ -436,7 +436,7 @@
 
 		/* make the extension */
 		ret = cachefs_get_block(&iinode->vfs_inode, page,
-					__cachefs_page_get_private(page), 1);
+					cachefs_page_grab_private(page), 1);
 		if (ret < 0) {
 			iinode->vfs_inode.i_size -= PAGE_SIZE;
 			goto error2;
@@ -578,9 +578,9 @@
 	jindex->next_ino	= inonext;
 	jindex->next_index	= ixnext;
 
-	cachefs_trans_affects_page(trans, __cachefs_page_get_private(ixpage),
+	cachefs_trans_affects_page(trans, cachefs_page_grab_private(ixpage),
 				   offset, index->index_esize);
-	cachefs_trans_affects_page(trans, __cachefs_page_get_private(inopage),
+	cachefs_trans_affects_page(trans, cachefs_page_grab_private(inopage),
 				   ino_offset, super->layout->metadata_size);
 
 	cachefs_trans_affects_inode(trans, index);

Index: cachefs-int.h
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/cachefs-int.h,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- cachefs-int.h	13 Aug 2003 10:05:28 -0000	1.41
+++ cachefs-int.h	19 Aug 2003 13:37:07 -0000	1.42
@@ -579,7 +579,7 @@
 {
 	struct cachefs_super *super = trans->super;
 	cachefs_trans_affects_page(trans,
-				   __cachefs_page_get_private(
+				   cachefs_page_grab_private(
 					   virt_to_page(super->layout)),
 				   0,
 				   super->sb->s_blocksize);

Index: aops.c
===================================================================
RCS file: /home/cvs/afs/fs/cachefs/aops.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- aops.c	13 Aug 2003 10:05:28 -0000	1.45
+++ aops.c	19 Aug 2003 13:37:07 -0000	1.46
@@ -73,8 +73,8 @@
 	.invalidatepage		= cachefs_invalidatepage,
 };
 
-int cachefs_page_get_private(struct page *page, struct cachefs_page **_pageio,
-			     unsigned gfp_flags)
+int __cachefs_page_get_private(struct page *page, struct cachefs_page **_pageio,
+			       unsigned gfp_flags)
 {
 	struct cachefs_page *pageio = (struct cachefs_page *) page->private;
 
@@ -96,7 +96,7 @@
 	return 0;
 }
 
-EXPORT_SYMBOL(cachefs_page_get_private);
+EXPORT_SYMBOL(__cachefs_page_get_private);
 
 /*
  * I/O completion handler for multipage BIOs.
@@ -1046,7 +1046,7 @@
 						 &block, &step->page);
 			if (ret < 0)
 				goto error_block;
-			step->pageio = __cachefs_page_get_private(step->page);
+			step->pageio = cachefs_page_grab_private(step->page);
 		}
 		else {
 			ret = cachefs_block_set2(super, jentry->block,
@@ -1335,7 +1335,7 @@
 	path[pix].offset += inode->metadata_offset;
 
 	down_read(&inode->metadata_sem);
-	path[pix + 1].pageio = __cachefs_page_get_private(inode->metadata_page);
+	path[pix + 1].pageio = cachefs_page_grab_private(inode->metadata_page);
 	up_read(&inode->metadata_sem);
 
 	path[pix + 1].bix = path[pix + 1].pageio->mapped_block->bix;
@@ -1431,7 +1431,7 @@
 		}
 
 		if (!step->pageio)
-			step->pageio = __cachefs_page_get_private(step->page);
+			step->pageio = cachefs_page_grab_private(step->page);
 	}
 
 	/* release the pages used to walk the path */