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