summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-01-03 09:08:48 -0500
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:03:58 -0400
commit4313b3994d719fcdeb7e661473019ca3d62e829b (patch)
tree1a18dca96a9f54e8444c4c06c9beda3694bc25d3 /fs/btrfs/disk-io.c
parent56b453c92fdf51fd3283a2dc2dfbedf36f516031 (diff)
downloadop-kernel-dev-4313b3994d719fcdeb7e661473019ca3d62e829b.zip
op-kernel-dev-4313b3994d719fcdeb7e661473019ca3d62e829b.tar.gz
Btrfs: Reduce stack usage in the resizer, fix 32 bit compiles
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index de026d9..67d9fd7 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -374,6 +374,7 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
root->highest_inode = 0;
root->last_inode_alloc = 0;
root->name = NULL;
+ root->in_sysfs = 0;
memset(&root->root_key, 0, sizeof(root->root_key));
memset(&root->root_item, 0, sizeof(root->root_item));
memset(&root->defrag_progress, 0, sizeof(root->defrag_progress));
@@ -516,6 +517,9 @@ struct btrfs_root *btrfs_read_fs_root(struct btrfs_fs_info *fs_info,
if (!root)
return NULL;
+ if (root->in_sysfs)
+ return root;
+
ret = btrfs_set_root_name(root, name, namelen);
if (ret) {
free_extent_buffer(root->node);
@@ -530,6 +534,7 @@ struct btrfs_root *btrfs_read_fs_root(struct btrfs_fs_info *fs_info,
kfree(root);
return ERR_PTR(ret);
}
+ root->in_sysfs = 1;
return root;
}
#if 0
OpenPOWER on IntegriCloud