aboutsummaryrefslogtreecommitdiffstats
path: root/fs
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
parentde428b63b16f9c74a24228a517713e8c65f79475 (diff)
Btrfs: 2.6.21-git fixes
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/ctree.h2
-rw-r--r--fs/btrfs/disk-io.c3
-rw-r--r--fs/btrfs/super.c21
3 files changed, 1 insertions, 25 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 5830b4333d83..da12d8275817 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1197,6 +1197,4 @@ struct btrfs_csum_item *btrfs_lookup_csum(struct btrfs_trans_handle *trans,
1197 u64 objectid, u64 offset, 1197 u64 objectid, u64 offset,
1198 int cow); 1198 int cow);
1199/* super.c */ 1199/* super.c */
1200extern struct subsystem btrfs_subsys;
1201
1202#endif 1200#endif
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 4c0262b57664..3da057f78bc8 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -649,9 +649,6 @@ struct btrfs_root *open_ctree(struct super_block *sb)
649 649
650 fs_info->generation = btrfs_super_generation(disk_super) + 1; 650 fs_info->generation = btrfs_super_generation(disk_super) + 1;
651 memset(&fs_info->kobj, 0, sizeof(fs_info->kobj)); 651 memset(&fs_info->kobj, 0, sizeof(fs_info->kobj));
652 kobj_set_kset_s(fs_info, btrfs_subsys);
653 kobject_set_name(&fs_info->kobj, "%s", sb->s_id);
654 kobject_register(&fs_info->kobj);
655 mutex_unlock(&fs_info->fs_mutex); 652 mutex_unlock(&fs_info->fs_mutex);
656 return tree_root; 653 return tree_root;
657} 654}
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