aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorJosef Bacik <jbacik@redhat.com>2008-07-24 12:17:14 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-25 11:04:05 -0400
commit7b1287662304c3cb05cb38f5e3e2d69f386e8f10 (patch)
treebb589bfc3854f801b4098f2f2140e42a2f9e8071 /fs/btrfs/disk-io.c
parent33268eaf0b3db5e2bd12c0ada81a8e8f87a46d68 (diff)
Btrfs: Create orphan inode records to prevent lost files after a crash
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index ec01062eb41d..d60923967347 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -732,7 +732,9 @@ static int __setup_root(u32 nodesize, u32 leafsize, u32 sectorsize,
732 root->in_sysfs = 0; 732 root->in_sysfs = 0;
733 733
734 INIT_LIST_HEAD(&root->dirty_list); 734 INIT_LIST_HEAD(&root->dirty_list);
735 INIT_LIST_HEAD(&root->orphan_list);
735 spin_lock_init(&root->node_lock); 736 spin_lock_init(&root->node_lock);
737 spin_lock_init(&root->orphan_lock);
736 mutex_init(&root->objectid_mutex); 738 mutex_init(&root->objectid_mutex);
737 memset(&root->root_key, 0, sizeof(root->root_key)); 739 memset(&root->root_key, 0, sizeof(root->root_key));
738 memset(&root->root_item, 0, sizeof(root->root_item)); 740 memset(&root->root_item, 0, sizeof(root->root_item));