diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-07 09:47:13 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-11 21:36:12 -0400 |
commit | 964f5369667b342994fe3f384e9ba41d404ee796 (patch) | |
tree | ad8a5f942af0696d69fb58abf05773c19d05e58b | |
parent | 79d25767583e4e086f8309bfd1f502660a64fe7f (diff) |
fs/qnx4: sanitize includes
fs-internal parts of qnx4_fs.h taken to fs/qnx4/qnx4.h, includes adjusted,
qnx4_fs.h doesn't need unifdef anymore.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/qnx4/bitmap.c | 7 | ||||
-rw-r--r-- | fs/qnx4/dir.c | 7 | ||||
-rw-r--r-- | fs/qnx4/file.c | 3 | ||||
-rw-r--r-- | fs/qnx4/inode.c | 11 | ||||
-rw-r--r-- | fs/qnx4/namei.c | 9 | ||||
-rw-r--r-- | fs/qnx4/qnx4.h | 57 | ||||
-rw-r--r-- | fs/qnx4/truncate.c | 6 | ||||
-rw-r--r-- | include/linux/Kbuild | 2 | ||||
-rw-r--r-- | include/linux/qnx4_fs.h | 59 |
9 files changed, 66 insertions, 95 deletions
diff --git a/fs/qnx4/bitmap.c b/fs/qnx4/bitmap.c index 8425cf6e9624..e1cd061a25f7 100644 --- a/fs/qnx4/bitmap.c +++ b/fs/qnx4/bitmap.c | |||
@@ -13,14 +13,9 @@ | |||
13 | * 28-06-1998 by Frank Denis : qnx4_free_inode (to be fixed) . | 13 | * 28-06-1998 by Frank Denis : qnx4_free_inode (to be fixed) . |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include <linux/time.h> | ||
17 | #include <linux/fs.h> | ||
18 | #include <linux/qnx4_fs.h> | ||
19 | #include <linux/stat.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/string.h> | ||
22 | #include <linux/buffer_head.h> | 16 | #include <linux/buffer_head.h> |
23 | #include <linux/bitops.h> | 17 | #include <linux/bitops.h> |
18 | #include "qnx4.h" | ||
24 | 19 | ||
25 | #if 0 | 20 | #if 0 |
26 | int qnx4_new_block(struct super_block *sb) | 21 | int qnx4_new_block(struct super_block *sb) |
diff --git a/fs/qnx4/dir.c b/fs/qnx4/dir.c index ff6c1ba6c4e0..003c68f3238b 100644 --- a/fs/qnx4/dir.c +++ b/fs/qnx4/dir.c | |||
@@ -11,14 +11,9 @@ | |||
11 | * 20-06-1998 by Frank Denis : Linux 2.1.99+ & dcache support. | 11 | * 20-06-1998 by Frank Denis : Linux 2.1.99+ & dcache support. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/string.h> | ||
15 | #include <linux/errno.h> | ||
16 | #include <linux/fs.h> | ||
17 | #include <linux/qnx4_fs.h> | ||
18 | #include <linux/stat.h> | ||
19 | #include <linux/smp_lock.h> | 14 | #include <linux/smp_lock.h> |
20 | #include <linux/buffer_head.h> | 15 | #include <linux/buffer_head.h> |
21 | 16 | #include "qnx4.h" | |
22 | 17 | ||
23 | static int qnx4_readdir(struct file *filp, void *dirent, filldir_t filldir) | 18 | static int qnx4_readdir(struct file *filp, void *dirent, filldir_t filldir) |
24 | { | 19 | { |
diff --git a/fs/qnx4/file.c b/fs/qnx4/file.c index e7033ea10e2f..09b170ac936c 100644 --- a/fs/qnx4/file.c +++ b/fs/qnx4/file.c | |||
@@ -12,8 +12,7 @@ | |||
12 | * 27-06-1998 by Frank Denis : file overwriting. | 12 | * 27-06-1998 by Frank Denis : file overwriting. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/fs.h> | 15 | #include "qnx4.h" |
16 | #include <linux/qnx4_fs.h> | ||
17 | 16 | ||
18 | /* | 17 | /* |
19 | * We have mostly NULL's here: the current defaults are ok for | 18 | * We have mostly NULL's here: the current defaults are ok for |
diff --git a/fs/qnx4/inode.c b/fs/qnx4/inode.c index 40712867b8a8..681df5fcd161 100644 --- a/fs/qnx4/inode.c +++ b/fs/qnx4/inode.c | |||
@@ -13,20 +13,15 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/types.h> | ||
17 | #include <linux/string.h> | ||
18 | #include <linux/errno.h> | ||
19 | #include <linux/slab.h> | ||
20 | #include <linux/fs.h> | ||
21 | #include <linux/qnx4_fs.h> | ||
22 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/slab.h> | ||
23 | #include <linux/highuid.h> | 18 | #include <linux/highuid.h> |
24 | #include <linux/smp_lock.h> | 19 | #include <linux/smp_lock.h> |
25 | #include <linux/pagemap.h> | 20 | #include <linux/pagemap.h> |
26 | #include <linux/buffer_head.h> | 21 | #include <linux/buffer_head.h> |
27 | #include <linux/writeback.h> | 22 | #include <linux/writeback.h> |
28 | #include <linux/vfs.h> | 23 | #include <linux/statfs.h> |
29 | #include <asm/uaccess.h> | 24 | #include "qnx4.h" |
30 | 25 | ||
31 | #define QNX4_VERSION 4 | 26 | #define QNX4_VERSION 4 |
32 | #define QNX4_BMNAME ".bitmap" | 27 | #define QNX4_BMNAME ".bitmap" |
diff --git a/fs/qnx4/namei.c b/fs/qnx4/namei.c index 123270c53760..5972ed214937 100644 --- a/fs/qnx4/namei.c +++ b/fs/qnx4/namei.c | |||
@@ -12,16 +12,9 @@ | |||
12 | * 04-07-1998 by Frank Denis : first step for rmdir/unlink. | 12 | * 04-07-1998 by Frank Denis : first step for rmdir/unlink. |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/time.h> | ||
16 | #include <linux/fs.h> | ||
17 | #include <linux/qnx4_fs.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/string.h> | ||
20 | #include <linux/stat.h> | ||
21 | #include <linux/fcntl.h> | ||
22 | #include <linux/errno.h> | ||
23 | #include <linux/smp_lock.h> | 15 | #include <linux/smp_lock.h> |
24 | #include <linux/buffer_head.h> | 16 | #include <linux/buffer_head.h> |
17 | #include "qnx4.h" | ||
25 | 18 | ||
26 | 19 | ||
27 | /* | 20 | /* |
diff --git a/fs/qnx4/qnx4.h b/fs/qnx4/qnx4.h new file mode 100644 index 000000000000..9efc089454f6 --- /dev/null +++ b/fs/qnx4/qnx4.h | |||
@@ -0,0 +1,57 @@ | |||
1 | #include <linux/fs.h> | ||
2 | #include <linux/qnx4_fs.h> | ||
3 | |||
4 | #define QNX4_DEBUG 0 | ||
5 | |||
6 | #if QNX4_DEBUG | ||
7 | #define QNX4DEBUG(X) printk X | ||
8 | #else | ||
9 | #define QNX4DEBUG(X) (void) 0 | ||
10 | #endif | ||
11 | |||
12 | struct qnx4_sb_info { | ||
13 | struct buffer_head *sb_buf; /* superblock buffer */ | ||
14 | struct qnx4_super_block *sb; /* our superblock */ | ||
15 | unsigned int Version; /* may be useful */ | ||
16 | struct qnx4_inode_entry *BitMap; /* useful */ | ||
17 | }; | ||
18 | |||
19 | struct qnx4_inode_info { | ||
20 | struct qnx4_inode_entry raw; | ||
21 | loff_t mmu_private; | ||
22 | struct inode vfs_inode; | ||
23 | }; | ||
24 | |||
25 | extern struct inode *qnx4_iget(struct super_block *, unsigned long); | ||
26 | extern struct dentry *qnx4_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd); | ||
27 | extern unsigned long qnx4_count_free_blocks(struct super_block *sb); | ||
28 | extern unsigned long qnx4_block_map(struct inode *inode, long iblock); | ||
29 | |||
30 | extern struct buffer_head *qnx4_bread(struct inode *, int, int); | ||
31 | |||
32 | extern const struct inode_operations qnx4_file_inode_operations; | ||
33 | extern const struct inode_operations qnx4_dir_inode_operations; | ||
34 | extern const struct file_operations qnx4_file_operations; | ||
35 | extern const struct file_operations qnx4_dir_operations; | ||
36 | extern int qnx4_is_free(struct super_block *sb, long block); | ||
37 | extern int qnx4_set_bitmap(struct super_block *sb, long block, int busy); | ||
38 | extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode, struct nameidata *nd); | ||
39 | extern void qnx4_truncate(struct inode *inode); | ||
40 | extern void qnx4_free_inode(struct inode *inode); | ||
41 | extern int qnx4_unlink(struct inode *dir, struct dentry *dentry); | ||
42 | extern int qnx4_rmdir(struct inode *dir, struct dentry *dentry); | ||
43 | |||
44 | static inline struct qnx4_sb_info *qnx4_sb(struct super_block *sb) | ||
45 | { | ||
46 | return sb->s_fs_info; | ||
47 | } | ||
48 | |||
49 | static inline struct qnx4_inode_info *qnx4_i(struct inode *inode) | ||
50 | { | ||
51 | return container_of(inode, struct qnx4_inode_info, vfs_inode); | ||
52 | } | ||
53 | |||
54 | static inline struct qnx4_inode_entry *qnx4_raw_inode(struct inode *inode) | ||
55 | { | ||
56 | return &qnx4_i(inode)->raw; | ||
57 | } | ||
diff --git a/fs/qnx4/truncate.c b/fs/qnx4/truncate.c index 6437c1c3d1dd..d94d9ee241fe 100644 --- a/fs/qnx4/truncate.c +++ b/fs/qnx4/truncate.c | |||
@@ -10,12 +10,8 @@ | |||
10 | * 30-06-1998 by Frank DENIS : ugly filler. | 10 | * 30-06-1998 by Frank DENIS : ugly filler. |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/types.h> | ||
14 | #include <linux/errno.h> | ||
15 | #include <linux/fs.h> | ||
16 | #include <linux/qnx4_fs.h> | ||
17 | #include <linux/smp_lock.h> | 13 | #include <linux/smp_lock.h> |
18 | #include <asm/uaccess.h> | 14 | #include "qnx4.h" |
19 | 15 | ||
20 | #ifdef CONFIG_QNX4FS_RW | 16 | #ifdef CONFIG_QNX4FS_RW |
21 | 17 | ||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 3f0eaa397ef5..b3afd2219ad2 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -135,6 +135,7 @@ header-y += posix_types.h | |||
135 | header-y += ppdev.h | 135 | header-y += ppdev.h |
136 | header-y += prctl.h | 136 | header-y += prctl.h |
137 | header-y += qnxtypes.h | 137 | header-y += qnxtypes.h |
138 | header-y += qnx4_fs.h | ||
138 | header-y += radeonfb.h | 139 | header-y += radeonfb.h |
139 | header-y += raw.h | 140 | header-y += raw.h |
140 | header-y += resource.h | 141 | header-y += resource.h |
@@ -308,7 +309,6 @@ unifdef-y += poll.h | |||
308 | unifdef-y += ppp_defs.h | 309 | unifdef-y += ppp_defs.h |
309 | unifdef-y += ppp-comp.h | 310 | unifdef-y += ppp-comp.h |
310 | unifdef-y += ptrace.h | 311 | unifdef-y += ptrace.h |
311 | unifdef-y += qnx4_fs.h | ||
312 | unifdef-y += quota.h | 312 | unifdef-y += quota.h |
313 | unifdef-y += random.h | 313 | unifdef-y += random.h |
314 | unifdef-y += irqnr.h | 314 | unifdef-y += irqnr.h |
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h index acbaec3524e0..8b9aee1a9ce3 100644 --- a/include/linux/qnx4_fs.h +++ b/include/linux/qnx4_fs.h | |||
@@ -85,63 +85,4 @@ struct qnx4_super_block { | |||
85 | struct qnx4_inode_entry AltBoot; | 85 | struct qnx4_inode_entry AltBoot; |
86 | }; | 86 | }; |
87 | 87 | ||
88 | #ifdef __KERNEL__ | ||
89 | |||
90 | #define QNX4_DEBUG 0 | ||
91 | |||
92 | #if QNX4_DEBUG | ||
93 | #define QNX4DEBUG(X) printk X | ||
94 | #else | ||
95 | #define QNX4DEBUG(X) (void) 0 | ||
96 | #endif | ||
97 | |||
98 | struct qnx4_sb_info { | ||
99 | struct buffer_head *sb_buf; /* superblock buffer */ | ||
100 | struct qnx4_super_block *sb; /* our superblock */ | ||
101 | unsigned int Version; /* may be useful */ | ||
102 | struct qnx4_inode_entry *BitMap; /* useful */ | ||
103 | }; | ||
104 | |||
105 | struct qnx4_inode_info { | ||
106 | struct qnx4_inode_entry raw; | ||
107 | loff_t mmu_private; | ||
108 | struct inode vfs_inode; | ||
109 | }; | ||
110 | |||
111 | extern struct inode *qnx4_iget(struct super_block *, unsigned long); | ||
112 | extern struct dentry *qnx4_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd); | ||
113 | extern unsigned long qnx4_count_free_blocks(struct super_block *sb); | ||
114 | extern unsigned long qnx4_block_map(struct inode *inode, long iblock); | ||
115 | |||
116 | extern struct buffer_head *qnx4_bread(struct inode *, int, int); | ||
117 | |||
118 | extern const struct inode_operations qnx4_file_inode_operations; | ||
119 | extern const struct inode_operations qnx4_dir_inode_operations; | ||
120 | extern const struct file_operations qnx4_file_operations; | ||
121 | extern const struct file_operations qnx4_dir_operations; | ||
122 | extern int qnx4_is_free(struct super_block *sb, long block); | ||
123 | extern int qnx4_set_bitmap(struct super_block *sb, long block, int busy); | ||
124 | extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode, struct nameidata *nd); | ||
125 | extern void qnx4_truncate(struct inode *inode); | ||
126 | extern void qnx4_free_inode(struct inode *inode); | ||
127 | extern int qnx4_unlink(struct inode *dir, struct dentry *dentry); | ||
128 | extern int qnx4_rmdir(struct inode *dir, struct dentry *dentry); | ||
129 | |||
130 | static inline struct qnx4_sb_info *qnx4_sb(struct super_block *sb) | ||
131 | { | ||
132 | return sb->s_fs_info; | ||
133 | } | ||
134 | |||
135 | static inline struct qnx4_inode_info *qnx4_i(struct inode *inode) | ||
136 | { | ||
137 | return container_of(inode, struct qnx4_inode_info, vfs_inode); | ||
138 | } | ||
139 | |||
140 | static inline struct qnx4_inode_entry *qnx4_raw_inode(struct inode *inode) | ||
141 | { | ||
142 | return &qnx4_i(inode)->raw; | ||
143 | } | ||
144 | |||
145 | #endif /* __KERNEL__ */ | ||
146 | |||
147 | #endif | 88 | #endif |