Lines Matching refs:bh
27 affs_insert_hash(struct inode *dir, struct buffer_head *bh) in affs_insert_hash() argument
34 ino = bh->b_blocknr; in affs_insert_hash()
35 offset = affs_hash_name(sb, AFFS_TAIL(sb, bh)->name + 1, AFFS_TAIL(sb, bh)->name[0]); in affs_insert_hash()
51 AFFS_TAIL(sb, bh)->parent = cpu_to_be32(dir->i_ino); in affs_insert_hash()
52 AFFS_TAIL(sb, bh)->hash_chain = 0; in affs_insert_hash()
53 affs_fix_checksum(sb, bh); in affs_insert_hash()
79 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()
153 struct buffer_head *bh = NULL, *link_bh = NULL; in affs_remove_link() local
159 bh = affs_bread(sb, inode->i_ino); in affs_remove_link()
160 if (!bh) in affs_remove_link()
168 link_ino = be32_to_cpu(AFFS_TAIL(sb, bh)->link_chain); in affs_remove_link()
186 memcpy(AFFS_TAIL(sb, bh)->name, AFFS_TAIL(sb, link_bh)->name, 32); in affs_remove_link()
187 retval = affs_insert_hash(dir, bh); in affs_remove_link()
190 mark_buffer_dirty_inode(bh, inode); in affs_remove_link()
200 while ((ino = be32_to_cpu(AFFS_TAIL(sb, bh)->link_chain)) != 0) { in affs_remove_link()
203 AFFS_TAIL(sb, bh)->link_chain = ino2; in affs_remove_link()
204 affs_adjust_checksum(bh, be32_to_cpu(ino2) - link_ino); in affs_remove_link()
205 mark_buffer_dirty_inode(bh, inode); in affs_remove_link()
208 switch (be32_to_cpu(AFFS_TAIL(sb, bh)->stype)) { in affs_remove_link()
213 if (!AFFS_TAIL(sb, bh)->link_chain) in affs_remove_link()
219 affs_brelse(bh); in affs_remove_link()
220 bh = affs_bread(sb, ino); in affs_remove_link()
221 if (!bh) in affs_remove_link()
227 affs_brelse(bh); in affs_remove_link()
236 struct buffer_head *bh; in affs_empty_dir() local
240 bh = affs_bread(sb, inode->i_ino); in affs_empty_dir()
241 if (!bh) in affs_empty_dir()
246 if (AFFS_HEAD(bh)->table[size]) in affs_empty_dir()
250 affs_brelse(bh); in affs_empty_dir()
270 struct buffer_head *bh = NULL; in affs_remove_header() local
283 bh = affs_bread(sb, (u32)(long)dentry->d_fsdata); in affs_remove_header()
284 if (!bh) in affs_remove_header()
289 switch (be32_to_cpu(AFFS_TAIL(sb, bh)->stype)) { in affs_remove_header()
305 retval = affs_remove_hash(dir, bh); in affs_remove_header()
308 mark_buffer_dirty_inode(bh, inode); in affs_remove_header()
321 affs_brelse(bh); in affs_remove_header()
338 affs_checksum_block(struct super_block *sb, struct buffer_head *bh) in affs_checksum_block() argument
340 __be32 *ptr = (__be32 *)bh->b_data; in affs_checksum_block()
356 affs_fix_checksum(struct super_block *sb, struct buffer_head *bh) in affs_fix_checksum() argument
359 __be32 *ptr = (__be32 *)bh->b_data; in affs_fix_checksum()