Commit 429de1ee authored by Hirofumi Ogawa's avatar Hirofumi Ogawa Committed by Linus Torvalds

[PATCH] FAT: remove symbols exports from msdosfs/vfat

From Christoph Hellwig <hch@lst.de>

If we're ever going to ressurect umsdos it should be a stackable
filesystem..
parent dc8b0932
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
obj-$(CONFIG_MSDOS_FS) += msdos.o obj-$(CONFIG_MSDOS_FS) += msdos.o
msdos-objs := namei.o msdosfs_syms.o msdos-y := namei.o
/*
* linux/fs/msdos/msdosfs_syms.c
*
* Exported kernel symbols for the MS-DOS filesystem.
* These symbols are used by umsdos.
*/
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/msdos_fs.h>
#include <linux/init.h>
/*
* Support for umsdos fs
*
* These symbols are _always_ exported, in case someone
* wants to install the umsdos module later.
*/
EXPORT_SYMBOL(msdos_create);
EXPORT_SYMBOL(msdos_lookup);
EXPORT_SYMBOL(msdos_mkdir);
EXPORT_SYMBOL(msdos_rename);
EXPORT_SYMBOL(msdos_rmdir);
EXPORT_SYMBOL(msdos_unlink);
static struct super_block *msdos_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, msdos_fill_super);
}
static struct file_system_type msdos_fs_type = {
.owner = THIS_MODULE,
.name = "msdos",
.get_sb = msdos_get_sb,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
static int __init init_msdos_fs(void)
{
return register_filesystem(&msdos_fs_type);
}
static void __exit exit_msdos_fs(void)
{
unregister_filesystem(&msdos_fs_type);
}
module_init(init_msdos_fs)
module_exit(exit_msdos_fs)
MODULE_LICENSE("GPL");
...@@ -193,7 +193,8 @@ static struct dentry_operations msdos_dentry_operations = { ...@@ -193,7 +193,8 @@ static struct dentry_operations msdos_dentry_operations = {
*/ */
/***** Get inode using directory and name */ /***** Get inode using directory and name */
struct dentry *msdos_lookup(struct inode *dir,struct dentry *dentry, struct nameidata *nd) static struct dentry *msdos_lookup(struct inode *dir, struct dentry *dentry,
struct nameidata *nd)
{ {
struct super_block *sb = dir->i_sb; struct super_block *sb = dir->i_sb;
struct inode *inode = NULL; struct inode *inode = NULL;
...@@ -257,12 +258,8 @@ static int msdos_add_entry(struct inode *dir, const unsigned char *name, ...@@ -257,12 +258,8 @@ static int msdos_add_entry(struct inode *dir, const unsigned char *name,
return 0; return 0;
} }
/*
* AV. Huh??? It's exported. Oughtta check usage.
*/
/***** Create a file */ /***** Create a file */
int msdos_create(struct inode *dir,struct dentry *dentry,int mode, static int msdos_create(struct inode *dir, struct dentry *dentry, int mode,
struct nameidata *nd) struct nameidata *nd)
{ {
struct super_block *sb = dir->i_sb; struct super_block *sb = dir->i_sb;
...@@ -307,7 +304,7 @@ int msdos_create(struct inode *dir,struct dentry *dentry,int mode, ...@@ -307,7 +304,7 @@ int msdos_create(struct inode *dir,struct dentry *dentry,int mode,
} }
/***** Remove a directory */ /***** Remove a directory */
int msdos_rmdir(struct inode *dir, struct dentry *dentry) static int msdos_rmdir(struct inode *dir, struct dentry *dentry)
{ {
struct inode *inode = dentry->d_inode; struct inode *inode = dentry->d_inode;
loff_t i_pos; loff_t i_pos;
...@@ -346,7 +343,7 @@ int msdos_rmdir(struct inode *dir, struct dentry *dentry) ...@@ -346,7 +343,7 @@ int msdos_rmdir(struct inode *dir, struct dentry *dentry)
} }
/***** Make a directory */ /***** Make a directory */
int msdos_mkdir(struct inode *dir,struct dentry *dentry,int mode) static int msdos_mkdir(struct inode *dir, struct dentry *dentry, int mode)
{ {
struct super_block *sb = dir->i_sb; struct super_block *sb = dir->i_sb;
struct buffer_head *bh; struct buffer_head *bh;
...@@ -413,7 +410,7 @@ int msdos_mkdir(struct inode *dir,struct dentry *dentry,int mode) ...@@ -413,7 +410,7 @@ int msdos_mkdir(struct inode *dir,struct dentry *dentry,int mode)
} }
/***** Unlink a file */ /***** Unlink a file */
int msdos_unlink( struct inode *dir, struct dentry *dentry) static int msdos_unlink(struct inode *dir, struct dentry *dentry)
{ {
struct inode *inode = dentry->d_inode; struct inode *inode = dentry->d_inode;
loff_t i_pos; loff_t i_pos;
...@@ -539,8 +536,8 @@ static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name, ...@@ -539,8 +536,8 @@ static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name,
} }
/***** Rename, a wrapper for rename_same_dir & rename_diff_dir */ /***** Rename, a wrapper for rename_same_dir & rename_diff_dir */
int msdos_rename(struct inode *old_dir,struct dentry *old_dentry, static int msdos_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir,struct dentry *new_dentry) struct inode *new_dir, struct dentry *new_dentry)
{ {
struct buffer_head *old_bh; struct buffer_head *old_bh;
struct msdos_dir_entry *old_de; struct msdos_dir_entry *old_de;
...@@ -576,9 +573,7 @@ int msdos_rename(struct inode *old_dir,struct dentry *old_dentry, ...@@ -576,9 +573,7 @@ int msdos_rename(struct inode *old_dir,struct dentry *old_dentry,
return error; return error;
} }
static struct inode_operations msdos_dir_inode_operations = {
/* The public inode operations for the msdos fs */
struct inode_operations msdos_dir_inode_operations = {
.create = msdos_create, .create = msdos_create,
.lookup = msdos_lookup, .lookup = msdos_lookup,
.unlink = msdos_unlink, .unlink = msdos_unlink,
...@@ -588,7 +583,7 @@ struct inode_operations msdos_dir_inode_operations = { ...@@ -588,7 +583,7 @@ struct inode_operations msdos_dir_inode_operations = {
.setattr = fat_notify_change, .setattr = fat_notify_change,
}; };
int msdos_fill_super(struct super_block *sb,void *data, int silent) static int msdos_fill_super(struct super_block *sb,void *data, int silent)
{ {
int res; int res;
...@@ -599,3 +594,34 @@ int msdos_fill_super(struct super_block *sb,void *data, int silent) ...@@ -599,3 +594,34 @@ int msdos_fill_super(struct super_block *sb,void *data, int silent)
sb->s_root->d_op = &msdos_dentry_operations; sb->s_root->d_op = &msdos_dentry_operations;
return 0; return 0;
} }
static struct super_block *msdos_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, msdos_fill_super);
}
static struct file_system_type msdos_fs_type = {
.owner = THIS_MODULE,
.name = "msdos",
.get_sb = msdos_get_sb,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
static int __init init_msdos_fs(void)
{
return register_filesystem(&msdos_fs_type);
}
static void __exit exit_msdos_fs(void)
{
unregister_filesystem(&msdos_fs_type);
}
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Werner Almesberger");
MODULE_DESCRIPTION("MS-DOS filesystem support");
module_init(init_msdos_fs)
module_exit(exit_msdos_fs)
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
obj-$(CONFIG_VFAT_FS) += vfat.o obj-$(CONFIG_VFAT_FS) += vfat.o
vfat-objs := namei.o vfatfs_syms.o vfat-y := namei.o
...@@ -805,7 +805,8 @@ static int vfat_find(struct inode *dir,struct qstr* qname, ...@@ -805,7 +805,8 @@ static int vfat_find(struct inode *dir,struct qstr* qname,
return res ? res : -ENOENT; return res ? res : -ENOENT;
} }
struct dentry *vfat_lookup(struct inode *dir,struct dentry *dentry, struct nameidata *nd) static struct dentry *vfat_lookup(struct inode *dir, struct dentry *dentry,
struct nameidata *nd)
{ {
int res; int res;
struct vfat_slot_info sinfo; struct vfat_slot_info sinfo;
...@@ -854,7 +855,7 @@ struct dentry *vfat_lookup(struct inode *dir,struct dentry *dentry, struct namei ...@@ -854,7 +855,7 @@ struct dentry *vfat_lookup(struct inode *dir,struct dentry *dentry, struct namei
return dentry; return dentry;
} }
int vfat_create(struct inode *dir,struct dentry* dentry,int mode, static int vfat_create(struct inode *dir, struct dentry* dentry, int mode,
struct nameidata *nd) struct nameidata *nd)
{ {
struct super_block *sb = dir->i_sb; struct super_block *sb = dir->i_sb;
...@@ -908,7 +909,7 @@ static void vfat_remove_entry(struct inode *dir,struct vfat_slot_info *sinfo, ...@@ -908,7 +909,7 @@ static void vfat_remove_entry(struct inode *dir,struct vfat_slot_info *sinfo,
brelse(bh); brelse(bh);
} }
int vfat_rmdir(struct inode *dir,struct dentry* dentry) static int vfat_rmdir(struct inode *dir, struct dentry* dentry)
{ {
int res; int res;
struct vfat_slot_info sinfo; struct vfat_slot_info sinfo;
...@@ -936,7 +937,7 @@ int vfat_rmdir(struct inode *dir,struct dentry* dentry) ...@@ -936,7 +937,7 @@ int vfat_rmdir(struct inode *dir,struct dentry* dentry)
return res; return res;
} }
int vfat_unlink(struct inode *dir, struct dentry* dentry) static int vfat_unlink(struct inode *dir, struct dentry *dentry)
{ {
int res; int res;
struct vfat_slot_info sinfo; struct vfat_slot_info sinfo;
...@@ -959,8 +960,7 @@ int vfat_unlink(struct inode *dir, struct dentry* dentry) ...@@ -959,8 +960,7 @@ int vfat_unlink(struct inode *dir, struct dentry* dentry)
return res; return res;
} }
static int vfat_mkdir(struct inode *dir,struct dentry* dentry,int mode)
int vfat_mkdir(struct inode *dir,struct dentry* dentry,int mode)
{ {
struct super_block *sb = dir->i_sb; struct super_block *sb = dir->i_sb;
struct inode *inode = NULL; struct inode *inode = NULL;
...@@ -1005,8 +1005,8 @@ int vfat_mkdir(struct inode *dir,struct dentry* dentry,int mode) ...@@ -1005,8 +1005,8 @@ int vfat_mkdir(struct inode *dir,struct dentry* dentry,int mode)
goto out; goto out;
} }
int vfat_rename(struct inode *old_dir,struct dentry *old_dentry, static int vfat_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir,struct dentry *new_dentry) struct inode *new_dir, struct dentry *new_dentry)
{ {
struct buffer_head *old_bh,*new_bh,*dotdot_bh; struct buffer_head *old_bh,*new_bh,*dotdot_bh;
struct msdos_dir_entry *old_de,*new_de,*dotdot_de; struct msdos_dir_entry *old_de,*new_de,*dotdot_de;
...@@ -1094,9 +1094,7 @@ int vfat_rename(struct inode *old_dir,struct dentry *old_dentry, ...@@ -1094,9 +1094,7 @@ int vfat_rename(struct inode *old_dir,struct dentry *old_dentry,
} }
static struct inode_operations vfat_dir_inode_operations = {
/* Public inode operations for the VFAT fs */
struct inode_operations vfat_dir_inode_operations = {
.create = vfat_create, .create = vfat_create,
.lookup = vfat_lookup, .lookup = vfat_lookup,
.unlink = vfat_unlink, .unlink = vfat_unlink,
...@@ -1106,7 +1104,7 @@ struct inode_operations vfat_dir_inode_operations = { ...@@ -1106,7 +1104,7 @@ struct inode_operations vfat_dir_inode_operations = {
.setattr = fat_notify_change, .setattr = fat_notify_change,
}; };
int vfat_fill_super(struct super_block *sb, void *data, int silent) static int vfat_fill_super(struct super_block *sb, void *data, int silent)
{ {
int res; int res;
...@@ -1121,3 +1119,34 @@ int vfat_fill_super(struct super_block *sb, void *data, int silent) ...@@ -1121,3 +1119,34 @@ int vfat_fill_super(struct super_block *sb, void *data, int silent)
return 0; return 0;
} }
static struct super_block *vfat_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, vfat_fill_super);
}
static struct file_system_type vfat_fs_type = {
.owner = THIS_MODULE,
.name = "vfat",
.get_sb = vfat_get_sb,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
static int __init init_vfat_fs(void)
{
return register_filesystem(&vfat_fs_type);
}
static void __exit exit_vfat_fs(void)
{
unregister_filesystem(&vfat_fs_type);
}
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("VFAT filesystem support");
MODULE_AUTHOR("Gordon Chaffee");
module_init(init_vfat_fs)
module_exit(exit_vfat_fs)
/*
* linux/fs/msdos/vfatfs_syms.c
*
* Exported kernel symbols for the VFAT filesystem.
* These symbols are used by dmsdos.
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/msdos_fs.h>
static struct super_block *vfat_get_sb(struct file_system_type *fs_type,
int flags, const char *dev_name, void *data)
{
return get_sb_bdev(fs_type, flags, dev_name, data, vfat_fill_super);
}
static struct file_system_type vfat_fs_type = {
.owner = THIS_MODULE,
.name = "vfat",
.get_sb = vfat_get_sb,
.kill_sb = kill_block_super,
.fs_flags = FS_REQUIRES_DEV,
};
EXPORT_SYMBOL(vfat_create);
EXPORT_SYMBOL(vfat_unlink);
EXPORT_SYMBOL(vfat_mkdir);
EXPORT_SYMBOL(vfat_rmdir);
EXPORT_SYMBOL(vfat_rename);
EXPORT_SYMBOL(vfat_lookup);
static int __init init_vfat_fs(void)
{
return register_filesystem(&vfat_fs_type);
}
static void __exit exit_vfat_fs(void)
{
unregister_filesystem(&vfat_fs_type);
}
module_init(init_vfat_fs)
module_exit(exit_vfat_fs)
MODULE_LICENSE("GPL");
...@@ -309,29 +309,6 @@ static __inline__ int fat_get_entry(struct inode *dir, loff_t *pos, ...@@ -309,29 +309,6 @@ static __inline__ int fat_get_entry(struct inode *dir, loff_t *pos,
return fat__get_entry(dir, pos, bh, de, i_pos); return fat__get_entry(dir, pos, bh, de, i_pos);
} }
/* msdos/namei.c - these are for Umsdos */
extern struct dentry *msdos_lookup(struct inode *dir, struct dentry *, struct nameidata *);
extern int msdos_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *);
extern int msdos_rmdir(struct inode *dir, struct dentry *dentry);
extern int msdos_mkdir(struct inode *dir, struct dentry *dentry, int mode);
extern int msdos_unlink(struct inode *dir, struct dentry *dentry);
extern int msdos_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry);
extern int msdos_fill_super(struct super_block *sb, void *data, int silent);
/* vfat/namei.c - these are for dmsdos */
extern struct dentry *vfat_lookup(struct inode *dir, struct dentry *, struct nameidata *);
extern int vfat_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *);
extern int vfat_rmdir(struct inode *dir, struct dentry *dentry);
extern int vfat_unlink(struct inode *dir, struct dentry *dentry);
extern int vfat_mkdir(struct inode *dir, struct dentry *dentry, int mode);
extern int vfat_rename(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry);
extern int vfat_fill_super(struct super_block *sb, void *data, int silent);
/* vfat/vfatfs_syms.c */
extern struct file_system_type vfat_fs_type;
#endif /* __KERNEL__ */ #endif /* __KERNEL__ */
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment