Lines Matching refs:ext_bh
300 struct buffer_head *ext_bh; in affs_get_block() local
319 ext_bh = affs_get_extblock(inode, ext); in affs_get_block()
320 if (IS_ERR(ext_bh)) in affs_get_block()
322 map_bh(bh_result, sb, (sector_t)be32_to_cpu(AFFS_BLOCK(sb, ext_bh, block))); in affs_get_block()
325 u32 blocknr = affs_alloc_block(inode, ext_bh->b_blocknr); in affs_get_block()
337 AFFS_BLOCK(sb, ext_bh, block) = cpu_to_be32(blocknr); in affs_get_block()
338 AFFS_HEAD(ext_bh)->block_count = cpu_to_be32(block + 1); in affs_get_block()
339 affs_adjust_checksum(ext_bh, blocknr - bh_result->b_blocknr + 1); in affs_get_block()
344 u32 tmp = be32_to_cpu(AFFS_HEAD(ext_bh)->first_data); in affs_get_block()
347 AFFS_HEAD(ext_bh)->first_data = cpu_to_be32(blocknr); in affs_get_block()
348 affs_adjust_checksum(ext_bh, blocknr - tmp); in affs_get_block()
352 affs_brelse(ext_bh); in affs_get_block()
364 return PTR_ERR(ext_bh); in affs_get_block()
366 brelse(ext_bh); in affs_get_block()
870 struct buffer_head *ext_bh; in affs_truncate() local
901 ext_bh = affs_get_extblock(inode, ext); in affs_truncate()
902 if (IS_ERR(ext_bh)) { in affs_truncate()
905 ext, PTR_ERR(ext_bh)); in affs_truncate()
921 ext_key = be32_to_cpu(AFFS_TAIL(sb, ext_bh)->extension); in affs_truncate()
930 AFFS_HEAD(ext_bh)->first_data = 0; in affs_truncate()
931 AFFS_HEAD(ext_bh)->block_count = cpu_to_be32(i); in affs_truncate()
936 affs_free_block(sb, be32_to_cpu(AFFS_BLOCK(sb, ext_bh, i))); in affs_truncate()
937 AFFS_BLOCK(sb, ext_bh, i) = 0; in affs_truncate()
939 AFFS_TAIL(sb, ext_bh)->extension = 0; in affs_truncate()
940 affs_fix_checksum(sb, ext_bh); in affs_truncate()
941 mark_buffer_dirty_inode(ext_bh, inode); in affs_truncate()
942 affs_brelse(ext_bh); in affs_truncate()
969 ext_bh = affs_bread(sb, ext_key); in affs_truncate()
974 affs_free_block(sb, be32_to_cpu(AFFS_BLOCK(sb, ext_bh, i))); in affs_truncate()
976 ext_key = be32_to_cpu(AFFS_TAIL(sb, ext_bh)->extension); in affs_truncate()
977 affs_brelse(ext_bh); in affs_truncate()