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>
This commit is contained in:
Al Viro 2009-06-07 09:47:13 -04:00
parent 79d2576758
commit 964f536966
9 changed files with 66 additions and 95 deletions

View file

@ -13,14 +13,9 @@
* 28-06-1998 by Frank Denis : qnx4_free_inode (to be fixed) . * 28-06-1998 by Frank Denis : qnx4_free_inode (to be fixed) .
*/ */
#include <linux/time.h>
#include <linux/fs.h>
#include <linux/qnx4_fs.h>
#include <linux/stat.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include "qnx4.h"
#if 0 #if 0
int qnx4_new_block(struct super_block *sb) int qnx4_new_block(struct super_block *sb)

View file

@ -11,14 +11,9 @@
* 20-06-1998 by Frank Denis : Linux 2.1.99+ & dcache support. * 20-06-1998 by Frank Denis : Linux 2.1.99+ & dcache support.
*/ */
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/qnx4_fs.h>
#include <linux/stat.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
#include "qnx4.h"
static int qnx4_readdir(struct file *filp, void *dirent, filldir_t filldir) static int qnx4_readdir(struct file *filp, void *dirent, filldir_t filldir)
{ {

View file

@ -12,8 +12,7 @@
* 27-06-1998 by Frank Denis : file overwriting. * 27-06-1998 by Frank Denis : file overwriting.
*/ */
#include <linux/fs.h> #include "qnx4.h"
#include <linux/qnx4_fs.h>
/* /*
* We have mostly NULL's here: the current defaults are ok for * We have mostly NULL's here: the current defaults are ok for

View file

@ -13,20 +13,15 @@
*/ */
#include <linux/module.h> #include <linux/module.h>
#include <linux/types.h>
#include <linux/string.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/qnx4_fs.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/slab.h>
#include <linux/highuid.h> #include <linux/highuid.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/pagemap.h> #include <linux/pagemap.h>
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
#include <linux/writeback.h> #include <linux/writeback.h>
#include <linux/vfs.h> #include <linux/statfs.h>
#include <asm/uaccess.h> #include "qnx4.h"
#define QNX4_VERSION 4 #define QNX4_VERSION 4
#define QNX4_BMNAME ".bitmap" #define QNX4_BMNAME ".bitmap"

View file

@ -12,16 +12,9 @@
* 04-07-1998 by Frank Denis : first step for rmdir/unlink. * 04-07-1998 by Frank Denis : first step for rmdir/unlink.
*/ */
#include <linux/time.h>
#include <linux/fs.h>
#include <linux/qnx4_fs.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <linux/stat.h>
#include <linux/fcntl.h>
#include <linux/errno.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
#include "qnx4.h"
/* /*

57
fs/qnx4/qnx4.h Normal file
View file

@ -0,0 +1,57 @@
#include <linux/fs.h>
#include <linux/qnx4_fs.h>
#define QNX4_DEBUG 0
#if QNX4_DEBUG
#define QNX4DEBUG(X) printk X
#else
#define QNX4DEBUG(X) (void) 0
#endif
struct qnx4_sb_info {
struct buffer_head *sb_buf; /* superblock buffer */
struct qnx4_super_block *sb; /* our superblock */
unsigned int Version; /* may be useful */
struct qnx4_inode_entry *BitMap; /* useful */
};
struct qnx4_inode_info {
struct qnx4_inode_entry raw;
loff_t mmu_private;
struct inode vfs_inode;
};
extern struct inode *qnx4_iget(struct super_block *, unsigned long);
extern struct dentry *qnx4_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd);
extern unsigned long qnx4_count_free_blocks(struct super_block *sb);
extern unsigned long qnx4_block_map(struct inode *inode, long iblock);
extern struct buffer_head *qnx4_bread(struct inode *, int, int);
extern const struct inode_operations qnx4_file_inode_operations;
extern const struct inode_operations qnx4_dir_inode_operations;
extern const struct file_operations qnx4_file_operations;
extern const struct file_operations qnx4_dir_operations;
extern int qnx4_is_free(struct super_block *sb, long block);
extern int qnx4_set_bitmap(struct super_block *sb, long block, int busy);
extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode, struct nameidata *nd);
extern void qnx4_truncate(struct inode *inode);
extern void qnx4_free_inode(struct inode *inode);
extern int qnx4_unlink(struct inode *dir, struct dentry *dentry);
extern int qnx4_rmdir(struct inode *dir, struct dentry *dentry);
static inline struct qnx4_sb_info *qnx4_sb(struct super_block *sb)
{
return sb->s_fs_info;
}
static inline struct qnx4_inode_info *qnx4_i(struct inode *inode)
{
return container_of(inode, struct qnx4_inode_info, vfs_inode);
}
static inline struct qnx4_inode_entry *qnx4_raw_inode(struct inode *inode)
{
return &qnx4_i(inode)->raw;
}

View file

@ -10,12 +10,8 @@
* 30-06-1998 by Frank DENIS : ugly filler. * 30-06-1998 by Frank DENIS : ugly filler.
*/ */
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/qnx4_fs.h>
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <asm/uaccess.h> #include "qnx4.h"
#ifdef CONFIG_QNX4FS_RW #ifdef CONFIG_QNX4FS_RW

View file

@ -135,6 +135,7 @@ header-y += posix_types.h
header-y += ppdev.h header-y += ppdev.h
header-y += prctl.h header-y += prctl.h
header-y += qnxtypes.h header-y += qnxtypes.h
header-y += qnx4_fs.h
header-y += radeonfb.h header-y += radeonfb.h
header-y += raw.h header-y += raw.h
header-y += resource.h header-y += resource.h
@ -308,7 +309,6 @@ unifdef-y += poll.h
unifdef-y += ppp_defs.h unifdef-y += ppp_defs.h
unifdef-y += ppp-comp.h unifdef-y += ppp-comp.h
unifdef-y += ptrace.h unifdef-y += ptrace.h
unifdef-y += qnx4_fs.h
unifdef-y += quota.h unifdef-y += quota.h
unifdef-y += random.h unifdef-y += random.h
unifdef-y += irqnr.h unifdef-y += irqnr.h

View file

@ -85,63 +85,4 @@ struct qnx4_super_block {
struct qnx4_inode_entry AltBoot; struct qnx4_inode_entry AltBoot;
}; };
#ifdef __KERNEL__
#define QNX4_DEBUG 0
#if QNX4_DEBUG
#define QNX4DEBUG(X) printk X
#else
#define QNX4DEBUG(X) (void) 0
#endif
struct qnx4_sb_info {
struct buffer_head *sb_buf; /* superblock buffer */
struct qnx4_super_block *sb; /* our superblock */
unsigned int Version; /* may be useful */
struct qnx4_inode_entry *BitMap; /* useful */
};
struct qnx4_inode_info {
struct qnx4_inode_entry raw;
loff_t mmu_private;
struct inode vfs_inode;
};
extern struct inode *qnx4_iget(struct super_block *, unsigned long);
extern struct dentry *qnx4_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd);
extern unsigned long qnx4_count_free_blocks(struct super_block *sb);
extern unsigned long qnx4_block_map(struct inode *inode, long iblock);
extern struct buffer_head *qnx4_bread(struct inode *, int, int);
extern const struct inode_operations qnx4_file_inode_operations;
extern const struct inode_operations qnx4_dir_inode_operations;
extern const struct file_operations qnx4_file_operations;
extern const struct file_operations qnx4_dir_operations;
extern int qnx4_is_free(struct super_block *sb, long block);
extern int qnx4_set_bitmap(struct super_block *sb, long block, int busy);
extern int qnx4_create(struct inode *inode, struct dentry *dentry, int mode, struct nameidata *nd);
extern void qnx4_truncate(struct inode *inode);
extern void qnx4_free_inode(struct inode *inode);
extern int qnx4_unlink(struct inode *dir, struct dentry *dentry);
extern int qnx4_rmdir(struct inode *dir, struct dentry *dentry);
static inline struct qnx4_sb_info *qnx4_sb(struct super_block *sb)
{
return sb->s_fs_info;
}
static inline struct qnx4_inode_info *qnx4_i(struct inode *inode)
{
return container_of(inode, struct qnx4_inode_info, vfs_inode);
}
static inline struct qnx4_inode_entry *qnx4_raw_inode(struct inode *inode)
{
return &qnx4_i(inode)->raw;
}
#endif /* __KERNEL__ */
#endif #endif