aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-07-07 15:44:25 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-07-20 01:44:20 -0400
commit0ee5dc676a5f8fadede608c7281dfedb1ae714ea (patch)
tree887896f0e1b51f39e9be21a1e8d960ec50a817a7 /fs/btrfs/disk-io.c
parentfb408e6ccc32404a05783911b6f3fed56bd17b06 (diff)
btrfs: kill magical embedded struct superblock
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 1ac8db5dc0a3..b231ae13b269 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1077,12 +1077,7 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
1077 init_completion(&root->kobj_unregister); 1077 init_completion(&root->kobj_unregister);
1078 root->defrag_running = 0; 1078 root->defrag_running = 0;
1079 root->root_key.objectid = objectid; 1079 root->root_key.objectid = objectid;
1080 root->anon_super.s_root = NULL; 1080 root->anon_dev = 0;
1081 root->anon_super.s_dev = 0;
1082 INIT_LIST_HEAD(&root->anon_super.s_list);
1083 INIT_LIST_HEAD(&root->anon_super.s_instances);
1084 init_rwsem(&root->anon_super.s_umount);
1085
1086 return 0; 1081 return 0;
1087} 1082}
1088 1083
@@ -1311,7 +1306,7 @@ again:
1311 spin_lock_init(&root->cache_lock); 1306 spin_lock_init(&root->cache_lock);
1312 init_waitqueue_head(&root->cache_wait); 1307 init_waitqueue_head(&root->cache_wait);
1313 1308
1314 ret = set_anon_super(&root->anon_super, NULL); 1309 ret = get_anon_bdev(&root->anon_dev);
1315 if (ret) 1310 if (ret)
1316 goto fail; 1311 goto fail;
1317 1312
@@ -2393,10 +2388,8 @@ static void free_fs_root(struct btrfs_root *root)
2393{ 2388{
2394 iput(root->cache_inode); 2389 iput(root->cache_inode);
2395 WARN_ON(!RB_EMPTY_ROOT(&root->inode_tree)); 2390 WARN_ON(!RB_EMPTY_ROOT(&root->inode_tree));
2396 if (root->anon_super.s_dev) { 2391 if (root->anon_dev)
2397 down_write(&root->anon_super.s_umount); 2392 free_anon_bdev(root->anon_dev);
2398 kill_anon_super(&root->anon_super);
2399 }
2400 free_extent_buffer(root->node); 2393 free_extent_buffer(root->node);
2401 free_extent_buffer(root->commit_root); 2394 free_extent_buffer(root->commit_root);
2402 kfree(root->free_ino_ctl); 2395 kfree(root->free_ino_ctl);