aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@austin.ibm.com>2005-05-04 16:29:35 -0400
committerDave Kleikamp <shaggy@austin.ibm.com>2005-05-04 16:29:35 -0400
commit1868f4aa5a4a72bbe0b7db6c1d4ee666824c3895 (patch)
treec3bfa2751dcc1d7adf16a6a96e5ad8cab76b6f76
parent6b6bf51081a27e80334e7ebe2993ae1d046a3222 (diff)
JFS: fix sparse warnings by moving extern declarations to headers
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
-rw-r--r--fs/jfs/file.c9
-rw-r--r--fs/jfs/inode.c11
-rw-r--r--fs/jfs/jfs_debug.c10
-rw-r--r--fs/jfs/jfs_debug.h15
-rw-r--r--fs/jfs/jfs_extent.c7
-rw-r--r--fs/jfs/jfs_imap.c6
-rw-r--r--fs/jfs/jfs_inode.c1
-rw-r--r--fs/jfs/jfs_inode.h19
-rw-r--r--fs/jfs/jfs_logmgr.c9
-rw-r--r--fs/jfs/jfs_logmgr.h2
-rw-r--r--fs/jfs/jfs_metapage.c4
-rw-r--r--fs/jfs/jfs_metapage.h6
-rw-r--r--fs/jfs/jfs_superblock.h11
-rw-r--r--fs/jfs/jfs_txnmgr.c40
-rw-r--r--fs/jfs/jfs_txnmgr.h52
-rw-r--r--fs/jfs/namei.c28
-rw-r--r--fs/jfs/super.c37
-rw-r--r--fs/jfs/symlink.c3
18 files changed, 89 insertions, 181 deletions
diff --git a/fs/jfs/file.c b/fs/jfs/file.c
index a87b06fa8ff8..c2c19c9ed9a4 100644
--- a/fs/jfs/file.c
+++ b/fs/jfs/file.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright (c) International Business Machines Corp., 2000-2002 2 * Copyright (C) International Business Machines Corp., 2000-2002
3 * Portions Copyright (c) Christoph Hellwig, 2001-2002 3 * Portions Copyright (C) Christoph Hellwig, 2001-2002
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
@@ -19,16 +19,13 @@
19 19
20#include <linux/fs.h> 20#include <linux/fs.h>
21#include "jfs_incore.h" 21#include "jfs_incore.h"
22#include "jfs_inode.h"
22#include "jfs_dmap.h" 23#include "jfs_dmap.h"
23#include "jfs_txnmgr.h" 24#include "jfs_txnmgr.h"
24#include "jfs_xattr.h" 25#include "jfs_xattr.h"
25#include "jfs_acl.h" 26#include "jfs_acl.h"
26#include "jfs_debug.h" 27#include "jfs_debug.h"
27 28
28
29extern int jfs_commit_inode(struct inode *, int);
30extern void jfs_truncate(struct inode *);
31
32int jfs_fsync(struct file *file, struct dentry *dentry, int datasync) 29int jfs_fsync(struct file *file, struct dentry *dentry, int datasync)
33{ 30{
34 struct inode *inode = dentry->d_inode; 31 struct inode *inode = dentry->d_inode;
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index 24a689179af2..2137138c59b0 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -23,6 +23,7 @@
23#include <linux/pagemap.h> 23#include <linux/pagemap.h>
24#include <linux/quotaops.h> 24#include <linux/quotaops.h>
25#include "jfs_incore.h" 25#include "jfs_incore.h"
26#include "jfs_inode.h"
26#include "jfs_filsys.h" 27#include "jfs_filsys.h"
27#include "jfs_imap.h" 28#include "jfs_imap.h"
28#include "jfs_extent.h" 29#include "jfs_extent.h"
@@ -30,14 +31,6 @@
30#include "jfs_debug.h" 31#include "jfs_debug.h"
31 32
32 33
33extern struct inode_operations jfs_dir_inode_operations;
34extern struct inode_operations jfs_file_inode_operations;
35extern struct inode_operations jfs_symlink_inode_operations;
36extern struct file_operations jfs_dir_operations;
37extern struct file_operations jfs_file_operations;
38struct address_space_operations jfs_aops;
39extern int freeZeroLink(struct inode *);
40
41void jfs_read_inode(struct inode *inode) 34void jfs_read_inode(struct inode *inode)
42{ 35{
43 if (diRead(inode)) { 36 if (diRead(inode)) {
@@ -136,7 +129,7 @@ void jfs_delete_inode(struct inode *inode)
136 jfs_info("In jfs_delete_inode, inode = 0x%p", inode); 129 jfs_info("In jfs_delete_inode, inode = 0x%p", inode);
137 130
138 if (test_cflag(COMMIT_Freewmap, inode)) 131 if (test_cflag(COMMIT_Freewmap, inode))
139 freeZeroLink(inode); 132 jfs_free_zero_link(inode);
140 133
141 diFree(inode); 134 diFree(inode);
142 135
diff --git a/fs/jfs/jfs_debug.c b/fs/jfs/jfs_debug.c
index 91a0a889ebc5..4caea6b43b92 100644
--- a/fs/jfs/jfs_debug.c
+++ b/fs/jfs/jfs_debug.c
@@ -58,8 +58,6 @@ void dump_mem(char *label, void *data, int length)
58 58
59static struct proc_dir_entry *base; 59static struct proc_dir_entry *base;
60#ifdef CONFIG_JFS_DEBUG 60#ifdef CONFIG_JFS_DEBUG
61extern read_proc_t jfs_txanchor_read;
62
63static int loglevel_read(char *page, char **start, off_t off, 61static int loglevel_read(char *page, char **start, off_t off,
64 int count, int *eof, void *data) 62 int count, int *eof, void *data)
65{ 63{
@@ -97,14 +95,6 @@ static int loglevel_write(struct file *file, const char __user *buffer,
97} 95}
98#endif 96#endif
99 97
100
101#ifdef CONFIG_JFS_STATISTICS
102extern read_proc_t jfs_lmstats_read;
103extern read_proc_t jfs_txstats_read;
104extern read_proc_t jfs_xtstat_read;
105extern read_proc_t jfs_mpstat_read;
106#endif
107
108static struct { 98static struct {
109 const char *name; 99 const char *name;
110 read_proc_t *read_fn; 100 read_proc_t *read_fn;
diff --git a/fs/jfs/jfs_debug.h b/fs/jfs/jfs_debug.h
index a38079ae1e00..ddffbbd4d955 100644
--- a/fs/jfs/jfs_debug.h
+++ b/fs/jfs/jfs_debug.h
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright (c) International Business Machines Corp., 2000-2002 2 * Copyright (C) International Business Machines Corp., 2000-2002
3 * Portions Copyright (c) Christoph Hellwig, 2001-2002 3 * Portions Copyright (C) Christoph Hellwig, 2001-2002
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
@@ -31,7 +31,9 @@
31 * CONFIG_JFS_DEBUG or CONFIG_JFS_STATISTICS is defined 31 * CONFIG_JFS_DEBUG or CONFIG_JFS_STATISTICS is defined
32 */ 32 */
33#if defined(CONFIG_PROC_FS) && (defined(CONFIG_JFS_DEBUG) || defined(CONFIG_JFS_STATISTICS)) 33#if defined(CONFIG_PROC_FS) && (defined(CONFIG_JFS_DEBUG) || defined(CONFIG_JFS_STATISTICS))
34 #define PROC_FS_JFS 34#define PROC_FS_JFS
35extern void jfs_proc_init(void);
36extern void jfs_proc_clean(void);
35#endif 37#endif
36 38
37/* 39/*
@@ -65,8 +67,8 @@
65 67
66extern int jfsloglevel; 68extern int jfsloglevel;
67 69
68/* dump memory contents */
69extern void dump_mem(char *label, void *data, int length); 70extern void dump_mem(char *label, void *data, int length);
71extern int jfs_txanchor_read(char *, char **, off_t, int, int *, void *);
70 72
71/* information message: e.g., configuration, major event */ 73/* information message: e.g., configuration, major event */
72#define jfs_info(fmt, arg...) do { \ 74#define jfs_info(fmt, arg...) do { \
@@ -110,6 +112,11 @@ extern void dump_mem(char *label, void *data, int length);
110 * ---------- 112 * ----------
111 */ 113 */
112#ifdef CONFIG_JFS_STATISTICS 114#ifdef CONFIG_JFS_STATISTICS
115extern int jfs_lmstats_read(char *, char **, off_t, int, int *, void *);
116extern int jfs_txstats_read(char *, char **, off_t, int, int *, void *);
117extern int jfs_mpstat_read(char *, char **, off_t, int, int *, void *);
118extern int jfs_xtstat_read(char *, char **, off_t, int, int *, void *);
119
113#define INCREMENT(x) ((x)++) 120#define INCREMENT(x) ((x)++)
114#define DECREMENT(x) ((x)--) 121#define DECREMENT(x) ((x)--)
115#define HIGHWATERMARK(x,y) ((x) = max((x), (y))) 122#define HIGHWATERMARK(x,y) ((x) = max((x), (y)))
diff --git a/fs/jfs/jfs_extent.c b/fs/jfs/jfs_extent.c
index 1953acb79266..4879603daa1c 100644
--- a/fs/jfs/jfs_extent.c
+++ b/fs/jfs/jfs_extent.c
@@ -19,6 +19,7 @@
19#include <linux/fs.h> 19#include <linux/fs.h>
20#include <linux/quotaops.h> 20#include <linux/quotaops.h>
21#include "jfs_incore.h" 21#include "jfs_incore.h"
22#include "jfs_inode.h"
22#include "jfs_superblock.h" 23#include "jfs_superblock.h"
23#include "jfs_dmap.h" 24#include "jfs_dmap.h"
24#include "jfs_extent.h" 25#include "jfs_extent.h"
@@ -33,12 +34,6 @@ static int extBrealloc(struct inode *, s64, s64, s64 *, s64 *);
33#endif 34#endif
34static s64 extRoundDown(s64 nb); 35static s64 extRoundDown(s64 nb);
35 36
36/*
37 * external references
38 */
39extern int jfs_commit_inode(struct inode *, int);
40
41
42#define DPD(a) (printk("(a): %d\n",(a))) 37#define DPD(a) (printk("(a): %d\n",(a)))
43#define DPC(a) (printk("(a): %c\n",(a))) 38#define DPC(a) (printk("(a): %c\n",(a)))
44#define DPL1(a) \ 39#define DPL1(a) \
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
index 7acff2ce3c80..971af2977eff 100644
--- a/fs/jfs/jfs_imap.c
+++ b/fs/jfs/jfs_imap.c
@@ -47,6 +47,7 @@
47#include <linux/quotaops.h> 47#include <linux/quotaops.h>
48 48
49#include "jfs_incore.h" 49#include "jfs_incore.h"
50#include "jfs_inode.h"
50#include "jfs_filsys.h" 51#include "jfs_filsys.h"
51#include "jfs_dinode.h" 52#include "jfs_dinode.h"
52#include "jfs_dmap.h" 53#include "jfs_dmap.h"
@@ -69,11 +70,6 @@
69#define AG_UNLOCK(imap,agno) up(&imap->im_aglock[agno]) 70#define AG_UNLOCK(imap,agno) up(&imap->im_aglock[agno])
70 71
71/* 72/*
72 * external references
73 */
74extern struct address_space_operations jfs_aops;
75
76/*
77 * forward references 73 * forward references
78 */ 74 */
79static int diAllocAG(struct inomap *, int, boolean_t, struct inode *); 75static int diAllocAG(struct inomap *, int, boolean_t, struct inode *);
diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c
index 84f2459b2191..2af5efbfd06f 100644
--- a/fs/jfs/jfs_inode.c
+++ b/fs/jfs/jfs_inode.c
@@ -19,6 +19,7 @@
19#include <linux/fs.h> 19#include <linux/fs.h>
20#include <linux/quotaops.h> 20#include <linux/quotaops.h>
21#include "jfs_incore.h" 21#include "jfs_incore.h"
22#include "jfs_inode.h"
22#include "jfs_filsys.h" 23#include "jfs_filsys.h"
23#include "jfs_imap.h" 24#include "jfs_imap.h"
24#include "jfs_dinode.h" 25#include "jfs_dinode.h"
diff --git a/fs/jfs/jfs_inode.h b/fs/jfs/jfs_inode.h
index 3df91fbfe781..b54bac576cb3 100644
--- a/fs/jfs/jfs_inode.h
+++ b/fs/jfs/jfs_inode.h
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) International Business Machines Corp., 2000-2001 2 * Copyright (C) International Business Machines Corp., 2000-2001
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
@@ -19,5 +19,22 @@
19#define _H_JFS_INODE 19#define _H_JFS_INODE
20 20
21extern struct inode *ialloc(struct inode *, umode_t); 21extern struct inode *ialloc(struct inode *, umode_t);
22extern int jfs_fsync(struct file *, struct dentry *, int);
23extern void jfs_read_inode(struct inode *);
24extern int jfs_commit_inode(struct inode *, int);
25extern int jfs_write_inode(struct inode*, int);
26extern void jfs_delete_inode(struct inode *);
27extern void jfs_dirty_inode(struct inode *);
28extern void jfs_truncate(struct inode *);
29extern void jfs_truncate_nolock(struct inode *, loff_t);
30extern void jfs_free_zero_link(struct inode *);
31extern struct dentry *jfs_get_parent(struct dentry *dentry);
22 32
33extern struct address_space_operations jfs_aops;
34extern struct inode_operations jfs_dir_inode_operations;
35extern struct file_operations jfs_dir_operations;
36extern struct inode_operations jfs_file_inode_operations;
37extern struct file_operations jfs_file_operations;
38extern struct inode_operations jfs_symlink_inode_operations;
39extern struct dentry_operations jfs_ci_dentry_operations;
23#endif /* _H_JFS_INODE */ 40#endif /* _H_JFS_INODE */
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index dfa1200daa61..c5cc03bcae69 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -71,6 +71,7 @@
71#include "jfs_incore.h" 71#include "jfs_incore.h"
72#include "jfs_filsys.h" 72#include "jfs_filsys.h"
73#include "jfs_metapage.h" 73#include "jfs_metapage.h"
74#include "jfs_superblock.h"
74#include "jfs_txnmgr.h" 75#include "jfs_txnmgr.h"
75#include "jfs_debug.h" 76#include "jfs_debug.h"
76 77
@@ -167,14 +168,6 @@ static struct jfs_log *dummy_log = NULL;
167static DECLARE_MUTEX(jfs_log_sem); 168static DECLARE_MUTEX(jfs_log_sem);
168 169
169/* 170/*
170 * external references
171 */
172extern void txLazyUnlock(struct tblock * tblk);
173extern int jfs_stop_threads;
174extern struct completion jfsIOwait;
175extern int jfs_tlocks_low;
176
177/*
178 * forward references 171 * forward references
179 */ 172 */
180static int lmWriteRecord(struct jfs_log * log, struct tblock * tblk, 173static int lmWriteRecord(struct jfs_log * log, struct tblock * tblk,
diff --git a/fs/jfs/jfs_logmgr.h b/fs/jfs/jfs_logmgr.h
index 51291fbc420c..747114cd38b8 100644
--- a/fs/jfs/jfs_logmgr.h
+++ b/fs/jfs/jfs_logmgr.h
@@ -507,6 +507,8 @@ extern int lmLogClose(struct super_block *sb);
507extern int lmLogShutdown(struct jfs_log * log); 507extern int lmLogShutdown(struct jfs_log * log);
508extern int lmLogInit(struct jfs_log * log); 508extern int lmLogInit(struct jfs_log * log);
509extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize); 509extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize);
510extern int lmGroupCommit(struct jfs_log *, struct tblock *);
511extern int jfsIOWait(void *);
510extern void jfs_flush_journal(struct jfs_log * log, int wait); 512extern void jfs_flush_journal(struct jfs_log * log, int wait);
511extern void jfs_syncpt(struct jfs_log *log); 513extern void jfs_syncpt(struct jfs_log *log);
512 514
diff --git a/fs/jfs/jfs_metapage.c b/fs/jfs/jfs_metapage.c
index 41bf078dce05..aa1cc7be3a56 100644
--- a/fs/jfs/jfs_metapage.c
+++ b/fs/jfs/jfs_metapage.c
@@ -726,12 +726,12 @@ void force_metapage(struct metapage *mp)
726 page_cache_release(page); 726 page_cache_release(page);
727} 727}
728 728
729extern void hold_metapage(struct metapage *mp) 729void hold_metapage(struct metapage *mp)
730{ 730{
731 lock_page(mp->page); 731 lock_page(mp->page);
732} 732}
733 733
734extern void put_metapage(struct metapage *mp) 734void put_metapage(struct metapage *mp)
735{ 735{
736 if (mp->count || mp->nohomeok) { 736 if (mp->count || mp->nohomeok) {
737 /* Someone else will release this */ 737 /* Someone else will release this */
diff --git a/fs/jfs/jfs_metapage.h b/fs/jfs/jfs_metapage.h
index 991e9fb84c75..f0b7d3282b07 100644
--- a/fs/jfs/jfs_metapage.h
+++ b/fs/jfs/jfs_metapage.h
@@ -1,6 +1,6 @@
1/* 1/*
2 * Copyright (c) International Business Machines Corp., 2000-2002 2 * Copyright (C) International Business Machines Corp., 2000-2002
3 * Portions Copyright (c) Christoph Hellwig, 2001-2002 3 * Portions Copyright (C) Christoph Hellwig, 2001-2002
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
@@ -58,6 +58,8 @@ struct metapage {
58#define mark_metapage_dirty(mp) set_bit(META_dirty, &(mp)->flag) 58#define mark_metapage_dirty(mp) set_bit(META_dirty, &(mp)->flag)
59 59
60/* function prototypes */ 60/* function prototypes */
61extern int metapage_init(void);
62extern void metapage_exit(void);
61extern struct metapage *__get_metapage(struct inode *inode, 63extern struct metapage *__get_metapage(struct inode *inode,
62 unsigned long lblock, unsigned int size, 64 unsigned long lblock, unsigned int size,
63 int absolute, unsigned long new); 65 int absolute, unsigned long new);
diff --git a/fs/jfs/jfs_superblock.h b/fs/jfs/jfs_superblock.h
index ab0566f70cfa..fcf781bf31cb 100644
--- a/fs/jfs/jfs_superblock.h
+++ b/fs/jfs/jfs_superblock.h
@@ -109,5 +109,16 @@ struct jfs_superblock {
109extern int readSuper(struct super_block *, struct buffer_head **); 109extern int readSuper(struct super_block *, struct buffer_head **);
110extern int updateSuper(struct super_block *, uint); 110extern int updateSuper(struct super_block *, uint);
111extern void jfs_error(struct super_block *, const char *, ...); 111extern void jfs_error(struct super_block *, const char *, ...);
112extern int jfs_mount(struct super_block *);
113extern int jfs_mount_rw(struct super_block *, int);
114extern int jfs_umount(struct super_block *);
115extern int jfs_umount_rw(struct super_block *);
116
117extern int jfs_stop_threads;
118extern struct completion jfsIOwait;
119extern wait_queue_head_t jfs_IO_thread_wait;
120extern wait_queue_head_t jfs_commit_thread_wait;
121extern wait_queue_head_t jfs_sync_thread_wait;
122extern int jfs_extendfs(struct super_block *, s64, int);
112 123
113#endif /*_H_JFS_SUPERBLOCK */ 124#endif /*_H_JFS_SUPERBLOCK */
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
index e93d01aa12c4..8cbaaff1d5fa 100644
--- a/fs/jfs/jfs_txnmgr.c
+++ b/fs/jfs/jfs_txnmgr.c
@@ -42,7 +42,6 @@
42 * hold on to mp+lock thru update of maps 42 * hold on to mp+lock thru update of maps
43 */ 43 */
44 44
45
46#include <linux/fs.h> 45#include <linux/fs.h>
47#include <linux/vmalloc.h> 46#include <linux/vmalloc.h>
48#include <linux/smp_lock.h> 47#include <linux/smp_lock.h>
@@ -51,6 +50,7 @@
51#include <linux/module.h> 50#include <linux/module.h>
52#include <linux/moduleparam.h> 51#include <linux/moduleparam.h>
53#include "jfs_incore.h" 52#include "jfs_incore.h"
53#include "jfs_inode.h"
54#include "jfs_filsys.h" 54#include "jfs_filsys.h"
55#include "jfs_metapage.h" 55#include "jfs_metapage.h"
56#include "jfs_dinode.h" 56#include "jfs_dinode.h"
@@ -109,7 +109,6 @@ static int TxLockHWM; /* High water mark for number of txLocks used */
109static int TxLockVHWM; /* Very High water mark */ 109static int TxLockVHWM; /* Very High water mark */
110struct tlock *TxLock; /* transaction lock table */ 110struct tlock *TxLock; /* transaction lock table */
111 111
112
113/* 112/*
114 * transaction management lock 113 * transaction management lock
115 */ 114 */
@@ -149,7 +148,6 @@ static inline void TXN_SLEEP_DROP_LOCK(wait_queue_head_t * event)
149 148
150#define TXN_WAKEUP(event) wake_up_all(event) 149#define TXN_WAKEUP(event) wake_up_all(event)
151 150
152
153/* 151/*
154 * statistics 152 * statistics
155 */ 153 */
@@ -161,16 +159,6 @@ static struct {
161 int waitlock; /* 4: # of tlock wait */ 159 int waitlock; /* 4: # of tlock wait */
162} stattx; 160} stattx;
163 161
164
165/*
166 * external references
167 */
168extern int lmGroupCommit(struct jfs_log *, struct tblock *);
169extern int jfs_commit_inode(struct inode *, int);
170extern int jfs_stop_threads;
171
172extern struct completion jfsIOwait;
173
174/* 162/*
175 * forward references 163 * forward references
176 */ 164 */
@@ -358,7 +346,6 @@ void txExit(void)
358 TxBlock = NULL; 346 TxBlock = NULL;
359} 347}
360 348
361
362/* 349/*
363 * NAME: txBegin() 350 * NAME: txBegin()
364 * 351 *
@@ -460,7 +447,6 @@ tid_t txBegin(struct super_block *sb, int flag)
460 return t; 447 return t;
461} 448}
462 449
463
464/* 450/*
465 * NAME: txBeginAnon() 451 * NAME: txBeginAnon()
466 * 452 *
@@ -503,7 +489,6 @@ void txBeginAnon(struct super_block *sb)
503 TXN_UNLOCK(); 489 TXN_UNLOCK();
504} 490}
505 491
506
507/* 492/*
508 * txEnd() 493 * txEnd()
509 * 494 *
@@ -592,7 +577,6 @@ wakeup:
592 TXN_WAKEUP(&TxAnchor.freewait); 577 TXN_WAKEUP(&TxAnchor.freewait);
593} 578}
594 579
595
596/* 580/*
597 * txLock() 581 * txLock()
598 * 582 *
@@ -868,7 +852,6 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp,
868 return NULL; 852 return NULL;
869} 853}
870 854
871
872/* 855/*
873 * NAME: txRelease() 856 * NAME: txRelease()
874 * 857 *
@@ -908,7 +891,6 @@ static void txRelease(struct tblock * tblk)
908 TXN_UNLOCK(); 891 TXN_UNLOCK();
909} 892}
910 893
911
912/* 894/*
913 * NAME: txUnlock() 895 * NAME: txUnlock()
914 * 896 *
@@ -996,7 +978,6 @@ static void txUnlock(struct tblock * tblk)
996 } 978 }
997} 979}
998 980
999
1000/* 981/*
1001 * txMaplock() 982 * txMaplock()
1002 * 983 *
@@ -1069,7 +1050,6 @@ struct tlock *txMaplock(tid_t tid, struct inode *ip, int type)
1069 return tlck; 1050 return tlck;
1070} 1051}
1071 1052
1072
1073/* 1053/*
1074 * txLinelock() 1054 * txLinelock()
1075 * 1055 *
@@ -1103,8 +1083,6 @@ struct linelock *txLinelock(struct linelock * tlock)
1103 return linelock; 1083 return linelock;
1104} 1084}
1105 1085
1106
1107
1108/* 1086/*
1109 * transaction commit management 1087 * transaction commit management
1110 * ----------------------------- 1088 * -----------------------------
@@ -1373,7 +1351,6 @@ int txCommit(tid_t tid, /* transaction identifier */
1373 return rc; 1351 return rc;
1374} 1352}
1375 1353
1376
1377/* 1354/*
1378 * NAME: txLog() 1355 * NAME: txLog()
1379 * 1356 *
@@ -1437,7 +1414,6 @@ static int txLog(struct jfs_log * log, struct tblock * tblk, struct commit * cd)
1437 return rc; 1414 return rc;
1438} 1415}
1439 1416
1440
1441/* 1417/*
1442 * diLog() 1418 * diLog()
1443 * 1419 *
@@ -1465,7 +1441,6 @@ static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
1465 if (tlck->type & tlckENTRY) { 1441 if (tlck->type & tlckENTRY) {
1466 /* log after-image for logredo(): */ 1442 /* log after-image for logredo(): */
1467 lrd->type = cpu_to_le16(LOG_REDOPAGE); 1443 lrd->type = cpu_to_le16(LOG_REDOPAGE);
1468// *pxd = mp->cm_pxd;
1469 PXDaddress(pxd, mp->index); 1444 PXDaddress(pxd, mp->index);
1470 PXDlength(pxd, 1445 PXDlength(pxd,
1471 mp->logical_size >> tblk->sb->s_blocksize_bits); 1446 mp->logical_size >> tblk->sb->s_blocksize_bits);
@@ -1552,7 +1527,6 @@ static int diLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
1552 return rc; 1527 return rc;
1553} 1528}
1554 1529
1555
1556/* 1530/*
1557 * dataLog() 1531 * dataLog()
1558 * 1532 *
@@ -1599,7 +1573,6 @@ static int dataLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
1599 return 0; 1573 return 0;
1600} 1574}
1601 1575
1602
1603/* 1576/*
1604 * dtLog() 1577 * dtLog()
1605 * 1578 *
@@ -1639,7 +1612,6 @@ static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
1639 lrd->log.redopage.type |= cpu_to_le16(LOG_EXTEND); 1612 lrd->log.redopage.type |= cpu_to_le16(LOG_EXTEND);
1640 else 1613 else
1641 lrd->log.redopage.type |= cpu_to_le16(LOG_NEW); 1614 lrd->log.redopage.type |= cpu_to_le16(LOG_NEW);
1642// *pxd = mp->cm_pxd;
1643 PXDaddress(pxd, mp->index); 1615 PXDaddress(pxd, mp->index);
1644 PXDlength(pxd, 1616 PXDlength(pxd,
1645 mp->logical_size >> tblk->sb->s_blocksize_bits); 1617 mp->logical_size >> tblk->sb->s_blocksize_bits);
@@ -1704,7 +1676,6 @@ static void dtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
1704 return; 1676 return;
1705} 1677}
1706 1678
1707
1708/* 1679/*
1709 * xtLog() 1680 * xtLog()
1710 * 1681 *
@@ -1760,7 +1731,6 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
1760 * applying the after-image to the meta-data page. 1731 * applying the after-image to the meta-data page.
1761 */ 1732 */
1762 lrd->type = cpu_to_le16(LOG_REDOPAGE); 1733 lrd->type = cpu_to_le16(LOG_REDOPAGE);
1763// *page_pxd = mp->cm_pxd;
1764 PXDaddress(page_pxd, mp->index); 1734 PXDaddress(page_pxd, mp->index);
1765 PXDlength(page_pxd, 1735 PXDlength(page_pxd,
1766 mp->logical_size >> tblk->sb->s_blocksize_bits); 1736 mp->logical_size >> tblk->sb->s_blocksize_bits);
@@ -2093,7 +2063,6 @@ static void xtLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
2093 return; 2063 return;
2094} 2064}
2095 2065
2096
2097/* 2066/*
2098 * mapLog() 2067 * mapLog()
2099 * 2068 *
@@ -2180,7 +2149,6 @@ void mapLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
2180 } 2149 }
2181} 2150}
2182 2151
2183
2184/* 2152/*
2185 * txEA() 2153 * txEA()
2186 * 2154 *
@@ -2233,7 +2201,6 @@ void txEA(tid_t tid, struct inode *ip, dxd_t * oldea, dxd_t * newea)
2233 } 2201 }
2234} 2202}
2235 2203
2236
2237/* 2204/*
2238 * txForce() 2205 * txForce()
2239 * 2206 *
@@ -2300,7 +2267,6 @@ void txForce(struct tblock * tblk)
2300 } 2267 }
2301} 2268}
2302 2269
2303
2304/* 2270/*
2305 * txUpdateMap() 2271 * txUpdateMap()
2306 * 2272 *
@@ -2437,7 +2403,6 @@ static void txUpdateMap(struct tblock * tblk)
2437 } 2403 }
2438} 2404}
2439 2405
2440
2441/* 2406/*
2442 * txAllocPMap() 2407 * txAllocPMap()
2443 * 2408 *
@@ -2509,7 +2474,6 @@ static void txAllocPMap(struct inode *ip, struct maplock * maplock,
2509 } 2474 }
2510} 2475}
2511 2476
2512
2513/* 2477/*
2514 * txFreeMap() 2478 * txFreeMap()
2515 * 2479 *
@@ -2611,7 +2575,6 @@ void txFreeMap(struct inode *ip,
2611 } 2575 }
2612} 2576}
2613 2577
2614
2615/* 2578/*
2616 * txFreelock() 2579 * txFreelock()
2617 * 2580 *
@@ -2652,7 +2615,6 @@ void txFreelock(struct inode *ip)
2652 TXN_UNLOCK(); 2615 TXN_UNLOCK();
2653} 2616}
2654 2617
2655
2656/* 2618/*
2657 * txAbort() 2619 * txAbort()
2658 * 2620 *
diff --git a/fs/jfs/jfs_txnmgr.h b/fs/jfs/jfs_txnmgr.h
index b71b82c2df04..59ad0f6b7231 100644
--- a/fs/jfs/jfs_txnmgr.h
+++ b/fs/jfs/jfs_txnmgr.h
@@ -285,34 +285,26 @@ struct commit {
285/* 285/*
286 * external declarations 286 * external declarations
287 */ 287 */
288extern struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage *mp, 288extern int jfs_tlocks_low;
289 int flag); 289
290 290extern int txInit(void);
291extern struct tlock *txMaplock(tid_t tid, struct inode *ip, int flag); 291extern void txExit(void);
292 292extern struct tlock *txLock(tid_t, struct inode *, struct metapage *, int);
293extern int txCommit(tid_t tid, int nip, struct inode **iplist, int flag); 293extern struct tlock *txMaplock(tid_t, struct inode *, int);
294 294extern int txCommit(tid_t, int, struct inode **, int);
295extern tid_t txBegin(struct super_block *sb, int flag); 295extern tid_t txBegin(struct super_block *, int);
296 296extern void txBeginAnon(struct super_block *);
297extern void txBeginAnon(struct super_block *sb); 297extern void txEnd(tid_t);
298 298extern void txAbort(tid_t, int);
299extern void txEnd(tid_t tid); 299extern struct linelock *txLinelock(struct linelock *);
300 300extern void txFreeMap(struct inode *, struct maplock *, struct tblock *, int);
301extern void txAbort(tid_t tid, int dirty); 301extern void txEA(tid_t, struct inode *, dxd_t *, dxd_t *);
302 302extern void txFreelock(struct inode *);
303extern struct linelock *txLinelock(struct linelock * tlock); 303extern int lmLog(struct jfs_log *, struct tblock *, struct lrd *,
304 304 struct tlock *);
305extern void txFreeMap(struct inode *ip, struct maplock * maplock, 305extern void txQuiesce(struct super_block *);
306 struct tblock * tblk, int maptype); 306extern void txResume(struct super_block *);
307 307extern void txLazyUnlock(struct tblock *);
308extern void txEA(tid_t tid, struct inode *ip, dxd_t * oldea, dxd_t * newea); 308extern int jfs_lazycommit(void *);
309 309extern int jfs_sync(void *);
310extern void txFreelock(struct inode *ip);
311
312extern int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd,
313 struct tlock * tlck);
314
315extern void txQuiesce(struct super_block *sb);
316
317extern void txResume(struct super_block *sb);
318#endif /* _H_JFS_TXNMGR */ 310#endif /* _H_JFS_TXNMGR */
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c
index 8413a368f449..1cae14e741eb 100644
--- a/fs/jfs/namei.c
+++ b/fs/jfs/namei.c
@@ -31,20 +31,9 @@
31#include "jfs_acl.h" 31#include "jfs_acl.h"
32#include "jfs_debug.h" 32#include "jfs_debug.h"
33 33
34extern struct inode_operations jfs_file_inode_operations;
35extern struct inode_operations jfs_symlink_inode_operations;
36extern struct file_operations jfs_file_operations;
37extern struct address_space_operations jfs_aops;
38
39extern int jfs_fsync(struct file *, struct dentry *, int);
40extern void jfs_truncate_nolock(struct inode *, loff_t);
41extern int jfs_init_acl(struct inode *, struct inode *);
42
43/* 34/*
44 * forward references 35 * forward references
45 */ 36 */
46struct inode_operations jfs_dir_inode_operations;
47struct file_operations jfs_dir_operations;
48struct dentry_operations jfs_ci_dentry_operations; 37struct dentry_operations jfs_ci_dentry_operations;
49 38
50static s64 commitZeroLink(tid_t, struct inode *); 39static s64 commitZeroLink(tid_t, struct inode *);
@@ -655,7 +644,7 @@ static s64 commitZeroLink(tid_t tid, struct inode *ip)
655 644
656 645
657/* 646/*
658 * NAME: freeZeroLink() 647 * NAME: jfs_free_zero_link()
659 * 648 *
660 * FUNCTION: for non-directory, called by iClose(), 649 * FUNCTION: for non-directory, called by iClose(),
661 * free resources of a file from cache and WORKING map 650 * free resources of a file from cache and WORKING map
@@ -663,15 +652,12 @@ static s64 commitZeroLink(tid_t tid, struct inode *ip)
663 * while associated with a pager object, 652 * while associated with a pager object,
664 * 653 *
665 * PARAMETER: ip - pointer to inode of file. 654 * PARAMETER: ip - pointer to inode of file.
666 *
667 * RETURN: 0 -ok
668 */ 655 */
669int freeZeroLink(struct inode *ip) 656void jfs_free_zero_link(struct inode *ip)
670{ 657{
671 int rc = 0;
672 int type; 658 int type;
673 659
674 jfs_info("freeZeroLink: ip = 0x%p", ip); 660 jfs_info("jfs_free_zero_link: ip = 0x%p", ip);
675 661
676 /* return if not reg or symbolic link or if size is 662 /* return if not reg or symbolic link or if size is
677 * already ok. 663 * already ok.
@@ -684,10 +670,10 @@ int freeZeroLink(struct inode *ip)
684 case S_IFLNK: 670 case S_IFLNK:
685 /* if its contained in inode nothing to do */ 671 /* if its contained in inode nothing to do */
686 if (ip->i_size < IDATASIZE) 672 if (ip->i_size < IDATASIZE)
687 return 0; 673 return;
688 break; 674 break;
689 default: 675 default:
690 return 0; 676 return;
691 } 677 }
692 678
693 /* 679 /*
@@ -737,9 +723,7 @@ int freeZeroLink(struct inode *ip)
737 * free xtree/data blocks from working block map; 723 * free xtree/data blocks from working block map;
738 */ 724 */
739 if (ip->i_size) 725 if (ip->i_size)
740 rc = xtTruncate(0, ip, 0, COMMIT_WMAP); 726 xtTruncate(0, ip, 0, COMMIT_WMAP);
741
742 return rc;
743} 727}
744 728
745/* 729/*
diff --git a/fs/jfs/super.c b/fs/jfs/super.c
index 5e774ed7fb64..810a3653d8b3 100644
--- a/fs/jfs/super.c
+++ b/fs/jfs/super.c
@@ -28,6 +28,7 @@
28 28
29#include "jfs_incore.h" 29#include "jfs_incore.h"
30#include "jfs_filsys.h" 30#include "jfs_filsys.h"
31#include "jfs_inode.h"
31#include "jfs_metapage.h" 32#include "jfs_metapage.h"
32#include "jfs_superblock.h" 33#include "jfs_superblock.h"
33#include "jfs_dmap.h" 34#include "jfs_dmap.h"
@@ -62,37 +63,6 @@ module_param(jfsloglevel, int, 0644);
62MODULE_PARM_DESC(jfsloglevel, "Specify JFS loglevel (0, 1 or 2)"); 63MODULE_PARM_DESC(jfsloglevel, "Specify JFS loglevel (0, 1 or 2)");
63#endif 64#endif
64 65
65/*
66 * External declarations
67 */
68extern int jfs_mount(struct super_block *);
69extern int jfs_mount_rw(struct super_block *, int);
70extern int jfs_umount(struct super_block *);
71extern int jfs_umount_rw(struct super_block *);
72
73extern int jfsIOWait(void *);
74extern int jfs_lazycommit(void *);
75extern int jfs_sync(void *);
76
77extern void jfs_read_inode(struct inode *inode);
78extern void jfs_dirty_inode(struct inode *inode);
79extern void jfs_delete_inode(struct inode *inode);
80extern int jfs_write_inode(struct inode *inode, int wait);
81
82extern struct dentry *jfs_get_parent(struct dentry *dentry);
83extern int jfs_extendfs(struct super_block *, s64, int);
84
85extern struct dentry_operations jfs_ci_dentry_operations;
86
87#ifdef PROC_FS_JFS /* see jfs_debug.h */
88extern void jfs_proc_init(void);
89extern void jfs_proc_clean(void);
90#endif
91
92extern wait_queue_head_t jfs_IO_thread_wait;
93extern wait_queue_head_t jfs_commit_thread_wait;
94extern wait_queue_head_t jfs_sync_thread_wait;
95
96static void jfs_handle_error(struct super_block *sb) 66static void jfs_handle_error(struct super_block *sb)
97{ 67{
98 struct jfs_sb_info *sbi = JFS_SBI(sb); 68 struct jfs_sb_info *sbi = JFS_SBI(sb);
@@ -593,11 +563,6 @@ static struct file_system_type jfs_fs_type = {
593 .fs_flags = FS_REQUIRES_DEV, 563 .fs_flags = FS_REQUIRES_DEV,
594}; 564};
595 565
596extern int metapage_init(void);
597extern int txInit(void);
598extern void txExit(void);
599extern void metapage_exit(void);
600
601static void init_once(void *foo, kmem_cache_t * cachep, unsigned long flags) 566static void init_once(void *foo, kmem_cache_t * cachep, unsigned long flags)
602{ 567{
603 struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo; 568 struct jfs_inode_info *jfs_ip = (struct jfs_inode_info *) foo;
diff --git a/fs/jfs/symlink.c b/fs/jfs/symlink.c
index ef4c07ee92b2..287d8d6c3cfd 100644
--- a/fs/jfs/symlink.c
+++ b/fs/jfs/symlink.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) Christoph Hellwig, 2001-2002 2 * Copyright (C) Christoph Hellwig, 2001-2002
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify 4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by 5 * it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
19#include <linux/fs.h> 19#include <linux/fs.h>
20#include <linux/namei.h> 20#include <linux/namei.h>
21#include "jfs_incore.h" 21#include "jfs_incore.h"
22#include "jfs_inode.h"
22#include "jfs_xattr.h" 23#include "jfs_xattr.h"
23 24
24static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd) 25static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd)