Lines Matching refs:ext_bh
299 struct buffer_head *ext_bh;
318 ext_bh = affs_get_extblock(inode, ext);
319 if (IS_ERR(ext_bh))
321 map_bh(bh_result, sb, (sector_t)be32_to_cpu(AFFS_BLOCK(sb, ext_bh, block)));
324 u32 blocknr = affs_alloc_block(inode, ext_bh->b_blocknr);
336 AFFS_BLOCK(sb, ext_bh, block) = cpu_to_be32(blocknr);
337 AFFS_HEAD(ext_bh)->block_count = cpu_to_be32(block + 1);
338 affs_adjust_checksum(ext_bh, blocknr - bh_result->b_blocknr + 1);
343 u32 tmp = be32_to_cpu(AFFS_HEAD(ext_bh)->first_data);
346 AFFS_HEAD(ext_bh)->first_data = cpu_to_be32(blocknr);
347 affs_adjust_checksum(ext_bh, blocknr - tmp);
351 affs_brelse(ext_bh);
363 return PTR_ERR(ext_bh);
365 brelse(ext_bh);
866 struct buffer_head *ext_bh;
897 ext_bh = affs_get_extblock(inode, ext);
898 if (IS_ERR(ext_bh)) {
901 ext, PTR_ERR(ext_bh));
917 ext_key = be32_to_cpu(AFFS_TAIL(sb, ext_bh)->extension);
926 AFFS_HEAD(ext_bh)->first_data = 0;
927 AFFS_HEAD(ext_bh)->block_count = cpu_to_be32(i);
932 affs_free_block(sb, be32_to_cpu(AFFS_BLOCK(sb, ext_bh, i)));
933 AFFS_BLOCK(sb, ext_bh, i) = 0;
935 AFFS_TAIL(sb, ext_bh)->extension = 0;
936 affs_fix_checksum(sb, ext_bh);
937 mark_buffer_dirty_inode(ext_bh, inode);
938 affs_brelse(ext_bh);
965 ext_bh = affs_bread(sb, ext_key);
970 affs_free_block(sb, be32_to_cpu(AFFS_BLOCK(sb, ext_bh, i)));
972 ext_key = be32_to_cpu(AFFS_TAIL(sb, ext_bh)->extension);
973 affs_brelse(ext_bh);