ext4: initialize extent status tree
authorZheng Liu <wenqing.lz@taobao.com>
Fri, 9 Nov 2012 02:57:30 +0000 (21:57 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 9 Nov 2012 02:57:30 +0000 (21:57 -0500)
Let ext4 initialize extent status tree of an inode.

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: Allison Henderson <achender@linux.vnet.ibm.com>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/super.c

index 18e89fafebd1a90f71e3293fc7b97bd9f60522b5..6791d091fbc737976f54588f0414fd6488673b5a 100644 (file)
@@ -943,6 +943,8 @@ static struct inode *ext4_alloc_inode(struct super_block *sb)
        memset(&ei->i_cached_extent, 0, sizeof(struct ext4_ext_cache));
        INIT_LIST_HEAD(&ei->i_prealloc_list);
        spin_lock_init(&ei->i_prealloc_lock);
+       ext4_es_init_tree(&ei->i_es_tree);
+       rwlock_init(&ei->i_es_lock);
        ei->i_reserved_data_blocks = 0;
        ei->i_reserved_meta_blocks = 0;
        ei->i_allocated_meta_blocks = 0;