diff options
author | Adrian Bunk <bunk@stusta.de> | 2005-09-06 18:16:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-07 19:57:19 -0400 |
commit | 022a4a7bbdefdedc2706a13c81c832d8c3173c6d (patch) | |
tree | e7bf4f08f02c35b39769a5c2aeeea020c055de99 /fs/jbd | |
parent | 202e5979af4d91c7ca05892641131dee22653259 (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/jbd')
-rw-r--r-- | fs/jbd/journal.c | 34 | ||||
-rw-r--r-- | fs/jbd/revoke.c | 3 |
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); | |||
65 | EXPORT_SYMBOL(journal_create); | 65 | EXPORT_SYMBOL(journal_create); |
66 | EXPORT_SYMBOL(journal_load); | 66 | EXPORT_SYMBOL(journal_load); |
67 | EXPORT_SYMBOL(journal_destroy); | 67 | EXPORT_SYMBOL(journal_destroy); |
68 | EXPORT_SYMBOL(journal_recover); | ||
69 | EXPORT_SYMBOL(journal_update_superblock); | 68 | EXPORT_SYMBOL(journal_update_superblock); |
70 | EXPORT_SYMBOL(journal_abort); | 69 | EXPORT_SYMBOL(journal_abort); |
71 | EXPORT_SYMBOL(journal_errno); | 70 | EXPORT_SYMBOL(journal_errno); |
@@ -81,6 +80,7 @@ EXPORT_SYMBOL(journal_try_to_free_buffers); | |||
81 | EXPORT_SYMBOL(journal_force_commit); | 80 | EXPORT_SYMBOL(journal_force_commit); |
82 | 81 | ||
83 | static int journal_convert_superblock_v1(journal_t *, journal_superblock_t *); | 82 | static int journal_convert_superblock_v1(journal_t *, journal_superblock_t *); |
83 | static 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 | */ | ||
99 | void __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 | ||
122 | journal_t *current_journal; // AKPM: debug | 112 | static int kjournald(void *arg) |
123 | |||
124 | int 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 | ||
1442 | const char *journal_dev_name(journal_t *journal, char *buffer) | 1428 | static 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. */ |
1488 | void __journal_abort_soft (journal_t *journal, int errno) | 1474 | static 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 | ||
1881 | static struct proc_dir_entry *proc_jbd_debug; | 1867 | static struct proc_dir_entry *proc_jbd_debug; |
1882 | 1868 | ||
1883 | int read_jbd_debug(char *page, char **start, off_t off, | 1869 | static 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 | ||
1893 | int write_jbd_debug(struct file *file, const char __user *buffer, | 1879 | static 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 | ||
119 | int insert_revoke_hash(journal_t *journal, unsigned long blocknr, tid_t seq) | 119 | static 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; |