aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2005-09-06 18:16:41 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 19:57:19 -0400
commit022a4a7bbdefdedc2706a13c81c832d8c3173c6d (patch)
treee7bf4f08f02c35b39769a5c2aeeea020c055de99 /fs
parent202e5979af4d91c7ca05892641131dee22653259 (diff)
[PATCH] fs/jbd/: cleanups
This patch contains the following cleanups: - make needlessly global functions static - journal.c: remove the unused global function __journal_internal_check and move the check to journal_init - remove the following write-only global variable: - journal.c: current_journal - remove the following unneeded EXPORT_SYMBOL: - journal.c: journal_recover Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: Andreas Dilger <adilger@clusterfs.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/jbd/journal.c34
-rw-r--r--fs/jbd/revoke.c3
2 files changed, 16 insertions, 21 deletions
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c
index 5e7b43949517..71cfe25d716e 100644
--- a/fs/jbd/journal.c
+++ b/fs/jbd/journal.c
@@ -65,7 +65,6 @@ EXPORT_SYMBOL(journal_set_features);
65EXPORT_SYMBOL(journal_create); 65EXPORT_SYMBOL(journal_create);
66EXPORT_SYMBOL(journal_load); 66EXPORT_SYMBOL(journal_load);
67EXPORT_SYMBOL(journal_destroy); 67EXPORT_SYMBOL(journal_destroy);
68EXPORT_SYMBOL(journal_recover);
69EXPORT_SYMBOL(journal_update_superblock); 68EXPORT_SYMBOL(journal_update_superblock);
70EXPORT_SYMBOL(journal_abort); 69EXPORT_SYMBOL(journal_abort);
71EXPORT_SYMBOL(journal_errno); 70EXPORT_SYMBOL(journal_errno);
@@ -81,6 +80,7 @@ EXPORT_SYMBOL(journal_try_to_free_buffers);
81EXPORT_SYMBOL(journal_force_commit); 80EXPORT_SYMBOL(journal_force_commit);
82 81
83static int journal_convert_superblock_v1(journal_t *, journal_superblock_t *); 82static int journal_convert_superblock_v1(journal_t *, journal_superblock_t *);
83static void __journal_abort_soft (journal_t *journal, int errno);
84 84
85/* 85/*
86 * Helper function used to manage commit timeouts 86 * Helper function used to manage commit timeouts
@@ -93,16 +93,6 @@ static void commit_timeout(unsigned long __data)
93 wake_up_process(p); 93 wake_up_process(p);
94} 94}
95 95
96/* Static check for data structure consistency. There's no code
97 * invoked --- we'll just get a linker failure if things aren't right.
98 */
99void __journal_internal_check(void)
100{
101 extern void journal_bad_superblock_size(void);
102 if (sizeof(struct journal_superblock_s) != 1024)
103 journal_bad_superblock_size();
104}
105
106/* 96/*
107 * kjournald: The main thread function used to manage a logging device 97 * kjournald: The main thread function used to manage a logging device
108 * journal. 98 * journal.
@@ -119,16 +109,12 @@ void __journal_internal_check(void)
119 * known as checkpointing, and this thread is responsible for that job. 109 * known as checkpointing, and this thread is responsible for that job.
120 */ 110 */
121 111
122journal_t *current_journal; // AKPM: debug 112static int kjournald(void *arg)
123
124int kjournald(void *arg)
125{ 113{
126 journal_t *journal = (journal_t *) arg; 114 journal_t *journal = (journal_t *) arg;
127 transaction_t *transaction; 115 transaction_t *transaction;
128 struct timer_list timer; 116 struct timer_list timer;
129 117
130 current_journal = journal;
131
132 daemonize("kjournald"); 118 daemonize("kjournald");
133 119
134 /* Set up an interval timer which can be used to trigger a 120 /* Set up an interval timer which can be used to trigger a
@@ -1439,7 +1425,7 @@ int journal_wipe(journal_t *journal, int write)
1439 * device this journal is present. 1425 * device this journal is present.
1440 */ 1426 */
1441 1427
1442const char *journal_dev_name(journal_t *journal, char *buffer) 1428static const char *journal_dev_name(journal_t *journal, char *buffer)
1443{ 1429{
1444 struct block_device *bdev; 1430 struct block_device *bdev;
1445 1431
@@ -1485,7 +1471,7 @@ void __journal_abort_hard(journal_t *journal)
1485 1471
1486/* Soft abort: record the abort error status in the journal superblock, 1472/* Soft abort: record the abort error status in the journal superblock,
1487 * but don't do any other IO. */ 1473 * but don't do any other IO. */
1488void __journal_abort_soft (journal_t *journal, int errno) 1474static void __journal_abort_soft (journal_t *journal, int errno)
1489{ 1475{
1490 if (journal->j_flags & JFS_ABORT) 1476 if (journal->j_flags & JFS_ABORT)
1491 return; 1477 return;
@@ -1880,7 +1866,7 @@ EXPORT_SYMBOL(journal_enable_debug);
1880 1866
1881static struct proc_dir_entry *proc_jbd_debug; 1867static struct proc_dir_entry *proc_jbd_debug;
1882 1868
1883int read_jbd_debug(char *page, char **start, off_t off, 1869static int read_jbd_debug(char *page, char **start, off_t off,
1884 int count, int *eof, void *data) 1870 int count, int *eof, void *data)
1885{ 1871{
1886 int ret; 1872 int ret;
@@ -1890,7 +1876,7 @@ int read_jbd_debug(char *page, char **start, off_t off,
1890 return ret; 1876 return ret;
1891} 1877}
1892 1878
1893int write_jbd_debug(struct file *file, const char __user *buffer, 1879static int write_jbd_debug(struct file *file, const char __user *buffer,
1894 unsigned long count, void *data) 1880 unsigned long count, void *data)
1895{ 1881{
1896 char buf[32]; 1882 char buf[32];
@@ -1979,6 +1965,14 @@ static int __init journal_init(void)
1979{ 1965{
1980 int ret; 1966 int ret;
1981 1967
1968/* Static check for data structure consistency. There's no code
1969 * invoked --- we'll just get a linker failure if things aren't right.
1970 */
1971 extern void journal_bad_superblock_size(void);
1972 if (sizeof(struct journal_superblock_s) != 1024)
1973 journal_bad_superblock_size();
1974
1975
1982 ret = journal_init_caches(); 1976 ret = journal_init_caches();
1983 if (ret != 0) 1977 if (ret != 0)
1984 journal_destroy_caches(); 1978 journal_destroy_caches();
diff --git a/fs/jbd/revoke.c b/fs/jbd/revoke.c
index d327a598f861..93b9f45eebda 100644
--- a/fs/jbd/revoke.c
+++ b/fs/jbd/revoke.c
@@ -116,7 +116,8 @@ static inline int hash(journal_t *journal, unsigned long block)
116 (block << (hash_shift - 12))) & (table->hash_size - 1); 116 (block << (hash_shift - 12))) & (table->hash_size - 1);
117} 117}
118 118
119int insert_revoke_hash(journal_t *journal, unsigned long blocknr, tid_t seq) 119static int insert_revoke_hash(journal_t *journal, unsigned long blocknr,
120 tid_t seq)
120{ 121{
121 struct list_head *hash_list; 122 struct list_head *hash_list;
122 struct jbd_revoke_record_s *record; 123 struct jbd_revoke_record_s *record;