Lines Matching refs:bh
23 affs_insert_hash(struct inode *dir, struct buffer_head *bh) in affs_insert_hash() argument
30 ino = bh->b_blocknr; in affs_insert_hash()
31 offset = affs_hash_name(sb, AFFS_TAIL(sb, bh)->name + 1, AFFS_TAIL(sb, bh)->name[0]); in affs_insert_hash()
47 AFFS_TAIL(sb, bh)->parent = cpu_to_be32(dir->i_ino); in affs_insert_hash()
48 AFFS_TAIL(sb, bh)->hash_chain = 0; in affs_insert_hash()
49 affs_fix_checksum(sb, bh); in affs_insert_hash()
75 struct buffer_head *bh; in affs_remove_hash() local
86 bh = affs_bread(sb, dir->i_ino); in affs_remove_hash()
87 if (!bh) in affs_remove_hash()
91 hash_ino = be32_to_cpu(AFFS_HEAD(bh)->table[offset]); in affs_remove_hash()
95 if (dir->i_ino == bh->b_blocknr) in affs_remove_hash()
96 AFFS_HEAD(bh)->table[offset] = ino; in affs_remove_hash()
98 AFFS_TAIL(sb, bh)->hash_chain = ino; in affs_remove_hash()
99 affs_adjust_checksum(bh, be32_to_cpu(ino) - hash_ino); in affs_remove_hash()
100 mark_buffer_dirty_inode(bh, dir); in affs_remove_hash()
105 affs_brelse(bh); in affs_remove_hash()
106 bh = affs_bread(sb, hash_ino); in affs_remove_hash()
107 if (!bh) in affs_remove_hash()
109 hash_ino = be32_to_cpu(AFFS_TAIL(sb, bh)->hash_chain); in affs_remove_hash()
112 affs_brelse(bh); in affs_remove_hash()
143 struct buffer_head *bh = NULL, *link_bh = NULL; in affs_remove_link() local
149 bh = affs_bread(sb, inode->i_ino); in affs_remove_link()
150 if (!bh) in affs_remove_link()
158 link_ino = be32_to_cpu(AFFS_TAIL(sb, bh)->link_chain); in affs_remove_link()
182 memcpy(AFFS_TAIL(sb, bh)->name, AFFS_TAIL(sb, link_bh)->name, 32); in affs_remove_link()
183 retval = affs_insert_hash(dir, bh); in affs_remove_link()
188 mark_buffer_dirty_inode(bh, inode); in affs_remove_link()
198 while ((ino = be32_to_cpu(AFFS_TAIL(sb, bh)->link_chain)) != 0) { in affs_remove_link()
201 AFFS_TAIL(sb, bh)->link_chain = ino2; in affs_remove_link()
202 affs_adjust_checksum(bh, be32_to_cpu(ino2) - link_ino); in affs_remove_link()
203 mark_buffer_dirty_inode(bh, inode); in affs_remove_link()
206 switch (be32_to_cpu(AFFS_TAIL(sb, bh)->stype)) { in affs_remove_link()
211 if (!AFFS_TAIL(sb, bh)->link_chain) in affs_remove_link()
217 affs_brelse(bh); in affs_remove_link()
218 bh = affs_bread(sb, ino); in affs_remove_link()
219 if (!bh) in affs_remove_link()
225 affs_brelse(bh); in affs_remove_link()
234 struct buffer_head *bh; in affs_empty_dir() local
238 bh = affs_bread(sb, inode->i_ino); in affs_empty_dir()
239 if (!bh) in affs_empty_dir()
244 if (AFFS_HEAD(bh)->table[size]) in affs_empty_dir()
248 affs_brelse(bh); in affs_empty_dir()
268 struct buffer_head *bh = NULL; in affs_remove_header() local
281 bh = affs_bread(sb, (u32)(long)dentry->d_fsdata); in affs_remove_header()
282 if (!bh) in affs_remove_header()
287 switch (be32_to_cpu(AFFS_TAIL(sb, bh)->stype)) { in affs_remove_header()
303 retval = affs_remove_hash(dir, bh); in affs_remove_header()
306 mark_buffer_dirty_inode(bh, inode); in affs_remove_header()
319 affs_brelse(bh); in affs_remove_header()
336 affs_checksum_block(struct super_block *sb, struct buffer_head *bh) in affs_checksum_block() argument
338 __be32 *ptr = (__be32 *)bh->b_data; in affs_checksum_block()
354 affs_fix_checksum(struct super_block *sb, struct buffer_head *bh) in affs_fix_checksum() argument
357 __be32 *ptr = (__be32 *)bh->b_data; in affs_fix_checksum()