Lines Matching refs:bh
26 affs_insert_hash(struct inode *dir, struct buffer_head *bh) in affs_insert_hash() argument
33 ino = bh->b_blocknr; in affs_insert_hash()
34 offset = affs_hash_name(sb, AFFS_TAIL(sb, bh)->name + 1, AFFS_TAIL(sb, bh)->name[0]); in affs_insert_hash()
50 AFFS_TAIL(sb, bh)->parent = cpu_to_be32(dir->i_ino); in affs_insert_hash()
51 AFFS_TAIL(sb, bh)->hash_chain = 0; in affs_insert_hash()
52 affs_fix_checksum(sb, bh); in affs_insert_hash()
78 struct buffer_head *bh; in affs_remove_hash() local
89 bh = affs_bread(sb, dir->i_ino); in affs_remove_hash()
90 if (!bh) in affs_remove_hash()
94 hash_ino = be32_to_cpu(AFFS_HEAD(bh)->table[offset]); in affs_remove_hash()
98 if (dir->i_ino == bh->b_blocknr) in affs_remove_hash()
99 AFFS_HEAD(bh)->table[offset] = ino; in affs_remove_hash()
101 AFFS_TAIL(sb, bh)->hash_chain = ino; in affs_remove_hash()
102 affs_adjust_checksum(bh, be32_to_cpu(ino) - hash_ino); in affs_remove_hash()
103 mark_buffer_dirty_inode(bh, dir); in affs_remove_hash()
108 affs_brelse(bh); in affs_remove_hash()
109 bh = affs_bread(sb, hash_ino); in affs_remove_hash()
110 if (!bh) in affs_remove_hash()
112 hash_ino = be32_to_cpu(AFFS_TAIL(sb, bh)->hash_chain); in affs_remove_hash()
115 affs_brelse(bh); in affs_remove_hash()
146 struct buffer_head *bh, *link_bh = NULL; in affs_remove_link() local
152 bh = affs_bread(sb, inode->i_ino); in affs_remove_link()
153 if (!bh) in affs_remove_link()
161 link_ino = be32_to_cpu(AFFS_TAIL(sb, bh)->link_chain); in affs_remove_link()
185 memcpy(AFFS_TAIL(sb, bh)->name, AFFS_TAIL(sb, link_bh)->name, 32); in affs_remove_link()
186 retval = affs_insert_hash(dir, bh); in affs_remove_link()
191 mark_buffer_dirty_inode(bh, inode); in affs_remove_link()
201 while ((ino = be32_to_cpu(AFFS_TAIL(sb, bh)->link_chain)) != 0) { in affs_remove_link()
204 AFFS_TAIL(sb, bh)->link_chain = ino2; in affs_remove_link()
205 affs_adjust_checksum(bh, be32_to_cpu(ino2) - link_ino); in affs_remove_link()
206 mark_buffer_dirty_inode(bh, inode); in affs_remove_link()
209 switch (be32_to_cpu(AFFS_TAIL(sb, bh)->stype)) { in affs_remove_link()
214 if (!AFFS_TAIL(sb, bh)->link_chain) in affs_remove_link()
220 affs_brelse(bh); in affs_remove_link()
221 bh = affs_bread(sb, ino); in affs_remove_link()
222 if (!bh) in affs_remove_link()
228 affs_brelse(bh); in affs_remove_link()
237 struct buffer_head *bh; in affs_empty_dir() local
241 bh = affs_bread(sb, inode->i_ino); in affs_empty_dir()
242 if (!bh) in affs_empty_dir()
247 if (AFFS_HEAD(bh)->table[size]) in affs_empty_dir()
251 affs_brelse(bh); in affs_empty_dir()
271 struct buffer_head *bh = NULL; in affs_remove_header() local
284 bh = affs_bread(sb, (u32)(long)dentry->d_fsdata); in affs_remove_header()
285 if (!bh) in affs_remove_header()
290 switch (be32_to_cpu(AFFS_TAIL(sb, bh)->stype)) { in affs_remove_header()
306 retval = affs_remove_hash(dir, bh); in affs_remove_header()
309 mark_buffer_dirty_inode(bh, inode); in affs_remove_header()
322 affs_brelse(bh); in affs_remove_header()
339 affs_checksum_block(struct super_block *sb, struct buffer_head *bh) in affs_checksum_block() argument
341 __be32 *ptr = (__be32 *)bh->b_data; in affs_checksum_block()
357 affs_fix_checksum(struct super_block *sb, struct buffer_head *bh) in affs_fix_checksum() argument
360 __be32 *ptr = (__be32 *)bh->b_data; in affs_fix_checksum()