git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nfsd4: remove unnecessary lease-setting function
[safe/jmp/linux-2.6]
/
fs
/
configfs
/
mount.c
diff --git
a/fs/configfs/mount.c
b/fs/configfs/mount.c
index
be5d86a
..
8421cea
100644
(file)
--- a/
fs/configfs/mount.c
+++ b/
fs/configfs/mount.c
@@
-38,10
+38,10
@@
struct vfsmount * configfs_mount = NULL;
struct super_block * configfs_sb = NULL;
struct vfsmount * configfs_mount = NULL;
struct super_block * configfs_sb = NULL;
-
kmem_cache_t
*configfs_dir_cachep;
+
struct kmem_cache
*configfs_dir_cachep;
static int configfs_mnt_count = 0;
static int configfs_mnt_count = 0;
-static struct super_operations configfs_ops = {
+static
const
struct super_operations configfs_ops = {
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
};
.statfs = simple_statfs,
.drop_inode = generic_delete_inode,
};
@@
-84,7
+84,7
@@
static int configfs_fill_super(struct super_block *sb, void *data, int silent)
inode->i_op = &configfs_dir_inode_operations;
inode->i_fop = &configfs_dir_operations;
/* directory inodes start off with i_nlink == 2 (for "." entry) */
inode->i_op = &configfs_dir_inode_operations;
inode->i_fop = &configfs_dir_operations;
/* directory inodes start off with i_nlink == 2 (for "." entry) */
- in
ode->i_nlink++
;
+ in
c_nlink(inode)
;
} else {
pr_debug("configfs: could not get root inode\n");
return -ENOMEM;
} else {
pr_debug("configfs: could not get root inode\n");
return -ENOMEM;
@@
-92,7
+92,7
@@
static int configfs_fill_super(struct super_block *sb, void *data, int silent)
root = d_alloc_root(inode);
if (!root) {
root = d_alloc_root(inode);
if (!root) {
- pr_debug("%s: could not get root dentry!\n",__
FUNCTION
__);
+ pr_debug("%s: could not get root dentry!\n",__
func
__);
iput(inode);
return -ENOMEM;
}
iput(inode);
return -ENOMEM;
}
@@
-103,10
+103,10
@@
static int configfs_fill_super(struct super_block *sb, void *data, int silent)
return 0;
}
return 0;
}
-static
struct super_block *
configfs_get_sb(struct file_system_type *fs_type,
- int flags, const char *dev_name, void *data)
+static
int
configfs_get_sb(struct file_system_type *fs_type,
+ int flags, const char *dev_name, void *data
, struct vfsmount *mnt
)
{
{
- return get_sb_single(fs_type, flags, data, configfs_fill_super);
+ return get_sb_single(fs_type, flags, data, configfs_fill_super
, mnt
);
}
static struct file_system_type configfs_fs_type = {
}
static struct file_system_type configfs_fs_type = {
@@
-128,7
+128,7
@@
void configfs_release_fs(void)
}
}
-static
decl_subsys(config, NULL, NULL)
;
+static
struct kobject *config_kobj
;
static int __init configfs_init(void)
{
static int __init configfs_init(void)
{
@@
-136,13
+136,12
@@
static int __init configfs_init(void)
configfs_dir_cachep = kmem_cache_create("configfs_dir_cache",
sizeof(struct configfs_dirent),
configfs_dir_cachep = kmem_cache_create("configfs_dir_cache",
sizeof(struct configfs_dirent),
- 0, 0, NULL
, NULL
);
+ 0, 0, NULL);
if (!configfs_dir_cachep)
goto out;
if (!configfs_dir_cachep)
goto out;
- kset_set_kset_s(&config_subsys, kernel_subsys);
- err = subsystem_register(&config_subsys);
- if (err) {
+ config_kobj = kobject_create_and_add("config", kernel_kobj);
+ if (!config_kobj) {
kmem_cache_destroy(configfs_dir_cachep);
configfs_dir_cachep = NULL;
goto out;
kmem_cache_destroy(configfs_dir_cachep);
configfs_dir_cachep = NULL;
goto out;
@@
-151,11
+150,19
@@
static int __init configfs_init(void)
err = register_filesystem(&configfs_fs_type);
if (err) {
printk(KERN_ERR "configfs: Unable to register filesystem!\n");
err = register_filesystem(&configfs_fs_type);
if (err) {
printk(KERN_ERR "configfs: Unable to register filesystem!\n");
-
subsystem_unregister(&config_subsys
);
+
kobject_put(config_kobj
);
kmem_cache_destroy(configfs_dir_cachep);
configfs_dir_cachep = NULL;
kmem_cache_destroy(configfs_dir_cachep);
configfs_dir_cachep = NULL;
+ goto out;
}
}
+ err = configfs_inode_init();
+ if (err) {
+ unregister_filesystem(&configfs_fs_type);
+ kobject_put(config_kobj);
+ kmem_cache_destroy(configfs_dir_cachep);
+ configfs_dir_cachep = NULL;
+ }
out:
return err;
}
out:
return err;
}
@@
-163,9
+170,10
@@
out:
static void __exit configfs_exit(void)
{
unregister_filesystem(&configfs_fs_type);
static void __exit configfs_exit(void)
{
unregister_filesystem(&configfs_fs_type);
-
subsystem_unregister(&config_subsys
);
+
kobject_put(config_kobj
);
kmem_cache_destroy(configfs_dir_cachep);
configfs_dir_cachep = NULL;
kmem_cache_destroy(configfs_dir_cachep);
configfs_dir_cachep = NULL;
+ configfs_inode_exit();
}
MODULE_AUTHOR("Oracle");
}
MODULE_AUTHOR("Oracle");