@@ -633,7 +633,6 @@ xfs_bmap_btree_to_extents(
633
633
cur -> bc_bufs [0 ] = NULL ;
634
634
xfs_iroot_realloc (ip , -1 , whichfork );
635
635
ASSERT (ifp -> if_broot == NULL );
636
- ASSERT ((ifp -> if_flags & XFS_IFBROOT ) == 0 );
637
636
ifp -> if_format = XFS_DINODE_FMT_EXTENTS ;
638
637
* logflagsp |= XFS_ILOG_CORE | xfs_ilog_fext (whichfork );
639
638
return 0 ;
@@ -677,7 +676,6 @@ xfs_bmap_extents_to_btree(
677
676
* to expand the root.
678
677
*/
679
678
xfs_iroot_realloc (ip , 1 , whichfork );
680
- ifp -> if_flags |= XFS_IFBROOT ;
681
679
682
680
/*
683
681
* Fill in the root.
@@ -4196,7 +4194,7 @@ xfs_bmapi_allocate(
4196
4194
return error ;
4197
4195
}
4198
4196
4199
- if (( ifp -> if_flags & XFS_IFBROOT ) && !bma -> cur )
4197
+ if (ifp -> if_format == XFS_DINODE_FMT_BTREE && !bma -> cur )
4200
4198
bma -> cur = xfs_bmbt_init_cursor (mp , bma -> tp , bma -> ip , whichfork );
4201
4199
/*
4202
4200
* Bump the number of extents we've allocated
@@ -4269,7 +4267,7 @@ xfs_bmapi_convert_unwritten(
4269
4267
* Modify (by adding) the state flag, if writing.
4270
4268
*/
4271
4269
ASSERT (mval -> br_blockcount <= len );
4272
- if (( ifp -> if_flags & XFS_IFBROOT ) && !bma -> cur ) {
4270
+ if (ifp -> if_format == XFS_DINODE_FMT_BTREE && !bma -> cur ) {
4273
4271
bma -> cur = xfs_bmbt_init_cursor (bma -> ip -> i_mount , bma -> tp ,
4274
4272
bma -> ip , whichfork );
4275
4273
}
@@ -4732,7 +4730,7 @@ xfs_bmapi_remap(
4732
4730
ip -> i_nblocks += len ;
4733
4731
xfs_trans_log_inode (tp , ip , XFS_ILOG_CORE );
4734
4732
4735
- if (ifp -> if_flags & XFS_IFBROOT ) {
4733
+ if (ifp -> if_format == XFS_DINODE_FMT_BTREE ) {
4736
4734
cur = xfs_bmbt_init_cursor (mp , tp , ip , whichfork );
4737
4735
cur -> bc_ino .flags = 0 ;
4738
4736
}
@@ -5411,7 +5409,7 @@ __xfs_bunmapi(
5411
5409
end -- ;
5412
5410
5413
5411
logflags = 0 ;
5414
- if (ifp -> if_flags & XFS_IFBROOT ) {
5412
+ if (ifp -> if_format == XFS_DINODE_FMT_BTREE ) {
5415
5413
ASSERT (ifp -> if_format == XFS_DINODE_FMT_BTREE );
5416
5414
cur = xfs_bmbt_init_cursor (mp , tp , ip , whichfork );
5417
5415
cur -> bc_ino .flags = 0 ;
@@ -5885,7 +5883,7 @@ xfs_bmap_collapse_extents(
5885
5883
if (error )
5886
5884
return error ;
5887
5885
5888
- if (ifp -> if_flags & XFS_IFBROOT ) {
5886
+ if (ifp -> if_format == XFS_DINODE_FMT_BTREE ) {
5889
5887
cur = xfs_bmbt_init_cursor (mp , tp , ip , whichfork );
5890
5888
cur -> bc_ino .flags = 0 ;
5891
5889
}
@@ -6000,7 +5998,7 @@ xfs_bmap_insert_extents(
6000
5998
if (error )
6001
5999
return error ;
6002
6000
6003
- if (ifp -> if_flags & XFS_IFBROOT ) {
6001
+ if (ifp -> if_format == XFS_DINODE_FMT_BTREE ) {
6004
6002
cur = xfs_bmbt_init_cursor (mp , tp , ip , whichfork );
6005
6003
cur -> bc_ino .flags = 0 ;
6006
6004
}
@@ -6115,7 +6113,7 @@ xfs_bmap_split_extent(
6115
6113
new .br_blockcount = got .br_blockcount - gotblkcnt ;
6116
6114
new .br_state = got .br_state ;
6117
6115
6118
- if (ifp -> if_flags & XFS_IFBROOT ) {
6116
+ if (ifp -> if_format == XFS_DINODE_FMT_BTREE ) {
6119
6117
cur = xfs_bmbt_init_cursor (mp , tp , ip , whichfork );
6120
6118
cur -> bc_ino .flags = 0 ;
6121
6119
error = xfs_bmbt_lookup_eq (cur , & got , & i );
0 commit comments