aboutsummaryrefslogtreecommitdiff
path: root/lib/ext2fs/rw_bitmaps.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2009-09-07 21:15:12 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-09-07 21:15:12 -0400
commit732c8cd58ff30ffae0d3276c411a08920717a46c (patch)
treede130d62127f09d3c8a975d3b5b7fd2875209afa /lib/ext2fs/rw_bitmaps.c
parent24a117abd0340d247befbf7687ffb70547fdf218 (diff)
downloade2fsprogs-732c8cd58ff30ffae0d3276c411a08920717a46c.tar.gz
Use accessor functions fields for bg_flags in the block group descriptors
Signed-off-by: Valerie Aurora Henson <vaurora@redhat.com> Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'lib/ext2fs/rw_bitmaps.c')
-rw-r--r--lib/ext2fs/rw_bitmaps.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/ext2fs/rw_bitmaps.c b/lib/ext2fs/rw_bitmaps.c
index 0792c5b3..08d3a5e9 100644
--- a/lib/ext2fs/rw_bitmaps.c
+++ b/lib/ext2fs/rw_bitmaps.c
@@ -70,8 +70,8 @@ static errcode_t write_bitmaps(ext2_filsys fs, int do_inode, int do_block)
if (!do_block)
goto skip_block_bitmap;
- if (csum_flag && fs->group_desc[i].bg_flags &
- EXT2_BG_BLOCK_UNINIT)
+ if (csum_flag && ext2fs_bg_flag_test(fs, i, EXT2_BG_BLOCK_UNINIT)
+ )
goto skip_this_block_bitmap;
retval = ext2fs_get_block_bitmap_range2(fs->block_map,
@@ -102,8 +102,8 @@ static errcode_t write_bitmaps(ext2_filsys fs, int do_inode, int do_block)
if (!do_inode)
continue;
- if (csum_flag && fs->group_desc[i].bg_flags &
- EXT2_BG_INODE_UNINIT)
+ if (csum_flag && ext2fs_bg_flag_test(fs, i, EXT2_BG_INODE_UNINIT)
+ )
goto skip_this_inode_bitmap;
retval = ext2fs_get_inode_bitmap_range2(fs->inode_map,
@@ -236,8 +236,8 @@ static errcode_t read_bitmaps(ext2_filsys fs, int do_inode, int do_block)
for (i = 0; i < fs->group_desc_count; i++) {
if (block_bitmap) {
blk = fs->group_desc[i].bg_block_bitmap;
- if (csum_flag && fs->group_desc[i].bg_flags &
- EXT2_BG_BLOCK_UNINIT &&
+ if (csum_flag &&
+ ext2fs_bg_flag_test(fs, i, EXT2_BG_BLOCK_UNINIT) &&
ext2fs_group_desc_csum_verify(fs, i))
blk = 0;
if (blk) {
@@ -258,8 +258,8 @@ static errcode_t read_bitmaps(ext2_filsys fs, int do_inode, int do_block)
}
if (inode_bitmap) {
blk = fs->group_desc[i].bg_inode_bitmap;
- if (csum_flag && fs->group_desc[i].bg_flags &
- EXT2_BG_INODE_UNINIT &&
+ if (csum_flag &&
+ ext2fs_bg_flag_test(fs, i, EXT2_BG_INODE_UNINIT) &&
ext2fs_group_desc_csum_verify(fs, i))
blk = 0;
if (blk) {