diff options
-rw-r--r-- | fs/jfs/acl.c | 6 | ||||
-rw-r--r-- | fs/jfs/file.c | 9 | ||||
-rw-r--r-- | fs/jfs/inode.c | 11 | ||||
-rw-r--r-- | fs/jfs/jfs_debug.c | 10 | ||||
-rw-r--r-- | fs/jfs/jfs_debug.h | 15 | ||||
-rw-r--r-- | fs/jfs/jfs_dmap.c | 9 | ||||
-rw-r--r-- | fs/jfs/jfs_dtree.c | 3 | ||||
-rw-r--r-- | fs/jfs/jfs_extent.c | 7 | ||||
-rw-r--r-- | fs/jfs/jfs_imap.c | 6 | ||||
-rw-r--r-- | fs/jfs/jfs_inode.c | 1 | ||||
-rw-r--r-- | fs/jfs/jfs_inode.h | 19 | ||||
-rw-r--r-- | fs/jfs/jfs_logmgr.c | 14 | ||||
-rw-r--r-- | fs/jfs/jfs_logmgr.h | 2 | ||||
-rw-r--r-- | fs/jfs/jfs_metapage.c | 6 | ||||
-rw-r--r-- | fs/jfs/jfs_metapage.h | 6 | ||||
-rw-r--r-- | fs/jfs/jfs_superblock.h | 11 | ||||
-rw-r--r-- | fs/jfs/jfs_txnmgr.c | 40 | ||||
-rw-r--r-- | fs/jfs/jfs_txnmgr.h | 52 | ||||
-rw-r--r-- | fs/jfs/namei.c | 28 | ||||
-rw-r--r-- | fs/jfs/super.c | 37 | ||||
-rw-r--r-- | fs/jfs/symlink.c | 3 | ||||
-rw-r--r-- | fs/jfs/xattr.c | 6 |
22 files changed, 100 insertions, 201 deletions
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index 8d2a9ab981d4..30a2bf9eeda5 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c | |||
@@ -70,8 +70,7 @@ static struct posix_acl *jfs_get_acl(struct inode *inode, int type) | |||
70 | if (!IS_ERR(acl)) | 70 | if (!IS_ERR(acl)) |
71 | *p_acl = posix_acl_dup(acl); | 71 | *p_acl = posix_acl_dup(acl); |
72 | } | 72 | } |
73 | if (value) | 73 | kfree(value); |
74 | kfree(value); | ||
75 | return acl; | 74 | return acl; |
76 | } | 75 | } |
77 | 76 | ||
@@ -112,8 +111,7 @@ static int jfs_set_acl(struct inode *inode, int type, struct posix_acl *acl) | |||
112 | } | 111 | } |
113 | rc = __jfs_setxattr(inode, ea_name, value, size, 0); | 112 | rc = __jfs_setxattr(inode, ea_name, value, size, 0); |
114 | out: | 113 | out: |
115 | if (value) | 114 | kfree(value); |
116 | kfree(value); | ||
117 | 115 | ||
118 | if (!rc) { | 116 | if (!rc) { |
119 | if (*p_acl && (*p_acl != JFS_ACL_NOT_CACHED)) | 117 | if (*p_acl && (*p_acl != JFS_ACL_NOT_CACHED)) |
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 | |||
29 | extern int jfs_commit_inode(struct inode *, int); | ||
30 | extern void jfs_truncate(struct inode *); | ||
31 | |||
32 | int jfs_fsync(struct file *file, struct dentry *dentry, int datasync) | 29 | int 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 | ||
33 | extern struct inode_operations jfs_dir_inode_operations; | ||
34 | extern struct inode_operations jfs_file_inode_operations; | ||
35 | extern struct inode_operations jfs_symlink_inode_operations; | ||
36 | extern struct file_operations jfs_dir_operations; | ||
37 | extern struct file_operations jfs_file_operations; | ||
38 | struct address_space_operations jfs_aops; | ||
39 | extern int freeZeroLink(struct inode *); | ||
40 | |||
41 | void jfs_read_inode(struct inode *inode) | 34 | void 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 | ||
59 | static struct proc_dir_entry *base; | 59 | static struct proc_dir_entry *base; |
60 | #ifdef CONFIG_JFS_DEBUG | 60 | #ifdef CONFIG_JFS_DEBUG |
61 | extern read_proc_t jfs_txanchor_read; | ||
62 | |||
63 | static int loglevel_read(char *page, char **start, off_t off, | 61 | static 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 | ||
102 | extern read_proc_t jfs_lmstats_read; | ||
103 | extern read_proc_t jfs_txstats_read; | ||
104 | extern read_proc_t jfs_xtstat_read; | ||
105 | extern read_proc_t jfs_mpstat_read; | ||
106 | #endif | ||
107 | |||
108 | static struct { | 98 | static 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 |
35 | extern void jfs_proc_init(void); | ||
36 | extern void jfs_proc_clean(void); | ||
35 | #endif | 37 | #endif |
36 | 38 | ||
37 | /* | 39 | /* |
@@ -65,8 +67,8 @@ | |||
65 | 67 | ||
66 | extern int jfsloglevel; | 68 | extern int jfsloglevel; |
67 | 69 | ||
68 | /* dump memory contents */ | ||
69 | extern void dump_mem(char *label, void *data, int length); | 70 | extern void dump_mem(char *label, void *data, int length); |
71 | extern 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 |
115 | extern int jfs_lmstats_read(char *, char **, off_t, int, int *, void *); | ||
116 | extern int jfs_txstats_read(char *, char **, off_t, int, int *, void *); | ||
117 | extern int jfs_mpstat_read(char *, char **, off_t, int, int *, void *); | ||
118 | extern 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_dmap.c b/fs/jfs/jfs_dmap.c index 69007fd546ef..cced2fed9d0f 100644 --- a/fs/jfs/jfs_dmap.c +++ b/fs/jfs/jfs_dmap.c | |||
@@ -272,7 +272,6 @@ int dbMount(struct inode *ipbmap) | |||
272 | int dbUnmount(struct inode *ipbmap, int mounterror) | 272 | int dbUnmount(struct inode *ipbmap, int mounterror) |
273 | { | 273 | { |
274 | struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; | 274 | struct bmap *bmp = JFS_SBI(ipbmap->i_sb)->bmap; |
275 | int i; | ||
276 | 275 | ||
277 | if (!(mounterror || isReadOnly(ipbmap))) | 276 | if (!(mounterror || isReadOnly(ipbmap))) |
278 | dbSync(ipbmap); | 277 | dbSync(ipbmap); |
@@ -282,14 +281,6 @@ int dbUnmount(struct inode *ipbmap, int mounterror) | |||
282 | */ | 281 | */ |
283 | truncate_inode_pages(ipbmap->i_mapping, 0); | 282 | truncate_inode_pages(ipbmap->i_mapping, 0); |
284 | 283 | ||
285 | /* | ||
286 | * Sanity Check | ||
287 | */ | ||
288 | for (i = 0; i < bmp->db_numag; i++) | ||
289 | if (atomic_read(&bmp->db_active[i])) | ||
290 | printk(KERN_ERR "dbUnmount: db_active[%d] = %d\n", | ||
291 | i, atomic_read(&bmp->db_active[i])); | ||
292 | |||
293 | /* free the memory for the in-memory bmap. */ | 284 | /* free the memory for the in-memory bmap. */ |
294 | kfree(bmp); | 285 | kfree(bmp); |
295 | 286 | ||
diff --git a/fs/jfs/jfs_dtree.c b/fs/jfs/jfs_dtree.c index ac41f72d6d50..8676aee3ae48 100644 --- a/fs/jfs/jfs_dtree.c +++ b/fs/jfs/jfs_dtree.c | |||
@@ -2931,6 +2931,9 @@ static void add_missing_indices(struct inode *inode, s64 bn) | |||
2931 | ASSERT(p->header.flag & BT_LEAF); | 2931 | ASSERT(p->header.flag & BT_LEAF); |
2932 | 2932 | ||
2933 | tlck = txLock(tid, inode, mp, tlckDTREE | tlckENTRY); | 2933 | tlck = txLock(tid, inode, mp, tlckDTREE | tlckENTRY); |
2934 | if (BT_IS_ROOT(mp)) | ||
2935 | tlck->type |= tlckBTROOT; | ||
2936 | |||
2934 | dtlck = (struct dt_lock *) &tlck->lock; | 2937 | dtlck = (struct dt_lock *) &tlck->lock; |
2935 | 2938 | ||
2936 | stbl = DT_GETSTBL(p); | 2939 | stbl = DT_GETSTBL(p); |
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 |
34 | static s64 extRoundDown(s64 nb); | 35 | static s64 extRoundDown(s64 nb); |
35 | 36 | ||
36 | /* | ||
37 | * external references | ||
38 | */ | ||
39 | extern 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 | */ | ||
74 | extern struct address_space_operations jfs_aops; | ||
75 | |||
76 | /* | ||
77 | * forward references | 73 | * forward references |
78 | */ | 74 | */ |
79 | static int diAllocAG(struct inomap *, int, boolean_t, struct inode *); | 75 | static 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 | ||
21 | extern struct inode *ialloc(struct inode *, umode_t); | 21 | extern struct inode *ialloc(struct inode *, umode_t); |
22 | extern int jfs_fsync(struct file *, struct dentry *, int); | ||
23 | extern void jfs_read_inode(struct inode *); | ||
24 | extern int jfs_commit_inode(struct inode *, int); | ||
25 | extern int jfs_write_inode(struct inode*, int); | ||
26 | extern void jfs_delete_inode(struct inode *); | ||
27 | extern void jfs_dirty_inode(struct inode *); | ||
28 | extern void jfs_truncate(struct inode *); | ||
29 | extern void jfs_truncate_nolock(struct inode *, loff_t); | ||
30 | extern void jfs_free_zero_link(struct inode *); | ||
31 | extern struct dentry *jfs_get_parent(struct dentry *dentry); | ||
22 | 32 | ||
33 | extern struct address_space_operations jfs_aops; | ||
34 | extern struct inode_operations jfs_dir_inode_operations; | ||
35 | extern struct file_operations jfs_dir_operations; | ||
36 | extern struct inode_operations jfs_file_inode_operations; | ||
37 | extern struct file_operations jfs_file_operations; | ||
38 | extern struct inode_operations jfs_symlink_inode_operations; | ||
39 | extern 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..7c8387ed4192 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; | |||
167 | static DECLARE_MUTEX(jfs_log_sem); | 168 | static DECLARE_MUTEX(jfs_log_sem); |
168 | 169 | ||
169 | /* | 170 | /* |
170 | * external references | ||
171 | */ | ||
172 | extern void txLazyUnlock(struct tblock * tblk); | ||
173 | extern int jfs_stop_threads; | ||
174 | extern struct completion jfsIOwait; | ||
175 | extern int jfs_tlocks_low; | ||
176 | |||
177 | /* | ||
178 | * forward references | 171 | * forward references |
179 | */ | 172 | */ |
180 | static int lmWriteRecord(struct jfs_log * log, struct tblock * tblk, | 173 | static int lmWriteRecord(struct jfs_log * log, struct tblock * tblk, |
@@ -1624,6 +1617,8 @@ void jfs_flush_journal(struct jfs_log *log, int wait) | |||
1624 | } | 1617 | } |
1625 | } | 1618 | } |
1626 | assert(list_empty(&log->cqueue)); | 1619 | assert(list_empty(&log->cqueue)); |
1620 | |||
1621 | #ifdef CONFIG_JFS_DEBUG | ||
1627 | if (!list_empty(&log->synclist)) { | 1622 | if (!list_empty(&log->synclist)) { |
1628 | struct logsyncblk *lp; | 1623 | struct logsyncblk *lp; |
1629 | 1624 | ||
@@ -1638,9 +1633,8 @@ void jfs_flush_journal(struct jfs_log *log, int wait) | |||
1638 | dump_mem("orphan tblock", lp, | 1633 | dump_mem("orphan tblock", lp, |
1639 | sizeof(struct tblock)); | 1634 | sizeof(struct tblock)); |
1640 | } | 1635 | } |
1641 | // current->state = TASK_INTERRUPTIBLE; | ||
1642 | // schedule(); | ||
1643 | } | 1636 | } |
1637 | #endif | ||
1644 | //assert(list_empty(&log->synclist)); | 1638 | //assert(list_empty(&log->synclist)); |
1645 | clear_bit(log_FLUSH, &log->flag); | 1639 | clear_bit(log_FLUSH, &log->flag); |
1646 | } | 1640 | } |
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); | |||
507 | extern int lmLogShutdown(struct jfs_log * log); | 507 | extern int lmLogShutdown(struct jfs_log * log); |
508 | extern int lmLogInit(struct jfs_log * log); | 508 | extern int lmLogInit(struct jfs_log * log); |
509 | extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize); | 509 | extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize); |
510 | extern int lmGroupCommit(struct jfs_log *, struct tblock *); | ||
511 | extern int jfsIOWait(void *); | ||
510 | extern void jfs_flush_journal(struct jfs_log * log, int wait); | 512 | extern void jfs_flush_journal(struct jfs_log * log, int wait); |
511 | extern void jfs_syncpt(struct jfs_log *log); | 513 | extern 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..6c5485d16c39 100644 --- a/fs/jfs/jfs_metapage.c +++ b/fs/jfs/jfs_metapage.c | |||
@@ -198,7 +198,7 @@ static void init_once(void *foo, kmem_cache_t *cachep, unsigned long flags) | |||
198 | } | 198 | } |
199 | } | 199 | } |
200 | 200 | ||
201 | static inline struct metapage *alloc_metapage(int gfp_mask) | 201 | static inline struct metapage *alloc_metapage(unsigned int gfp_mask) |
202 | { | 202 | { |
203 | return mempool_alloc(metapage_mempool, gfp_mask); | 203 | return mempool_alloc(metapage_mempool, gfp_mask); |
204 | } | 204 | } |
@@ -726,12 +726,12 @@ void force_metapage(struct metapage *mp) | |||
726 | page_cache_release(page); | 726 | page_cache_release(page); |
727 | } | 727 | } |
728 | 728 | ||
729 | extern void hold_metapage(struct metapage *mp) | 729 | void hold_metapage(struct metapage *mp) |
730 | { | 730 | { |
731 | lock_page(mp->page); | 731 | lock_page(mp->page); |
732 | } | 732 | } |
733 | 733 | ||
734 | extern void put_metapage(struct metapage *mp) | 734 | void 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 */ |
61 | extern int metapage_init(void); | ||
62 | extern void metapage_exit(void); | ||
61 | extern struct metapage *__get_metapage(struct inode *inode, | 63 | extern 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 { | |||
109 | extern int readSuper(struct super_block *, struct buffer_head **); | 109 | extern int readSuper(struct super_block *, struct buffer_head **); |
110 | extern int updateSuper(struct super_block *, uint); | 110 | extern int updateSuper(struct super_block *, uint); |
111 | extern void jfs_error(struct super_block *, const char *, ...); | 111 | extern void jfs_error(struct super_block *, const char *, ...); |
112 | extern int jfs_mount(struct super_block *); | ||
113 | extern int jfs_mount_rw(struct super_block *, int); | ||
114 | extern int jfs_umount(struct super_block *); | ||
115 | extern int jfs_umount_rw(struct super_block *); | ||
116 | |||
117 | extern int jfs_stop_threads; | ||
118 | extern struct completion jfsIOwait; | ||
119 | extern wait_queue_head_t jfs_IO_thread_wait; | ||
120 | extern wait_queue_head_t jfs_commit_thread_wait; | ||
121 | extern wait_queue_head_t jfs_sync_thread_wait; | ||
122 | extern 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 */ | |||
109 | static int TxLockVHWM; /* Very High water mark */ | 109 | static int TxLockVHWM; /* Very High water mark */ |
110 | struct tlock *TxLock; /* transaction lock table */ | 110 | struct 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 | */ | ||
168 | extern int lmGroupCommit(struct jfs_log *, struct tblock *); | ||
169 | extern int jfs_commit_inode(struct inode *, int); | ||
170 | extern int jfs_stop_threads; | ||
171 | |||
172 | extern 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 | */ |
288 | extern struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage *mp, | 288 | extern int jfs_tlocks_low; |
289 | int flag); | 289 | |
290 | 290 | extern int txInit(void); | |
291 | extern struct tlock *txMaplock(tid_t tid, struct inode *ip, int flag); | 291 | extern void txExit(void); |
292 | 292 | extern struct tlock *txLock(tid_t, struct inode *, struct metapage *, int); | |
293 | extern int txCommit(tid_t tid, int nip, struct inode **iplist, int flag); | 293 | extern struct tlock *txMaplock(tid_t, struct inode *, int); |
294 | 294 | extern int txCommit(tid_t, int, struct inode **, int); | |
295 | extern tid_t txBegin(struct super_block *sb, int flag); | 295 | extern tid_t txBegin(struct super_block *, int); |
296 | 296 | extern void txBeginAnon(struct super_block *); | |
297 | extern void txBeginAnon(struct super_block *sb); | 297 | extern void txEnd(tid_t); |
298 | 298 | extern void txAbort(tid_t, int); | |
299 | extern void txEnd(tid_t tid); | 299 | extern struct linelock *txLinelock(struct linelock *); |
300 | 300 | extern void txFreeMap(struct inode *, struct maplock *, struct tblock *, int); | |
301 | extern void txAbort(tid_t tid, int dirty); | 301 | extern void txEA(tid_t, struct inode *, dxd_t *, dxd_t *); |
302 | 302 | extern void txFreelock(struct inode *); | |
303 | extern struct linelock *txLinelock(struct linelock * tlock); | 303 | extern int lmLog(struct jfs_log *, struct tblock *, struct lrd *, |
304 | 304 | struct tlock *); | |
305 | extern void txFreeMap(struct inode *ip, struct maplock * maplock, | 305 | extern void txQuiesce(struct super_block *); |
306 | struct tblock * tblk, int maptype); | 306 | extern void txResume(struct super_block *); |
307 | 307 | extern void txLazyUnlock(struct tblock *); | |
308 | extern void txEA(tid_t tid, struct inode *ip, dxd_t * oldea, dxd_t * newea); | 308 | extern int jfs_lazycommit(void *); |
309 | 309 | extern int jfs_sync(void *); | |
310 | extern void txFreelock(struct inode *ip); | ||
311 | |||
312 | extern int lmLog(struct jfs_log * log, struct tblock * tblk, struct lrd * lrd, | ||
313 | struct tlock * tlck); | ||
314 | |||
315 | extern void txQuiesce(struct super_block *sb); | ||
316 | |||
317 | extern 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 | ||
34 | extern struct inode_operations jfs_file_inode_operations; | ||
35 | extern struct inode_operations jfs_symlink_inode_operations; | ||
36 | extern struct file_operations jfs_file_operations; | ||
37 | extern struct address_space_operations jfs_aops; | ||
38 | |||
39 | extern int jfs_fsync(struct file *, struct dentry *, int); | ||
40 | extern void jfs_truncate_nolock(struct inode *, loff_t); | ||
41 | extern int jfs_init_acl(struct inode *, struct inode *); | ||
42 | |||
43 | /* | 34 | /* |
44 | * forward references | 35 | * forward references |
45 | */ | 36 | */ |
46 | struct inode_operations jfs_dir_inode_operations; | ||
47 | struct file_operations jfs_dir_operations; | ||
48 | struct dentry_operations jfs_ci_dentry_operations; | 37 | struct dentry_operations jfs_ci_dentry_operations; |
49 | 38 | ||
50 | static s64 commitZeroLink(tid_t, struct inode *); | 39 | static 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 | */ |
669 | int freeZeroLink(struct inode *ip) | 656 | void 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); | |||
62 | MODULE_PARM_DESC(jfsloglevel, "Specify JFS loglevel (0, 1 or 2)"); | 63 | MODULE_PARM_DESC(jfsloglevel, "Specify JFS loglevel (0, 1 or 2)"); |
63 | #endif | 64 | #endif |
64 | 65 | ||
65 | /* | ||
66 | * External declarations | ||
67 | */ | ||
68 | extern int jfs_mount(struct super_block *); | ||
69 | extern int jfs_mount_rw(struct super_block *, int); | ||
70 | extern int jfs_umount(struct super_block *); | ||
71 | extern int jfs_umount_rw(struct super_block *); | ||
72 | |||
73 | extern int jfsIOWait(void *); | ||
74 | extern int jfs_lazycommit(void *); | ||
75 | extern int jfs_sync(void *); | ||
76 | |||
77 | extern void jfs_read_inode(struct inode *inode); | ||
78 | extern void jfs_dirty_inode(struct inode *inode); | ||
79 | extern void jfs_delete_inode(struct inode *inode); | ||
80 | extern int jfs_write_inode(struct inode *inode, int wait); | ||
81 | |||
82 | extern struct dentry *jfs_get_parent(struct dentry *dentry); | ||
83 | extern int jfs_extendfs(struct super_block *, s64, int); | ||
84 | |||
85 | extern struct dentry_operations jfs_ci_dentry_operations; | ||
86 | |||
87 | #ifdef PROC_FS_JFS /* see jfs_debug.h */ | ||
88 | extern void jfs_proc_init(void); | ||
89 | extern void jfs_proc_clean(void); | ||
90 | #endif | ||
91 | |||
92 | extern wait_queue_head_t jfs_IO_thread_wait; | ||
93 | extern wait_queue_head_t jfs_commit_thread_wait; | ||
94 | extern wait_queue_head_t jfs_sync_thread_wait; | ||
95 | |||
96 | static void jfs_handle_error(struct super_block *sb) | 66 | static 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 | ||
596 | extern int metapage_init(void); | ||
597 | extern int txInit(void); | ||
598 | extern void txExit(void); | ||
599 | extern void metapage_exit(void); | ||
600 | |||
601 | static void init_once(void *foo, kmem_cache_t * cachep, unsigned long flags) | 566 | static 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 | ||
24 | static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd) | 25 | static int jfs_follow_link(struct dentry *dentry, struct nameidata *nd) |
diff --git a/fs/jfs/xattr.c b/fs/jfs/xattr.c index 7a9ffd5d03dc..6016373701a3 100644 --- a/fs/jfs/xattr.c +++ b/fs/jfs/xattr.c | |||
@@ -946,8 +946,7 @@ int __jfs_setxattr(struct inode *inode, const char *name, const void *value, | |||
946 | out: | 946 | out: |
947 | up_write(&JFS_IP(inode)->xattr_sem); | 947 | up_write(&JFS_IP(inode)->xattr_sem); |
948 | 948 | ||
949 | if (os2name) | 949 | kfree(os2name); |
950 | kfree(os2name); | ||
951 | 950 | ||
952 | return rc; | 951 | return rc; |
953 | } | 952 | } |
@@ -1042,8 +1041,7 @@ ssize_t __jfs_getxattr(struct inode *inode, const char *name, void *data, | |||
1042 | out: | 1041 | out: |
1043 | up_read(&JFS_IP(inode)->xattr_sem); | 1042 | up_read(&JFS_IP(inode)->xattr_sem); |
1044 | 1043 | ||
1045 | if (os2name) | 1044 | kfree(os2name); |
1046 | kfree(os2name); | ||
1047 | 1045 | ||
1048 | return size; | 1046 | return size; |
1049 | } | 1047 | } |