@@ -2903,7 +2903,7 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh,
29032903 struct ocfs2_extent_tree dx_et ;
29042904 int did_quota = 0 , bytes_allocated = 0 ;
29052905
2906- ocfs2_init_dinode_extent_tree (& et , dir , di_bh );
2906+ ocfs2_init_dinode_extent_tree (& et , INODE_CACHE ( dir ) , di_bh );
29072907
29082908 alloc = ocfs2_clusters_for_bytes (sb , bytes );
29092909 dx_alloc = 0 ;
@@ -3125,7 +3125,9 @@ static int ocfs2_expand_inline_dir(struct inode *dir, struct buffer_head *di_bh,
31253125 ocfs2_dx_dir_index_root_block (dir , dx_root_bh ,
31263126 dirdata_bh );
31273127 } else {
3128- ocfs2_init_dx_root_extent_tree (& dx_et , dir , dx_root_bh );
3128+ ocfs2_init_dx_root_extent_tree (& dx_et ,
3129+ INODE_CACHE (dir ),
3130+ dx_root_bh );
31293131 ret = ocfs2_insert_extent (handle , & dx_et , 0 ,
31303132 dx_insert_blkno , 1 , 0 , NULL );
31313133 if (ret )
@@ -3345,7 +3347,8 @@ static int ocfs2_extend_dir(struct ocfs2_super *osb,
33453347 spin_lock (& OCFS2_I (dir )-> ip_lock );
33463348 if (dir_i_size == ocfs2_clusters_to_bytes (sb , OCFS2_I (dir )-> ip_clusters )) {
33473349 spin_unlock (& OCFS2_I (dir )-> ip_lock );
3348- ocfs2_init_dinode_extent_tree (& et , dir , parent_fe_bh );
3350+ ocfs2_init_dinode_extent_tree (& et , INODE_CACHE (dir ),
3351+ parent_fe_bh );
33493352 num_free_extents = ocfs2_num_free_extents (osb , & et );
33503353 if (num_free_extents < 0 ) {
33513354 status = num_free_extents ;
@@ -3837,7 +3840,7 @@ static int ocfs2_dx_dir_rebalance(struct ocfs2_super *osb, struct inode *dir,
38373840 (unsigned long long )OCFS2_I (dir )-> ip_blkno ,
38383841 (unsigned long long )leaf_blkno , insert_hash );
38393842
3840- ocfs2_init_dx_root_extent_tree (& et , dir , dx_root_bh );
3843+ ocfs2_init_dx_root_extent_tree (& et , INODE_CACHE ( dir ) , dx_root_bh );
38413844
38423845 dx_root = (struct ocfs2_dx_root_block * )dx_root_bh -> b_data ;
38433846 /*
@@ -4216,7 +4219,7 @@ static int ocfs2_expand_inline_dx_root(struct inode *dir,
42164219
42174220 /* This should never fail considering we start with an empty
42184221 * dx_root. */
4219- ocfs2_init_dx_root_extent_tree (& et , dir , dx_root_bh );
4222+ ocfs2_init_dx_root_extent_tree (& et , INODE_CACHE ( dir ) , dx_root_bh );
42204223 ret = ocfs2_insert_extent (handle , & et , 0 , insert_blkno , 1 , 0 , NULL );
42214224 if (ret )
42224225 mlog_errno (ret );
@@ -4540,7 +4543,7 @@ int ocfs2_dx_dir_truncate(struct inode *dir, struct buffer_head *di_bh)
45404543 if (ocfs2_dx_root_inline (dx_root ))
45414544 goto remove_index ;
45424545
4543- ocfs2_init_dx_root_extent_tree (& et , dir , dx_root_bh );
4546+ ocfs2_init_dx_root_extent_tree (& et , INODE_CACHE ( dir ) , dx_root_bh );
45444547
45454548 /* XXX: What if dr_clusters is too large? */
45464549 while (le32_to_cpu (dx_root -> dr_clusters )) {
0 commit comments