aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/super.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-05-21 14:05:12 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-05-21 14:05:12 -0400
commitf9f3c6b666f717510b67036c314ec915b9059eaa (patch)
tree7e6214462efaa4672e832e602a90ab199095f045 /fs/btrfs/super.c
parentde428b63b16f9c74a24228a517713e8c65f79475 (diff)
Btrfs: 2.6.21-git fixes
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/super.c')
-rw-r--r--fs/btrfs/super.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 0f79490123cf..0220c82841ad 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -18,24 +18,11 @@
18#include "btrfs_inode.h" 18#include "btrfs_inode.h"
19#include "ioctl.h" 19#include "ioctl.h"
20 20
21static void btrfs_fsinfo_release(struct kobject *obj)
22{
23 struct btrfs_fs_info *fsinfo = container_of(obj,
24 struct btrfs_fs_info, kobj);
25 kfree(fsinfo);
26}
27
28static struct kobj_type btrfs_fsinfo_ktype = {
29 .release = btrfs_fsinfo_release,
30};
31
32struct btrfs_iget_args { 21struct btrfs_iget_args {
33 u64 ino; 22 u64 ino;
34 struct btrfs_root *root; 23 struct btrfs_root *root;
35}; 24};
36 25
37decl_subsys(btrfs, &btrfs_fsinfo_ktype, NULL);
38
39#define BTRFS_SUPER_MAGIC 0x9123682E 26#define BTRFS_SUPER_MAGIC 0x9123682E
40 27
41static struct inode_operations btrfs_dir_inode_operations; 28static struct inode_operations btrfs_dir_inode_operations;
@@ -2438,7 +2425,7 @@ static void init_once(void * foo, struct kmem_cache * cachep,
2438{ 2425{
2439 struct btrfs_inode *ei = (struct btrfs_inode *) foo; 2426 struct btrfs_inode *ei = (struct btrfs_inode *) foo;
2440 2427
2441 if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) == 2428 if ((flags & (SLAB_CTOR_CONSTRUCTOR)) ==
2442 SLAB_CTOR_CONSTRUCTOR) { 2429 SLAB_CTOR_CONSTRUCTOR) {
2443 inode_init_once(&ei->vfs_inode); 2430 inode_init_once(&ei->vfs_inode);
2444 } 2431 }
@@ -2588,12 +2575,7 @@ static int __init init_btrfs_fs(void)
2588 err = init_inodecache(); 2575 err = init_inodecache();
2589 if (err) 2576 if (err)
2590 return err; 2577 return err;
2591 kset_set_kset_s(&btrfs_subsys, fs_subsys);
2592 err = subsystem_register(&btrfs_subsys);
2593 if (err)
2594 goto out;
2595 return register_filesystem(&btrfs_fs_type); 2578 return register_filesystem(&btrfs_fs_type);
2596out:
2597 destroy_inodecache(); 2579 destroy_inodecache();
2598 return err; 2580 return err;
2599} 2581}
@@ -2602,7 +2584,6 @@ static void __exit exit_btrfs_fs(void)
2602{ 2584{
2603 destroy_inodecache(); 2585 destroy_inodecache();
2604 unregister_filesystem(&btrfs_fs_type); 2586 unregister_filesystem(&btrfs_fs_type);
2605 subsystem_unregister(&btrfs_subsys);
2606 printk("btrfs unloaded\n"); 2587 printk("btrfs unloaded\n");
2607} 2588}
2608 2589