[Ocfs2-commits] mfasheh commits r1355 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri Aug 13 17:33:19 CDT 2004


Author: mfasheh
Date: 2004-08-13 16:33:18 -0500 (Fri, 13 Aug 2004)
New Revision: 1355

Modified:
   trunk/src/file.c
   trunk/src/file.h
   trunk/src/journal.c
   trunk/src/nm.c
Log:
* commit parts of a patch by Christoph Hellwig <hch at lst.de>:
[PATCH] remove dead code and add missing statics



Modified: trunk/src/file.c
===================================================================
--- trunk/src/file.c	2004-08-13 21:11:35 UTC (rev 1354)
+++ trunk/src/file.c	2004-08-13 21:33:18 UTC (rev 1355)
@@ -59,6 +59,7 @@
 				   struct inode *inode);
 static int ocfs_truncate_file(ocfs_super *osb, __u64 file_size,
 			      struct inode *inode);
+static int ocfs2_zero_extend(struct inode *inode);
 
 static void ocfs_fe_set_attributes(ocfs2_dinode *fe, struct iattr *attr)
 {
@@ -958,7 +959,7 @@
 	return status;
 }  /* ocfs_truncate_file */
 
-int ocfs2_zero_extend(struct inode *inode)
+static int ocfs2_zero_extend(struct inode *inode)
 {
 	struct address_space *mapping = inode->i_mapping;
 	struct page *page;

Modified: trunk/src/file.h
===================================================================
--- trunk/src/file.h	2004-08-13 21:11:35 UTC (rev 1354)
+++ trunk/src/file.h	2004-08-13 21:33:18 UTC (rev 1355)
@@ -41,7 +41,6 @@
 			    struct inode *inode);
 int ocfs_setattr(struct dentry *dentry, struct iattr *attr);
 int ocfs_sync_inode(struct inode *inode);
-int ocfs2_zero_extend(struct inode *inode);
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
 int ocfs_getattr(struct vfsmount *mnt, struct dentry *dentry,

Modified: trunk/src/journal.c
===================================================================
--- trunk/src/journal.c	2004-08-13 21:11:35 UTC (rev 1354)
+++ trunk/src/journal.c	2004-08-13 21:33:18 UTC (rev 1355)
@@ -63,28 +63,10 @@
 static int __ocfs_recovery_thread(void *arg);
 static int ocfs_commit_cache (ocfs_super * osb);
 static int ocfs_wait_on_mount(ocfs_super *osb);
-static int ocfs_journal_flush(ocfs_journal *journal);
 static void ocfs_handle_move_locks(ocfs_journal *journal, 
 				   ocfs_journal_handle *handle);
 static void ocfs_journal_optimize_lock_list(ocfs_journal *journal);
 
-static int ocfs_journal_flush(ocfs_journal *journal) 
-{
-	int retval;
-
-	down_write(&journal->trans_barrier);
-	journal_lock_updates(journal->k_journal);
-
-	retval = journal_flush(journal->k_journal);
-
-	ocfs_inc_trans_id(journal);
-
-	journal_unlock_updates(journal->k_journal);
-	up_write(&journal->trans_barrier);
-
-	return(retval);
-}
-
 static void ocfs_journal_optimize_lock_list(ocfs_journal *journal)
 {
 	ocfs_journal_lock *lock = NULL;
@@ -375,21 +357,9 @@
 	return ret;
 }
 
-static inline int ocfs_journal_flush24(ocfs_journal *journal)
-{
-	int ret;
-
-	lock_kernel();
-	ret = ocfs_journal_flush(journal);
-	unlock_kernel();
-	return ret;
-}
-
 #undef ocfs_commit_cache
-#undef ocfs_journal_flush
 
 #define ocfs_commit_cache  ocfs_commit_cache24
-#define ocfs_journal_flush ocfs_journal_flush24
 
 #undef journal_get_write_access
 #undef journal_get_undo_access

Modified: trunk/src/nm.c
===================================================================
--- trunk/src/nm.c	2004-08-13 21:11:35 UTC (rev 1354)
+++ trunk/src/nm.c	2004-08-13 21:33:18 UTC (rev 1355)
@@ -57,7 +57,7 @@
 #define OCFS_DEBUG_CONTEXT      OCFS_DEBUG_CONTEXT_NM
 
 /* for lack of a better name... protects inode_private->ip_num_extends. */
-spinlock_t oin_num_ext_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t oin_num_ext_lock = SPIN_LOCK_UNLOCKED;
 struct semaphore recovery_list_sem;
 
 static inline int get_process_vote_action(ocfs_super * osb, ocfs_lock_res *lockres, __u32 node_num, __u32 flags, int status, int *master_alive, struct inode *inode);



More information about the Ocfs2-commits mailing list