tag | line | file | source code |
bh | 24 | fs/block_dev.c | struct buffer_head * bh; |
bh | 39 | fs/block_dev.c | bh = getblk(dev, block, BLOCK_SIZE); |
bh | 41 | fs/block_dev.c | bh = breada(dev,block,block+1,block+2,-1); |
bh | 43 | fs/block_dev.c | if (!bh) |
bh | 45 | fs/block_dev.c | p = offset + bh->b_data; |
bh | 53 | fs/block_dev.c | bh->b_uptodate = 1; |
bh | 54 | fs/block_dev.c | bh->b_dirt = 1; |
bh | 55 | fs/block_dev.c | brelse(bh); |
bh | 60 | fs/buffer.c | void __wait_on_buffer(struct buffer_head * bh) |
bh | 64 | fs/buffer.c | add_wait_queue(&bh->b_wait, &wait); |
bh | 67 | fs/buffer.c | if (bh->b_lock) { |
bh | 71 | fs/buffer.c | remove_wait_queue(&bh->b_wait, &wait); |
bh | 78 | fs/buffer.c | struct buffer_head * bh; |
bh | 80 | fs/buffer.c | bh = free_list; |
bh | 81 | fs/buffer.c | for (i = nr_buffers*2 ; i-- > 0 ; bh = bh->b_next_free) { |
bh | 82 | fs/buffer.c | if (dev && bh->b_dev != dev) |
bh | 84 | fs/buffer.c | if (bh->b_lock) |
bh | 86 | fs/buffer.c | if (!bh->b_dirt) |
bh | 88 | fs/buffer.c | ll_rw_block(WRITE, 1, &bh); |
bh | 114 | fs/buffer.c | struct buffer_head * bh; |
bh | 116 | fs/buffer.c | bh = free_list; |
bh | 117 | fs/buffer.c | for (i = nr_buffers*2 ; --i > 0 ; bh = bh->b_next_free) { |
bh | 118 | fs/buffer.c | if (bh->b_dev != dev) |
bh | 120 | fs/buffer.c | wait_on_buffer(bh); |
bh | 121 | fs/buffer.c | if (bh->b_dev == dev) |
bh | 122 | fs/buffer.c | bh->b_uptodate = bh->b_dirt = 0; |
bh | 143 | fs/buffer.c | struct buffer_head * bh; |
bh | 147 | fs/buffer.c | if (!(bh = getblk(dev,0,1024))) |
bh | 149 | fs/buffer.c | i = floppy_change(bh); |
bh | 150 | fs/buffer.c | brelse(bh); |
bh | 190 | fs/buffer.c | static inline void remove_from_hash_queue(struct buffer_head * bh) |
bh | 192 | fs/buffer.c | if (bh->b_next) |
bh | 193 | fs/buffer.c | bh->b_next->b_prev = bh->b_prev; |
bh | 194 | fs/buffer.c | if (bh->b_prev) |
bh | 195 | fs/buffer.c | bh->b_prev->b_next = bh->b_next; |
bh | 196 | fs/buffer.c | if (hash(bh->b_dev,bh->b_blocknr) == bh) |
bh | 197 | fs/buffer.c | hash(bh->b_dev,bh->b_blocknr) = bh->b_next; |
bh | 198 | fs/buffer.c | bh->b_next = bh->b_prev = NULL; |
bh | 201 | fs/buffer.c | static inline void remove_from_free_list(struct buffer_head * bh) |
bh | 203 | fs/buffer.c | if (!(bh->b_prev_free) || !(bh->b_next_free)) |
bh | 205 | fs/buffer.c | bh->b_prev_free->b_next_free = bh->b_next_free; |
bh | 206 | fs/buffer.c | bh->b_next_free->b_prev_free = bh->b_prev_free; |
bh | 207 | fs/buffer.c | if (free_list == bh) |
bh | 208 | fs/buffer.c | free_list = bh->b_next_free; |
bh | 209 | fs/buffer.c | bh->b_next_free = bh->b_prev_free = NULL; |
bh | 212 | fs/buffer.c | static inline void remove_from_queues(struct buffer_head * bh) |
bh | 214 | fs/buffer.c | remove_from_hash_queue(bh); |
bh | 215 | fs/buffer.c | remove_from_free_list(bh); |
bh | 218 | fs/buffer.c | static inline void put_first_free(struct buffer_head * bh) |
bh | 220 | fs/buffer.c | if (!bh || (bh == free_list)) |
bh | 222 | fs/buffer.c | remove_from_free_list(bh); |
bh | 224 | fs/buffer.c | bh->b_next_free = free_list; |
bh | 225 | fs/buffer.c | bh->b_prev_free = free_list->b_prev_free; |
bh | 226 | fs/buffer.c | free_list->b_prev_free->b_next_free = bh; |
bh | 227 | fs/buffer.c | free_list->b_prev_free = bh; |
bh | 228 | fs/buffer.c | free_list = bh; |
bh | 231 | fs/buffer.c | static inline void put_last_free(struct buffer_head * bh) |
bh | 233 | fs/buffer.c | if (!bh) |
bh | 235 | fs/buffer.c | if (bh == free_list) { |
bh | 236 | fs/buffer.c | free_list = bh->b_next_free; |
bh | 239 | fs/buffer.c | remove_from_free_list(bh); |
bh | 241 | fs/buffer.c | bh->b_next_free = free_list; |
bh | 242 | fs/buffer.c | bh->b_prev_free = free_list->b_prev_free; |
bh | 243 | fs/buffer.c | free_list->b_prev_free->b_next_free = bh; |
bh | 244 | fs/buffer.c | free_list->b_prev_free = bh; |
bh | 247 | fs/buffer.c | static inline void insert_into_queues(struct buffer_head * bh) |
bh | 250 | fs/buffer.c | bh->b_next_free = free_list; |
bh | 251 | fs/buffer.c | bh->b_prev_free = free_list->b_prev_free; |
bh | 252 | fs/buffer.c | free_list->b_prev_free->b_next_free = bh; |
bh | 253 | fs/buffer.c | free_list->b_prev_free = bh; |
bh | 255 | fs/buffer.c | bh->b_prev = NULL; |
bh | 256 | fs/buffer.c | bh->b_next = NULL; |
bh | 257 | fs/buffer.c | if (!bh->b_dev) |
bh | 259 | fs/buffer.c | bh->b_next = hash(bh->b_dev,bh->b_blocknr); |
bh | 260 | fs/buffer.c | hash(bh->b_dev,bh->b_blocknr) = bh; |
bh | 261 | fs/buffer.c | if (bh->b_next) |
bh | 262 | fs/buffer.c | bh->b_next->b_prev = bh; |
bh | 290 | fs/buffer.c | struct buffer_head * bh; |
bh | 293 | fs/buffer.c | if (!(bh=find_buffer(dev,block,size))) |
bh | 295 | fs/buffer.c | bh->b_count++; |
bh | 296 | fs/buffer.c | wait_on_buffer(bh); |
bh | 297 | fs/buffer.c | if (bh->b_dev == dev && bh->b_blocknr == block && bh->b_size == size) |
bh | 298 | fs/buffer.c | return bh; |
bh | 299 | fs/buffer.c | bh->b_count--; |
bh | 313 | fs/buffer.c | #define BADNESS(bh) (((bh)->b_dirt<<1)+(bh)->b_lock) |
bh | 316 | fs/buffer.c | struct buffer_head * bh, * tmp; |
bh | 321 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
bh | 322 | fs/buffer.c | if (bh) { |
bh | 323 | fs/buffer.c | if (bh->b_uptodate && !bh->b_dirt) |
bh | 324 | fs/buffer.c | put_last_free(bh); |
bh | 325 | fs/buffer.c | return bh; |
bh | 335 | fs/buffer.c | bh = NULL; |
bh | 342 | fs/buffer.c | if (!bh || BADNESS(tmp)<BADNESS(bh)) { |
bh | 343 | fs/buffer.c | bh = tmp; |
bh | 353 | fs/buffer.c | if (!bh && nr_free_pages > 5) { |
bh | 359 | fs/buffer.c | if (!bh) { |
bh | 363 | fs/buffer.c | wait_on_buffer(bh); |
bh | 364 | fs/buffer.c | if (bh->b_count || bh->b_size != size) |
bh | 366 | fs/buffer.c | if (bh->b_dirt) { |
bh | 376 | fs/buffer.c | bh->b_count=1; |
bh | 377 | fs/buffer.c | bh->b_dirt=0; |
bh | 378 | fs/buffer.c | bh->b_uptodate=0; |
bh | 379 | fs/buffer.c | remove_from_queues(bh); |
bh | 380 | fs/buffer.c | bh->b_dev=dev; |
bh | 381 | fs/buffer.c | bh->b_blocknr=block; |
bh | 382 | fs/buffer.c | insert_into_queues(bh); |
bh | 383 | fs/buffer.c | return bh; |
bh | 406 | fs/buffer.c | struct buffer_head * bh; |
bh | 408 | fs/buffer.c | if (!(bh = getblk(dev, block, size))) { |
bh | 413 | fs/buffer.c | if (bh->b_uptodate) |
bh | 414 | fs/buffer.c | return bh; |
bh | 415 | fs/buffer.c | ll_rw_block(READ, 1, &bh); |
bh | 416 | fs/buffer.c | wait_on_buffer(bh); |
bh | 417 | fs/buffer.c | if (bh->b_uptodate) |
bh | 418 | fs/buffer.c | return bh; |
bh | 419 | fs/buffer.c | brelse(bh); |
bh | 431 | fs/buffer.c | struct buffer_head * bh, *tmp; |
bh | 434 | fs/buffer.c | if (!(bh = getblk(dev, first, 1024))) { |
bh | 439 | fs/buffer.c | if (!bh->b_uptodate) |
bh | 440 | fs/buffer.c | ll_rw_block(READ, 1, &bh); |
bh | 450 | fs/buffer.c | wait_on_buffer(bh); |
bh | 451 | fs/buffer.c | if (bh->b_uptodate) |
bh | 452 | fs/buffer.c | return bh; |
bh | 453 | fs/buffer.c | brelse(bh); |
bh | 460 | fs/buffer.c | static void put_unused_buffer_head(struct buffer_head * bh) |
bh | 464 | fs/buffer.c | wait = ((volatile struct buffer_head *) bh)->b_wait; |
bh | 465 | fs/buffer.c | memset((void *) bh,0,sizeof(*bh)); |
bh | 466 | fs/buffer.c | ((volatile struct buffer_head *) bh)->b_wait = wait; |
bh | 467 | fs/buffer.c | bh->b_next_free = unused_list; |
bh | 468 | fs/buffer.c | unused_list = bh; |
bh | 474 | fs/buffer.c | struct buffer_head * bh; |
bh | 481 | fs/buffer.c | bh = (struct buffer_head *) page; |
bh | 482 | fs/buffer.c | while ((unsigned long) (bh+1) <= page+4096) { |
bh | 483 | fs/buffer.c | put_unused_buffer_head(bh); |
bh | 484 | fs/buffer.c | bh++; |
bh | 491 | fs/buffer.c | struct buffer_head * bh; |
bh | 496 | fs/buffer.c | bh = unused_list; |
bh | 497 | fs/buffer.c | unused_list = bh->b_next_free; |
bh | 498 | fs/buffer.c | bh->b_next_free = NULL; |
bh | 499 | fs/buffer.c | bh->b_data = NULL; |
bh | 500 | fs/buffer.c | bh->b_size = 0; |
bh | 501 | fs/buffer.c | return bh; |
bh | 523 | fs/buffer.c | struct buffer_head * bh[4]; |
bh | 535 | fs/buffer.c | bh[i] = NULL; |
bh | 537 | fs/buffer.c | bh[i] = getblk(dev, b[i], size); |
bh | 538 | fs/buffer.c | if (bh[i] && !bh[i]->b_uptodate) |
bh | 539 | fs/buffer.c | bhr[bhnum++] = bh[i]; |
bh | 546 | fs/buffer.c | if (bh[i]) { |
bh | 547 | fs/buffer.c | wait_on_buffer(bh[i]); |
bh | 548 | fs/buffer.c | if (bh[i]->b_uptodate) |
bh | 549 | fs/buffer.c | COPYBLK((unsigned long) bh[i]->b_data,address); |
bh | 550 | fs/buffer.c | brelse(bh[i]); |
bh | 566 | fs/buffer.c | struct buffer_head *bh, *tmp; |
bh | 578 | fs/buffer.c | bh = get_unused_buffer_head(); |
bh | 579 | fs/buffer.c | if (!bh) |
bh | 581 | fs/buffer.c | bh->b_this_page = tmp; |
bh | 582 | fs/buffer.c | tmp = bh; |
bh | 583 | fs/buffer.c | bh->b_data = (char * ) (page+i); |
bh | 584 | fs/buffer.c | bh->b_size = size; |
bh | 586 | fs/buffer.c | tmp = bh; |
bh | 604 | fs/buffer.c | tmp->b_this_page = bh; |
bh | 611 | fs/buffer.c | bh = tmp; |
bh | 612 | fs/buffer.c | while (bh) { |
bh | 613 | fs/buffer.c | tmp = bh; |
bh | 614 | fs/buffer.c | bh = bh->b_this_page; |
bh | 624 | fs/buffer.c | static int try_to_free(struct buffer_head * bh) |
bh | 629 | fs/buffer.c | page = (unsigned long) bh->b_data; |
bh | 633 | fs/buffer.c | tmp = bh; |
bh | 640 | fs/buffer.c | } while (tmp != bh); |
bh | 641 | fs/buffer.c | tmp = bh; |
bh | 648 | fs/buffer.c | } while (tmp != bh); |
bh | 663 | fs/buffer.c | struct buffer_head *bh; |
bh | 668 | fs/buffer.c | bh = free_list; |
bh | 670 | fs/buffer.c | for ( ; i-- > 0 ; bh = bh->b_next_free) { |
bh | 671 | fs/buffer.c | if (bh->b_count || !bh->b_this_page) |
bh | 673 | fs/buffer.c | if (bh->b_lock) |
bh | 677 | fs/buffer.c | wait_on_buffer(bh); |
bh | 678 | fs/buffer.c | if (bh->b_dirt) { |
bh | 679 | fs/buffer.c | ll_rw_block(WRITEA, 1, &bh); |
bh | 682 | fs/buffer.c | if (try_to_free(bh)) |
bh | 185 | fs/exec.c | struct buffer_head * bh; |
bh | 205 | fs/exec.c | if (!(bh = bread(inode->i_dev,bmap(inode,0),inode->i_sb->s_blocksize))) { |
bh | 213 | fs/exec.c | ex = *(struct exec *) bh->b_data; |
bh | 214 | fs/exec.c | brelse(bh); |
bh | 69 | fs/ext/dir.c | struct buffer_head * bh; |
bh | 78 | fs/ext/dir.c | bh = ext_bread(inode,(filp->f_pos)>>BLOCK_SIZE_BITS,0); |
bh | 79 | fs/ext/dir.c | if (!bh) { |
bh | 83 | fs/ext/dir.c | de = (struct ext_dir_entry *) (offset + bh->b_data); |
bh | 108 | fs/ext/dir.c | brelse(bh); |
bh | 115 | fs/ext/dir.c | brelse(bh); |
bh | 197 | fs/ext/file.c | struct buffer_head * bh; |
bh | 218 | fs/ext/file.c | bh = ext_getblk(inode,pos/BLOCK_SIZE,1); |
bh | 219 | fs/ext/file.c | if (!bh) { |
bh | 227 | fs/ext/file.c | if (c != BLOCK_SIZE && !bh->b_uptodate) { |
bh | 228 | fs/ext/file.c | ll_rw_block(READ, 1, &bh); |
bh | 229 | fs/ext/file.c | wait_on_buffer(bh); |
bh | 230 | fs/ext/file.c | if (!bh->b_uptodate) { |
bh | 231 | fs/ext/file.c | brelse(bh); |
bh | 237 | fs/ext/file.c | p = (pos % BLOCK_SIZE) + bh->b_data; |
bh | 246 | fs/ext/file.c | bh->b_uptodate = 1; |
bh | 247 | fs/ext/file.c | bh->b_dirt = 1; |
bh | 248 | fs/ext/file.c | brelse(bh); |
bh | 48 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 61 | fs/ext/freelists.c | bh = get_hash_table(sb->s_dev, block, sb->s_blocksize); |
bh | 62 | fs/ext/freelists.c | if (bh) |
bh | 63 | fs/ext/freelists.c | bh->b_dirt=0; |
bh | 64 | fs/ext/freelists.c | brelse(bh); |
bh | 92 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 131 | fs/ext/freelists.c | if (!(bh=getblk(sb->s_dev, j, sb->s_blocksize))) { |
bh | 135 | fs/ext/freelists.c | clear_block(bh->b_data); |
bh | 136 | fs/ext/freelists.c | bh->b_uptodate = 1; |
bh | 137 | fs/ext/freelists.c | bh->b_dirt = 1; |
bh | 138 | fs/ext/freelists.c | brelse(bh); |
bh | 149 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 161 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
bh | 165 | fs/ext/freelists.c | efb = (struct ext_free_block *) bh->b_data; |
bh | 168 | fs/ext/freelists.c | brelse (bh); |
bh | 183 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 221 | fs/ext/freelists.c | if (!(bh = bread(inode->i_dev, block, inode->i_sb->s_blocksize))) |
bh | 223 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) bh->b_data) + |
bh | 228 | fs/ext/freelists.c | inode->i_sb->u.ext_sb.s_firstfreeinodeblock = bh; |
bh | 302 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 321 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
bh | 325 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) bh->b_data) + |
bh | 329 | fs/ext/freelists.c | brelse (bh); |
bh | 59 | fs/ext/inode.c | struct buffer_head *bh; |
bh | 64 | fs/ext/inode.c | if (!(bh = bread(dev, 1, BLOCK_SIZE))) { |
bh | 70 | fs/ext/inode.c | es = (struct ext_super_block *) bh->b_data; |
bh | 82 | fs/ext/inode.c | brelse(bh); |
bh | 127 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 130 | fs/ext/inode.c | if (!(bh = bread(sb->s_dev, 1, BLOCK_SIZE))) { |
bh | 134 | fs/ext/inode.c | es = (struct ext_super_block *) bh->b_data; |
bh | 139 | fs/ext/inode.c | bh->b_dirt = 1; |
bh | 140 | fs/ext/inode.c | brelse (bh); |
bh | 163 | fs/ext/inode.c | static int block_bmap(struct buffer_head * bh, int nr) |
bh | 167 | fs/ext/inode.c | if (!bh) |
bh | 169 | fs/ext/inode.c | tmp = ((unsigned long *) bh->b_data)[nr]; |
bh | 170 | fs/ext/inode.c | brelse(bh); |
bh | 252 | fs/ext/inode.c | struct buffer_head * bh, int nr, int create) |
bh | 258 | fs/ext/inode.c | if (!bh) |
bh | 260 | fs/ext/inode.c | if (!bh->b_uptodate) { |
bh | 261 | fs/ext/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 262 | fs/ext/inode.c | wait_on_buffer(bh); |
bh | 263 | fs/ext/inode.c | if (!bh->b_uptodate) { |
bh | 264 | fs/ext/inode.c | brelse(bh); |
bh | 268 | fs/ext/inode.c | p = nr + (unsigned long *) bh->b_data; |
bh | 272 | fs/ext/inode.c | result = getblk(bh->b_dev, tmp, BLOCK_SIZE); |
bh | 274 | fs/ext/inode.c | brelse(bh); |
bh | 281 | fs/ext/inode.c | brelse(bh); |
bh | 286 | fs/ext/inode.c | brelse(bh); |
bh | 289 | fs/ext/inode.c | result = getblk(bh->b_dev, tmp, BLOCK_SIZE); |
bh | 296 | fs/ext/inode.c | bh->b_dirt = 1; |
bh | 297 | fs/ext/inode.c | brelse(bh); |
bh | 303 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 317 | fs/ext/inode.c | bh = inode_getblk(inode,9,create); |
bh | 318 | fs/ext/inode.c | return block_getblk(inode,bh,block,create); |
bh | 322 | fs/ext/inode.c | bh = inode_getblk(inode,10,create); |
bh | 323 | fs/ext/inode.c | bh = block_getblk(inode,bh,block>>8,create); |
bh | 324 | fs/ext/inode.c | return block_getblk(inode,bh,block & 255,create); |
bh | 327 | fs/ext/inode.c | bh = inode_getblk(inode,11,create); |
bh | 328 | fs/ext/inode.c | bh = block_getblk(inode,bh,block>>16,create); |
bh | 329 | fs/ext/inode.c | bh = block_getblk(inode,bh,(block>>8) & 255,create); |
bh | 330 | fs/ext/inode.c | return block_getblk(inode,bh,block & 255,create); |
bh | 335 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 337 | fs/ext/inode.c | bh = ext_getblk(inode,block,create); |
bh | 338 | fs/ext/inode.c | if (!bh || bh->b_uptodate) |
bh | 339 | fs/ext/inode.c | return bh; |
bh | 340 | fs/ext/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 341 | fs/ext/inode.c | wait_on_buffer(bh); |
bh | 342 | fs/ext/inode.c | if (bh->b_uptodate) |
bh | 343 | fs/ext/inode.c | return bh; |
bh | 344 | fs/ext/inode.c | brelse(bh); |
bh | 350 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 355 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
bh | 357 | fs/ext/inode.c | raw_inode = ((struct ext_inode *) bh->b_data) + |
bh | 370 | fs/ext/inode.c | brelse(bh); |
bh | 388 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 393 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
bh | 395 | fs/ext/inode.c | raw_inode = ((struct ext_inode *)bh->b_data) + |
bh | 407 | fs/ext/inode.c | bh->b_dirt=1; |
bh | 409 | fs/ext/inode.c | brelse(bh); |
bh | 92 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 105 | fs/ext/namei.c | bh = ext_bread(dir,0,0); |
bh | 106 | fs/ext/namei.c | if (!bh) |
bh | 113 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 115 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data) { |
bh | 116 | fs/ext/namei.c | brelse(bh); |
bh | 117 | fs/ext/namei.c | bh = NULL; |
bh | 118 | fs/ext/namei.c | bh = ext_bread(dir,offset>>BLOCK_SIZE_BITS,0); |
bh | 119 | fs/ext/namei.c | if (!bh) |
bh | 121 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 127 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
bh | 131 | fs/ext/namei.c | de = (struct ext_dir_entry *) (bh->b_data+BLOCK_SIZE); |
bh | 141 | fs/ext/namei.c | ((char *)de) + de->rec_len < BLOCK_SIZE+bh->b_data) |
bh | 146 | fs/ext/namei.c | return bh; |
bh | 153 | fs/ext/namei.c | brelse(bh); |
bh | 162 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 171 | fs/ext/namei.c | if (!(bh = ext_find_entry(dir,name,len,&de,NULL,NULL))) { |
bh | 176 | fs/ext/namei.c | brelse(bh); |
bh | 201 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 216 | fs/ext/namei.c | bh = ext_bread(dir,0,0); |
bh | 217 | fs/ext/namei.c | if (!bh) |
bh | 221 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 223 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data && offset < dir->i_size) { |
bh | 227 | fs/ext/namei.c | brelse(bh); |
bh | 228 | fs/ext/namei.c | bh = NULL; |
bh | 229 | fs/ext/namei.c | bh = ext_bread(dir,offset>>BLOCK_SIZE_BITS,0); |
bh | 230 | fs/ext/namei.c | if (!bh) |
bh | 232 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 250 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 252 | fs/ext/namei.c | brelse (bh); |
bh | 253 | fs/ext/namei.c | bh = NULL; |
bh | 257 | fs/ext/namei.c | bh = ext_bread(dir,offset>>BLOCK_SIZE_BITS,1); |
bh | 258 | fs/ext/namei.c | if (!bh) |
bh | 260 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 271 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
bh | 275 | fs/ext/namei.c | brelse (bh); |
bh | 295 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 297 | fs/ext/namei.c | return bh; |
bh | 302 | fs/ext/namei.c | brelse(bh); |
bh | 310 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 324 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 325 | fs/ext/namei.c | if (!bh) { |
bh | 333 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 334 | fs/ext/namei.c | brelse(bh); |
bh | 343 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 348 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 349 | fs/ext/namei.c | if (bh) { |
bh | 350 | fs/ext/namei.c | brelse(bh); |
bh | 381 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 382 | fs/ext/namei.c | if (!bh) { |
bh | 390 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 391 | fs/ext/namei.c | brelse(bh); |
bh | 400 | fs/ext/namei.c | struct buffer_head * bh, *dir_block; |
bh | 403 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 404 | fs/ext/namei.c | if (bh) { |
bh | 405 | fs/ext/namei.c | brelse(bh); |
bh | 446 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 447 | fs/ext/namei.c | if (!bh) { |
bh | 454 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 459 | fs/ext/namei.c | brelse(bh); |
bh | 469 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 472 | fs/ext/namei.c | if (inode->i_size < 2 * 12 || !(bh = ext_bread(inode,0,0))) { |
bh | 476 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 486 | fs/ext/namei.c | if ((void *) de >= (void *) (bh->b_data+BLOCK_SIZE)) { |
bh | 487 | fs/ext/namei.c | brelse(bh); |
bh | 488 | fs/ext/namei.c | bh = ext_bread(inode, offset >> BLOCK_SIZE_BITS,1); |
bh | 489 | fs/ext/namei.c | if (!bh) { |
bh | 493 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 500 | fs/ext/namei.c | brelse (bh); |
bh | 504 | fs/ext/namei.c | brelse(bh); |
bh | 510 | fs/ext/namei.c | brelse(bh); |
bh | 527 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 531 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
bh | 533 | fs/ext/namei.c | if (!bh) |
bh | 562 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 572 | fs/ext/namei.c | brelse(bh); |
bh | 580 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 585 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
bh | 586 | fs/ext/namei.c | if (!bh) |
bh | 605 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 613 | fs/ext/namei.c | brelse(bh); |
bh | 623 | fs/ext/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 649 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 650 | fs/ext/namei.c | if (bh) { |
bh | 654 | fs/ext/namei.c | brelse(bh); |
bh | 658 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 659 | fs/ext/namei.c | if (!bh) { |
bh | 667 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 668 | fs/ext/namei.c | brelse(bh); |
bh | 677 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 689 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 690 | fs/ext/namei.c | if (bh) { |
bh | 691 | fs/ext/namei.c | brelse(bh); |
bh | 696 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 697 | fs/ext/namei.c | if (!bh) { |
bh | 703 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 704 | fs/ext/namei.c | brelse(bh); |
bh | 51 | fs/ext/symlink.c | struct buffer_head * bh; |
bh | 72 | fs/ext/symlink.c | if (!(bh = ext_bread(inode, 0, 0))) { |
bh | 79 | fs/ext/symlink.c | error = open_namei(bh->b_data,flag,mode,res_inode,dir); |
bh | 81 | fs/ext/symlink.c | brelse(bh); |
bh | 87 | fs/ext/symlink.c | struct buffer_head * bh; |
bh | 97 | fs/ext/symlink.c | bh = ext_bread(inode, 0, 0); |
bh | 99 | fs/ext/symlink.c | if (!bh) |
bh | 102 | fs/ext/symlink.c | while (i<buflen && (c = bh->b_data[i])) { |
bh | 106 | fs/ext/symlink.c | brelse(bh); |
bh | 37 | fs/ext/truncate.c | struct buffer_head * bh; |
bh | 46 | fs/ext/truncate.c | bh = getblk(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 48 | fs/ext/truncate.c | brelse(bh); |
bh | 51 | fs/ext/truncate.c | if ((bh && bh->b_count != 1) || tmp != *p) { |
bh | 53 | fs/ext/truncate.c | brelse(bh); |
bh | 58 | fs/ext/truncate.c | brelse(bh); |
bh | 67 | fs/ext/truncate.c | struct buffer_head * bh; |
bh | 95 | fs/ext/truncate.c | bh = getblk(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 97 | fs/ext/truncate.c | brelse(bh); |
bh | 100 | fs/ext/truncate.c | if ((bh && bh->b_count != 1) || tmp != *ind) { |
bh | 102 | fs/ext/truncate.c | brelse(bh); |
bh | 107 | fs/ext/truncate.c | brelse(bh); |
bh | 115 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 126 | fs/ext2/balloc.c | bh = bread (sb->s_dev, gdp[desc].bg_block_bitmap, sb->s_blocksize); |
bh | 127 | fs/ext2/balloc.c | if (!bh) { |
bh | 135 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[bitmap_nr] = bh; |
bh | 226 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 251 | fs/ext2/balloc.c | bh = get_hash_table (sb->s_dev, block, sb->s_blocksize); |
bh | 252 | fs/ext2/balloc.c | if (bh) |
bh | 253 | fs/ext2/balloc.c | bh->b_dirt = 0; |
bh | 254 | fs/ext2/balloc.c | brelse (bh); |
bh | 260 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 261 | fs/ext2/balloc.c | if (!bh) { |
bh | 265 | fs/ext2/balloc.c | if (clear_bit (bit, bh->b_data)) |
bh | 280 | fs/ext2/balloc.c | bh->b_dirt = 1; |
bh | 297 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 344 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 345 | fs/ext2/balloc.c | if (!bh) { |
bh | 353 | fs/ext2/balloc.c | if (!test_bit(j, bh->b_data)) { |
bh | 363 | fs/ext2/balloc.c | lmap = ((((unsigned long *) bh->b_data)[j >> 5]) >> |
bh | 366 | fs/ext2/balloc.c | lmap |= (((unsigned long *) bh->b_data)[(j >> 5) + 1]) << |
bh | 392 | fs/ext2/balloc.c | p = ((char *) bh->b_data) + (j >> 3); |
bh | 395 | fs/ext2/balloc.c | k = (r - ((char *) bh->b_data)) << 3; |
bh | 400 | fs/ext2/balloc.c | k = find_next_zero_bit ((unsigned long *) bh->b_data, |
bh | 444 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 445 | fs/ext2/balloc.c | if (!bh) { |
bh | 449 | fs/ext2/balloc.c | r = find_first_zero_byte (bh->b_data, |
bh | 451 | fs/ext2/balloc.c | j = (r - bh->b_data) << 3; |
bh | 453 | fs/ext2/balloc.c | j = find_first_zero_bit ((unsigned long *) bh->b_data, |
bh | 468 | fs/ext2/balloc.c | if (set_bit (j, bh->b_data)) { |
bh | 472 | fs/ext2/balloc.c | bh->b_dirt = 1; |
bh | 484 | fs/ext2/balloc.c | if (!(bh = getblk (sb->s_dev, j, sb->s_blocksize))) { |
bh | 489 | fs/ext2/balloc.c | clear_block (bh->b_data, sb->s_blocksize); |
bh | 490 | fs/ext2/balloc.c | bh->b_uptodate = 1; |
bh | 491 | fs/ext2/balloc.c | bh->b_dirt = 1; |
bh | 492 | fs/ext2/balloc.c | brelse (bh); |
bh | 69 | fs/ext2/dir.c | struct ext2_dir_entry * de, struct buffer_head * bh, |
bh | 80 | fs/ext2/dir.c | else if (((char *) de - bh->b_data) + de->rec_len > |
bh | 97 | fs/ext2/dir.c | struct buffer_head * bh; |
bh | 106 | fs/ext2/dir.c | bh = ext2_bread (inode, (filp->f_pos) >> EXT2_BLOCK_SIZE_BITS(sb), 0, &err); |
bh | 107 | fs/ext2/dir.c | if (!bh) { |
bh | 111 | fs/ext2/dir.c | de = (struct ext2_dir_entry *) (offset + bh->b_data); |
bh | 114 | fs/ext2/dir.c | bh, offset)) { |
bh | 115 | fs/ext2/dir.c | brelse (bh); |
bh | 132 | fs/ext2/dir.c | brelse (bh); |
bh | 138 | fs/ext2/dir.c | brelse (bh); |
bh | 203 | fs/ext2/file.c | struct buffer_head * bh; |
bh | 227 | fs/ext2/file.c | bh = ext2_getblk (inode, pos / sb->s_blocksize, 1, &err); |
bh | 228 | fs/ext2/file.c | if (!bh) { |
bh | 239 | fs/ext2/file.c | if (c != sb->s_blocksize && !bh->b_uptodate) { |
bh | 240 | fs/ext2/file.c | ll_rw_block (READ, 1, &bh); |
bh | 241 | fs/ext2/file.c | wait_on_buffer (bh); |
bh | 242 | fs/ext2/file.c | if (!bh->b_uptodate) { |
bh | 243 | fs/ext2/file.c | brelse (bh); |
bh | 249 | fs/ext2/file.c | p = (pos % sb->s_blocksize) + bh->b_data; |
bh | 258 | fs/ext2/file.c | bh->b_uptodate = 1; |
bh | 259 | fs/ext2/file.c | bh->b_dirt = 1; |
bh | 260 | fs/ext2/file.c | brelse (bh); |
bh | 67 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 77 | fs/ext2/ialloc.c | bh = bread (sb->s_dev, gdp[desc].bg_inode_bitmap, sb->s_blocksize); |
bh | 78 | fs/ext2/ialloc.c | if (!bh) { |
bh | 84 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[bitmap_nr] = bh; |
bh | 166 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 172 | fs/ext2/ialloc.c | bh = bread (inode->i_sb->s_dev, inode_block, inode->i_sb->s_blocksize); |
bh | 173 | fs/ext2/ialloc.c | if (!bh) { |
bh | 177 | fs/ext2/ialloc.c | raw_inode = ((struct ext2_inode *) bh->b_data) + |
bh | 182 | fs/ext2/ialloc.c | bh->b_dirt = 1; |
bh | 183 | fs/ext2/ialloc.c | brelse (bh); |
bh | 189 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 233 | fs/ext2/ialloc.c | bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; |
bh | 234 | fs/ext2/ialloc.c | if (!bh) { |
bh | 238 | fs/ext2/ialloc.c | if (clear_bit (bit, bh->b_data)) |
bh | 256 | fs/ext2/ialloc.c | bh->b_dirt = 1; |
bh | 274 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 280 | fs/ext2/ialloc.c | bh = bread (inode->i_sb->s_dev, inode_block, inode->i_sb->s_blocksize); |
bh | 281 | fs/ext2/ialloc.c | if (!bh) { |
bh | 288 | fs/ext2/ialloc.c | raw_inode = ((struct ext2_inode *) bh->b_data) + |
bh | 294 | fs/ext2/ialloc.c | bh->b_dirt = 1; |
bh | 295 | fs/ext2/ialloc.c | brelse (bh); |
bh | 325 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 411 | fs/ext2/ialloc.c | bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; |
bh | 412 | fs/ext2/ialloc.c | if (!bh) { |
bh | 416 | fs/ext2/ialloc.c | if ((j = find_first_zero_bit ((unsigned long *) bh->b_data, |
bh | 419 | fs/ext2/ialloc.c | if (set_bit (j, bh->b_data)) { |
bh | 423 | fs/ext2/ialloc.c | bh->b_dirt = 1; |
bh | 76 | fs/ext2/inode.c | struct buffer_head * bh) |
bh | 85 | fs/ext2/inode.c | es = (struct ext2_super_block *) bh->b_data; |
bh | 108 | fs/ext2/inode.c | bh->b_dirt = 1; |
bh | 118 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 128 | fs/ext2/inode.c | if (!(bh = bread (dev, 1, BLOCK_SIZE))) { |
bh | 134 | fs/ext2/inode.c | es = (struct ext2_super_block *) bh->b_data; |
bh | 157 | fs/ext2/inode.c | s->u.ext2_sb.s_sbh = bh; |
bh | 167 | fs/ext2/inode.c | brelse (bh); |
bh | 177 | fs/ext2/inode.c | brelse (bh); |
bh | 181 | fs/ext2/inode.c | if (!convert_pre_02b_fs (s, bh)) { |
bh | 184 | fs/ext2/inode.c | brelse (bh); |
bh | 195 | fs/ext2/inode.c | brelse (bh); |
bh | 204 | fs/ext2/inode.c | brelse (bh); |
bh | 227 | fs/ext2/inode.c | brelse (bh); |
bh | 249 | fs/ext2/inode.c | brelse (bh); |
bh | 256 | fs/ext2/inode.c | bh->b_dirt = 1; |
bh | 289 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 308 | fs/ext2/inode.c | if (!(bh = bread (sb->s_dev, block, BLOCK_SIZE))) |
bh | 314 | fs/ext2/inode.c | memcpy (bh->b_data, es, BLOCK_SIZE); |
bh | 315 | fs/ext2/inode.c | bh ->b_dirt = 1; |
bh | 316 | fs/ext2/inode.c | brelse (bh); |
bh | 323 | fs/ext2/inode.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) |
bh | 326 | fs/ext2/inode.c | memcpy (bh->b_data, sb->u.ext2_sb.s_group_desc[j]->b_data, sb->s_blocksize); |
bh | 327 | fs/ext2/inode.c | bh ->b_dirt = 1; |
bh | 328 | fs/ext2/inode.c | brelse (bh); |
bh | 359 | fs/ext2/inode.c | static int block_bmap (struct buffer_head * bh, int nr) |
bh | 363 | fs/ext2/inode.c | if (!bh) |
bh | 365 | fs/ext2/inode.c | tmp = ((unsigned long *) bh->b_data)[nr]; |
bh | 366 | fs/ext2/inode.c | brelse (bh); |
bh | 489 | fs/ext2/inode.c | struct buffer_head * bh, int nr, |
bh | 498 | fs/ext2/inode.c | if (!bh) |
bh | 500 | fs/ext2/inode.c | if (!bh->b_uptodate) { |
bh | 501 | fs/ext2/inode.c | ll_rw_block (READ, 1, &bh); |
bh | 502 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 503 | fs/ext2/inode.c | if (!bh->b_uptodate) { |
bh | 504 | fs/ext2/inode.c | brelse (bh); |
bh | 508 | fs/ext2/inode.c | p = nr + (unsigned long *) bh->b_data; |
bh | 512 | fs/ext2/inode.c | result = getblk (bh->b_dev, tmp, blocksize); |
bh | 514 | fs/ext2/inode.c | brelse (bh); |
bh | 523 | fs/ext2/inode.c | brelse (bh); |
bh | 531 | fs/ext2/inode.c | if (((unsigned long *) bh->b_data)[tmp]) { |
bh | 532 | fs/ext2/inode.c | goal = ((unsigned long *)bh->b_data)[tmp]; |
bh | 537 | fs/ext2/inode.c | goal = bh->b_blocknr+1; |
bh | 544 | fs/ext2/inode.c | brelse (bh); |
bh | 547 | fs/ext2/inode.c | result = getblk (bh->b_dev, tmp, blocksize); |
bh | 554 | fs/ext2/inode.c | bh->b_dirt = 1; |
bh | 560 | fs/ext2/inode.c | brelse (bh); |
bh | 567 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 601 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_IND_BLOCK, create, b, err); |
bh | 602 | fs/ext2/inode.c | return block_getblk (inode, bh, block, create, |
bh | 607 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_DIND_BLOCK, create, b, err); |
bh | 608 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block / addr_per_block, create, |
bh | 610 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), |
bh | 614 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_TIND_BLOCK, create, b, err); |
bh | 615 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block/(addr_per_block * addr_per_block), |
bh | 617 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block/addr_per_block) & (addr_per_block - 1), |
bh | 619 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), create, |
bh | 626 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 628 | fs/ext2/inode.c | bh = ext2_getblk (inode, block, create, err); |
bh | 629 | fs/ext2/inode.c | if (!bh || bh->b_uptodate) |
bh | 630 | fs/ext2/inode.c | return bh; |
bh | 631 | fs/ext2/inode.c | ll_rw_block (READ, 1, &bh); |
bh | 632 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 633 | fs/ext2/inode.c | if (bh->b_uptodate) |
bh | 634 | fs/ext2/inode.c | return bh; |
bh | 635 | fs/ext2/inode.c | brelse (bh); |
bh | 642 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 662 | fs/ext2/inode.c | bh = inode->i_sb->u.ext2_sb.s_group_desc[group_desc]; |
bh | 663 | fs/ext2/inode.c | if (!bh) |
bh | 665 | fs/ext2/inode.c | gdp = (struct ext2_group_desc *) bh->b_data; |
bh | 669 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
bh | 671 | fs/ext2/inode.c | raw_inode = ((struct ext2_inode *) bh->b_data) + |
bh | 698 | fs/ext2/inode.c | brelse (bh); |
bh | 718 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 737 | fs/ext2/inode.c | bh = inode->i_sb->u.ext2_sb.s_group_desc[group_desc]; |
bh | 738 | fs/ext2/inode.c | if (!bh) |
bh | 740 | fs/ext2/inode.c | gdp = (struct ext2_group_desc *) bh->b_data; |
bh | 744 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
bh | 746 | fs/ext2/inode.c | raw_inode = ((struct ext2_inode *)bh->b_data) + |
bh | 769 | fs/ext2/inode.c | bh->b_dirt = 1; |
bh | 771 | fs/ext2/inode.c | brelse (bh); |
bh | 76 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 92 | fs/ext2/namei.c | bh = ext2_bread (dir, 0, 0, &err); |
bh | 93 | fs/ext2/namei.c | if (!bh) |
bh | 98 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 100 | fs/ext2/namei.c | if (!bh || (char *)de >= sb->s_blocksize + bh->b_data) { |
bh | 101 | fs/ext2/namei.c | brelse (bh); |
bh | 102 | fs/ext2/namei.c | bh = ext2_bread (dir, offset >> EXT2_BLOCK_SIZE_BITS(sb), 0, &err); |
bh | 103 | fs/ext2/namei.c | if (!bh) { |
bh | 107 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 111 | fs/ext2/namei.c | if (! ext2_check_dir_entry ("ext2_find_entry", dir, de, bh, |
bh | 113 | fs/ext2/namei.c | brelse (bh); |
bh | 118 | fs/ext2/namei.c | return bh; |
bh | 125 | fs/ext2/namei.c | brelse (bh); |
bh | 134 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 146 | fs/ext2/namei.c | if (!(bh = ext2_find_entry (dir, name, len, &de, NULL))) { |
bh | 155 | fs/ext2/namei.c | brelse (bh); |
bh | 185 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 203 | fs/ext2/namei.c | bh = ext2_bread (dir, 0, 0, err); |
bh | 204 | fs/ext2/namei.c | if (!bh) |
bh | 208 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 211 | fs/ext2/namei.c | if ((char *)de >= sb->s_blocksize + bh->b_data) { |
bh | 212 | fs/ext2/namei.c | brelse (bh); |
bh | 213 | fs/ext2/namei.c | bh = NULL; |
bh | 214 | fs/ext2/namei.c | bh = ext2_bread (dir, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, err); |
bh | 215 | fs/ext2/namei.c | if (!bh) |
bh | 221 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 231 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 234 | fs/ext2/namei.c | if (! ext2_check_dir_entry ("ext2_add_entry", dir, de, bh, |
bh | 237 | fs/ext2/namei.c | brelse (bh); |
bh | 243 | fs/ext2/namei.c | brelse (bh); |
bh | 263 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 265 | fs/ext2/namei.c | return bh; |
bh | 270 | fs/ext2/namei.c | brelse (bh); |
bh | 291 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 306 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 307 | fs/ext2/namei.c | if (!bh) { |
bh | 319 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 320 | fs/ext2/namei.c | brelse (bh); |
bh | 330 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 336 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de, NULL); |
bh | 337 | fs/ext2/namei.c | if (bh) { |
bh | 338 | fs/ext2/namei.c | brelse (bh); |
bh | 369 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 370 | fs/ext2/namei.c | if (!bh) { |
bh | 382 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 383 | fs/ext2/namei.c | brelse (bh); |
bh | 392 | fs/ext2/namei.c | struct buffer_head * bh, * dir_block; |
bh | 398 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de, NULL); |
bh | 399 | fs/ext2/namei.c | if (bh) { |
bh | 400 | fs/ext2/namei.c | brelse (bh); |
bh | 442 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 443 | fs/ext2/namei.c | if (!bh) { |
bh | 454 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 459 | fs/ext2/namei.c | brelse (bh); |
bh | 469 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 476 | fs/ext2/namei.c | !(bh = ext2_bread (inode, 0, 0, &err))) { |
bh | 481 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 492 | fs/ext2/namei.c | if ((void *) de >= (void *) (bh->b_data + sb->s_blocksize)) { |
bh | 493 | fs/ext2/namei.c | brelse (bh); |
bh | 494 | fs/ext2/namei.c | bh = ext2_bread (inode, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, &err); |
bh | 495 | fs/ext2/namei.c | if (!bh) { |
bh | 499 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 501 | fs/ext2/namei.c | if (! ext2_check_dir_entry ("empty_dir", inode, de, bh, |
bh | 503 | fs/ext2/namei.c | brelse (bh); |
bh | 507 | fs/ext2/namei.c | brelse (bh); |
bh | 513 | fs/ext2/namei.c | brelse (bh); |
bh | 521 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 527 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de, &pde); |
bh | 529 | fs/ext2/namei.c | if (!bh) |
bh | 559 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 569 | fs/ext2/namei.c | brelse (bh); |
bh | 577 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 584 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de, &pde); |
bh | 585 | fs/ext2/namei.c | if (!bh) |
bh | 605 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 613 | fs/ext2/namei.c | brelse (bh); |
bh | 624 | fs/ext2/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 668 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de, NULL); |
bh | 669 | fs/ext2/namei.c | if (bh) { |
bh | 673 | fs/ext2/namei.c | brelse (bh); |
bh | 677 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 678 | fs/ext2/namei.c | if (!bh) { |
bh | 690 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 691 | fs/ext2/namei.c | brelse (bh); |
bh | 701 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 714 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de, NULL); |
bh | 715 | fs/ext2/namei.c | if (bh) { |
bh | 716 | fs/ext2/namei.c | brelse (bh); |
bh | 721 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 722 | fs/ext2/namei.c | if (!bh) { |
bh | 732 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 733 | fs/ext2/namei.c | brelse (bh); |
bh | 52 | fs/ext2/symlink.c | struct buffer_head * bh = NULL; |
bh | 75 | fs/ext2/symlink.c | if (!(bh = ext2_bread (inode, 0, 0, &error))) { |
bh | 80 | fs/ext2/symlink.c | link = bh->b_data; |
bh | 87 | fs/ext2/symlink.c | if (bh) |
bh | 88 | fs/ext2/symlink.c | brelse (bh); |
bh | 94 | fs/ext2/symlink.c | struct buffer_head * bh = NULL; |
bh | 106 | fs/ext2/symlink.c | bh = ext2_bread (inode, 0, 0, &err); |
bh | 107 | fs/ext2/symlink.c | if (!bh) { |
bh | 111 | fs/ext2/symlink.c | link = bh->b_data; |
bh | 121 | fs/ext2/symlink.c | if (bh) |
bh | 122 | fs/ext2/symlink.c | brelse (bh); |
bh | 37 | fs/ext2/truncate.c | struct buffer_head * bh; |
bh | 50 | fs/ext2/truncate.c | bh = get_hash_table (inode->i_dev, tmp, inode->i_sb->s_blocksize); |
bh | 52 | fs/ext2/truncate.c | brelse (bh); |
bh | 55 | fs/ext2/truncate.c | if ((bh && bh->b_count != 1) || tmp != *p) { |
bh | 57 | fs/ext2/truncate.c | brelse (bh); |
bh | 63 | fs/ext2/truncate.c | brelse (bh); |
bh | 72 | fs/ext2/truncate.c | struct buffer_head * bh; |
bh | 103 | fs/ext2/truncate.c | bh = get_hash_table (inode->i_dev, tmp, |
bh | 106 | fs/ext2/truncate.c | brelse (bh); |
bh | 109 | fs/ext2/truncate.c | if ((bh && bh->b_count != 1) || tmp != *ind) { |
bh | 111 | fs/ext2/truncate.c | brelse (bh); |
bh | 116 | fs/ext2/truncate.c | brelse (bh); |
bh | 69 | fs/isofs/dir.c | struct buffer_head * bh; |
bh | 81 | fs/isofs/dir.c | if (!block || !(bh = bread(inode->i_dev,block,ISOFS_BUFFER_SIZE))) |
bh | 88 | fs/isofs/dir.c | de = (struct iso_directory_record *) (offset + bh->b_data); |
bh | 95 | fs/isofs/dir.c | brelse(bh); |
bh | 99 | fs/isofs/dir.c | if (!block || !(bh = bread(inode->i_dev,block,ISOFS_BUFFER_SIZE))) |
bh | 113 | fs/isofs/dir.c | memcpy(cpnt, bh->b_data, BLOCK_SIZE); |
bh | 115 | fs/isofs/dir.c | brelse(bh); |
bh | 118 | fs/isofs/dir.c | if (!block || !(bh = bread(inode->i_dev,block,ISOFS_BUFFER_SIZE))) |
bh | 120 | fs/isofs/dir.c | memcpy(cpnt+BLOCK_SIZE, bh->b_data, BLOCK_SIZE); |
bh | 214 | fs/isofs/dir.c | brelse(bh); |
bh | 222 | fs/isofs/dir.c | brelse(bh); |
bh | 92 | fs/isofs/file.c | struct buffer_head * bh; |
bh | 96 | fs/isofs/file.c | if (block && (bh = bread(inode->i_dev,block, ISOFS_BUFFER_SIZE))) { |
bh | 97 | fs/isofs/file.c | pnt = (char*) bh->b_data; |
bh | 108 | fs/isofs/file.c | brelse(bh); |
bh | 97 | fs/isofs/inode.c | struct buffer_head *bh; |
bh | 121 | fs/isofs/inode.c | if (!(bh = bread(dev, iso_blknum << (ISOFS_BLOCK_BITS-ISOFS_BUFFER_BITS), ISOFS_BUFFER_SIZE))) { |
bh | 129 | fs/isofs/inode.c | vdp = (struct iso_volume_descriptor *)bh->b_data; |
bh | 130 | fs/isofs/inode.c | hdp = (struct hs_volume_descriptor *)bh->b_data; |
bh | 156 | fs/isofs/inode.c | brelse(bh); |
bh | 205 | fs/isofs/inode.c | brelse(bh); |
bh | 237 | fs/isofs/inode.c | brelse(bh); |
bh | 268 | fs/isofs/inode.c | struct buffer_head * bh; |
bh | 276 | fs/isofs/inode.c | if (!(bh=bread(inode->i_dev,block, ISOFS_BUFFER_SIZE))) |
bh | 279 | fs/isofs/inode.c | pnt = ((char *) bh->b_data) + (inode->i_ino & (ISOFS_BUFFER_SIZE - 1)); |
bh | 286 | fs/isofs/inode.c | memcpy(cpnt, bh->b_data, ISOFS_BUFFER_SIZE); |
bh | 287 | fs/isofs/inode.c | brelse(bh); |
bh | 288 | fs/isofs/inode.c | if (!(bh = bread(inode->i_dev,++block, ISOFS_BUFFER_SIZE))) |
bh | 290 | fs/isofs/inode.c | memcpy(cpnt+ISOFS_BUFFER_SIZE, bh->b_data, ISOFS_BUFFER_SIZE); |
bh | 403 | fs/isofs/inode.c | brelse(bh); |
bh | 450 | fs/isofs/inode.c | struct buffer_head * bh; |
bh | 455 | fs/isofs/inode.c | if (!(bh = bread(parent->i_dev, block, ISOFS_BUFFER_SIZE))) return 0; |
bh | 458 | fs/isofs/inode.c | de = (struct iso_directory_record *) (offset + bh->b_data); |
bh | 462 | fs/isofs/inode.c | brelse(bh); |
bh | 471 | fs/isofs/inode.c | brelse(bh); |
bh | 478 | fs/isofs/inode.c | brelse(bh); |
bh | 493 | fs/isofs/inode.c | if (!block || !(bh = bread(parent->i_dev,block, ISOFS_BUFFER_SIZE))) |
bh | 497 | fs/isofs/inode.c | de = (struct iso_directory_record *) (offset + bh->b_data); |
bh | 505 | fs/isofs/inode.c | brelse(bh); |
bh | 509 | fs/isofs/inode.c | if (!block || !(bh = bread(parent->i_dev,block, ISOFS_BUFFER_SIZE))) |
bh | 523 | fs/isofs/inode.c | memcpy(cpnt, bh->b_data, ISOFS_BUFFER_SIZE); |
bh | 525 | fs/isofs/inode.c | brelse(bh); |
bh | 529 | fs/isofs/inode.c | if (!(bh = bread(parent->i_dev,block, ISOFS_BUFFER_SIZE))) |
bh | 531 | fs/isofs/inode.c | memcpy(cpnt+ISOFS_BUFFER_SIZE, bh->b_data, ISOFS_BUFFER_SIZE); |
bh | 552 | fs/isofs/inode.c | brelse(bh); |
bh | 582 | fs/isofs/inode.c | void leak_check_brelse(struct buffer_head * bh){ |
bh | 584 | fs/isofs/inode.c | return brelse(bh); |
bh | 68 | fs/isofs/namei.c | struct buffer_head * bh; |
bh | 86 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,ISOFS_BUFFER_SIZE))) return NULL; |
bh | 89 | fs/isofs/namei.c | de = (struct iso_directory_record *) (offset + bh->b_data); |
bh | 97 | fs/isofs/namei.c | brelse(bh); |
bh | 101 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,ISOFS_BUFFER_SIZE))) |
bh | 115 | fs/isofs/namei.c | memcpy(cpnt, bh->b_data, ISOFS_BUFFER_SIZE); |
bh | 117 | fs/isofs/namei.c | brelse(bh); |
bh | 120 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,ISOFS_BUFFER_SIZE))) |
bh | 122 | fs/isofs/namei.c | memcpy(cpnt+ISOFS_BUFFER_SIZE, bh->b_data, ISOFS_BUFFER_SIZE); |
bh | 184 | fs/isofs/namei.c | return bh; |
bh | 189 | fs/isofs/namei.c | brelse(bh); |
bh | 197 | fs/isofs/namei.c | struct buffer_head * bh; |
bh | 230 | fs/isofs/namei.c | if (!(bh = isofs_find_entry(dir,name,len, &ino, &ino_back))) { |
bh | 234 | fs/isofs/namei.c | brelse(bh); |
bh | 56 | fs/isofs/rock.c | struct buffer_head * bh; \ |
bh | 62 | fs/isofs/rock.c | bh = bread(DEV, block, 1024); \ |
bh | 63 | fs/isofs/rock.c | if (bh) { \ |
bh | 64 | fs/isofs/rock.c | memcpy(buffer, bh->b_data, cont_size); \ |
bh | 65 | fs/isofs/rock.c | brelse(bh); \ |
bh | 364 | fs/isofs/rock.c | struct buffer_head * bh; |
bh | 381 | fs/isofs/rock.c | if (!(bh=bread(inode->i_dev,block, ISOFS_BUFFER_SIZE))) |
bh | 384 | fs/isofs/rock.c | pnt = ((char *) bh->b_data) + (inode->i_ino & (ISOFS_BUFFER_SIZE - 1)); |
bh | 390 | fs/isofs/rock.c | memcpy(cpnt, bh->b_data, ISOFS_BUFFER_SIZE); |
bh | 391 | fs/isofs/rock.c | brelse(bh); |
bh | 392 | fs/isofs/rock.c | if (!(bh = bread(inode->i_dev,++block, ISOFS_BUFFER_SIZE))) |
bh | 394 | fs/isofs/rock.c | memcpy(cpnt+ISOFS_BUFFER_SIZE, bh->b_data, ISOFS_BUFFER_SIZE); |
bh | 459 | fs/isofs/rock.c | brelse(bh); |
bh | 44 | fs/minix/bitmap.c | struct buffer_head *bh; |
bh | 47 | fs/minix/bitmap.c | if (!(bh=map[i])) |
bh | 56 | fs/minix/bitmap.c | tmp = bh->b_data[end] & ((1<<numbits)-1); |
bh | 61 | fs/minix/bitmap.c | sum += nibblemap[bh->b_data[j] & 0xf] |
bh | 62 | fs/minix/bitmap.c | + nibblemap[(bh->b_data[j]>>4)&0xf]; |
bh | 69 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 81 | fs/minix/bitmap.c | bh = get_hash_table(sb->s_dev,block,BLOCK_SIZE); |
bh | 82 | fs/minix/bitmap.c | if (bh) |
bh | 83 | fs/minix/bitmap.c | bh->b_dirt=0; |
bh | 84 | fs/minix/bitmap.c | brelse(bh); |
bh | 88 | fs/minix/bitmap.c | bh = sb->u.minix_sb.s_zmap[zone]; |
bh | 89 | fs/minix/bitmap.c | if (!bh) { |
bh | 93 | fs/minix/bitmap.c | if (clear_bit(bit,bh->b_data)) |
bh | 95 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 101 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 111 | fs/minix/bitmap.c | if ((bh=sb->u.minix_sb.s_zmap[i]) != NULL) |
bh | 112 | fs/minix/bitmap.c | if ((j=find_first_zero(bh->b_data))<8192) |
bh | 114 | fs/minix/bitmap.c | if (i>=8 || !bh || j>=8192) |
bh | 116 | fs/minix/bitmap.c | if (set_bit(j,bh->b_data)) { |
bh | 120 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 125 | fs/minix/bitmap.c | if (!(bh = getblk(sb->s_dev,j,BLOCK_SIZE))) { |
bh | 129 | fs/minix/bitmap.c | clear_block(bh->b_data); |
bh | 130 | fs/minix/bitmap.c | bh->b_uptodate = 1; |
bh | 131 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 132 | fs/minix/bitmap.c | brelse(bh); |
bh | 144 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 168 | fs/minix/bitmap.c | if (!(bh=inode->i_sb->u.minix_sb.s_imap[inode->i_ino>>13])) { |
bh | 172 | fs/minix/bitmap.c | if (clear_bit(inode->i_ino&8191,bh->b_data)) |
bh | 174 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 182 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 192 | fs/minix/bitmap.c | if ((bh = inode->i_sb->u.minix_sb.s_imap[i]) != NULL) |
bh | 193 | fs/minix/bitmap.c | if ((j=find_first_zero(bh->b_data))<8192) |
bh | 195 | fs/minix/bitmap.c | if (!bh || j >= 8192) { |
bh | 199 | fs/minix/bitmap.c | if (set_bit(j,bh->b_data)) { /* shouldn't happen */ |
bh | 204 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 62 | fs/minix/dir.c | struct buffer_head * bh; |
bh | 73 | fs/minix/dir.c | bh = minix_bread(inode,(filp->f_pos)>>BLOCK_SIZE_BITS,0); |
bh | 74 | fs/minix/dir.c | if (!bh) { |
bh | 79 | fs/minix/dir.c | de = (struct minix_dir_entry *) (offset + bh->b_data); |
bh | 92 | fs/minix/dir.c | brelse(bh); |
bh | 97 | fs/minix/dir.c | brelse(bh); |
bh | 191 | fs/minix/file.c | struct buffer_head * bh; |
bh | 212 | fs/minix/file.c | bh = minix_getblk(inode,pos/BLOCK_SIZE,1); |
bh | 213 | fs/minix/file.c | if (!bh) { |
bh | 221 | fs/minix/file.c | if (c != BLOCK_SIZE && !bh->b_uptodate) { |
bh | 222 | fs/minix/file.c | ll_rw_block(READ, 1, &bh); |
bh | 223 | fs/minix/file.c | wait_on_buffer(bh); |
bh | 224 | fs/minix/file.c | if (!bh->b_uptodate) { |
bh | 225 | fs/minix/file.c | brelse(bh); |
bh | 231 | fs/minix/file.c | p = (pos % BLOCK_SIZE) + bh->b_data; |
bh | 240 | fs/minix/file.c | bh->b_uptodate = 1; |
bh | 241 | fs/minix/file.c | bh->b_dirt = 1; |
bh | 242 | fs/minix/file.c | brelse(bh); |
bh | 54 | fs/minix/inode.c | struct buffer_head *bh; |
bh | 61 | fs/minix/inode.c | if (!(bh = bread(dev,1,BLOCK_SIZE))) { |
bh | 67 | fs/minix/inode.c | ms = (struct minix_super_block *) bh->b_data; |
bh | 77 | fs/minix/inode.c | brelse(bh); |
bh | 150 | fs/minix/inode.c | static int block_bmap(struct buffer_head * bh, int nr) |
bh | 154 | fs/minix/inode.c | if (!bh) |
bh | 156 | fs/minix/inode.c | tmp = ((unsigned short *) bh->b_data)[nr]; |
bh | 157 | fs/minix/inode.c | brelse(bh); |
bh | 226 | fs/minix/inode.c | struct buffer_head * bh, int nr, int create) |
bh | 232 | fs/minix/inode.c | if (!bh) |
bh | 234 | fs/minix/inode.c | if (!bh->b_uptodate) { |
bh | 235 | fs/minix/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 236 | fs/minix/inode.c | wait_on_buffer(bh); |
bh | 237 | fs/minix/inode.c | if (!bh->b_uptodate) { |
bh | 238 | fs/minix/inode.c | brelse(bh); |
bh | 242 | fs/minix/inode.c | p = nr + (unsigned short *) bh->b_data; |
bh | 246 | fs/minix/inode.c | result = getblk(bh->b_dev, tmp, BLOCK_SIZE); |
bh | 248 | fs/minix/inode.c | brelse(bh); |
bh | 255 | fs/minix/inode.c | brelse(bh); |
bh | 260 | fs/minix/inode.c | brelse(bh); |
bh | 263 | fs/minix/inode.c | result = getblk(bh->b_dev, tmp, BLOCK_SIZE); |
bh | 270 | fs/minix/inode.c | bh->b_dirt = 1; |
bh | 271 | fs/minix/inode.c | brelse(bh); |
bh | 277 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 291 | fs/minix/inode.c | bh = inode_getblk(inode,7,create); |
bh | 292 | fs/minix/inode.c | return block_getblk(inode, bh, block, create); |
bh | 295 | fs/minix/inode.c | bh = inode_getblk(inode,8,create); |
bh | 296 | fs/minix/inode.c | bh = block_getblk(inode, bh, block>>9, create); |
bh | 297 | fs/minix/inode.c | return block_getblk(inode, bh, block & 511, create); |
bh | 302 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 304 | fs/minix/inode.c | bh = minix_getblk(inode,block,create); |
bh | 305 | fs/minix/inode.c | if (!bh || bh->b_uptodate) |
bh | 306 | fs/minix/inode.c | return bh; |
bh | 307 | fs/minix/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 308 | fs/minix/inode.c | wait_on_buffer(bh); |
bh | 309 | fs/minix/inode.c | if (bh->b_uptodate) |
bh | 310 | fs/minix/inode.c | return bh; |
bh | 311 | fs/minix/inode.c | brelse(bh); |
bh | 317 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 332 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,block, BLOCK_SIZE))) { |
bh | 337 | fs/minix/inode.c | raw_inode = ((struct minix_inode *) bh->b_data) + |
bh | 350 | fs/minix/inode.c | brelse(bh); |
bh | 367 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 380 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) { |
bh | 385 | fs/minix/inode.c | raw_inode = ((struct minix_inode *)bh->b_data) + |
bh | 398 | fs/minix/inode.c | bh->b_dirt=1; |
bh | 399 | fs/minix/inode.c | brelse(bh); |
bh | 45 | fs/minix/namei.c | struct buffer_head * bh, unsigned long * offset, |
bh | 50 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + *offset); |
bh | 72 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 86 | fs/minix/namei.c | bh = NULL; |
bh | 89 | fs/minix/namei.c | if (!bh) { |
bh | 90 | fs/minix/namei.c | bh = minix_bread(dir,block,0); |
bh | 91 | fs/minix/namei.c | if (!bh) { |
bh | 96 | fs/minix/namei.c | *res_dir = (struct minix_dir_entry *) (bh->b_data + offset); |
bh | 97 | fs/minix/namei.c | if (minix_match(namelen,name,bh,&offset,info)) |
bh | 98 | fs/minix/namei.c | return bh; |
bh | 99 | fs/minix/namei.c | if (offset < bh->b_size) |
bh | 101 | fs/minix/namei.c | brelse(bh); |
bh | 102 | fs/minix/namei.c | bh = NULL; |
bh | 106 | fs/minix/namei.c | brelse(bh); |
bh | 116 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 125 | fs/minix/namei.c | if (!(bh = minix_find_entry(dir,name,len,&de))) { |
bh | 130 | fs/minix/namei.c | brelse(bh); |
bh | 156 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 174 | fs/minix/namei.c | bh = NULL; |
bh | 177 | fs/minix/namei.c | if (!bh) { |
bh | 178 | fs/minix/namei.c | bh = minix_bread(dir,block,1); |
bh | 179 | fs/minix/namei.c | if (!bh) |
bh | 182 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + offset); |
bh | 184 | fs/minix/namei.c | if (block*bh->b_size + offset > dir->i_size) { |
bh | 186 | fs/minix/namei.c | dir->i_size = block*bh->b_size + offset; |
bh | 192 | fs/minix/namei.c | brelse(bh); |
bh | 199 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 203 | fs/minix/namei.c | if (offset < bh->b_size) |
bh | 205 | fs/minix/namei.c | brelse(bh); |
bh | 206 | fs/minix/namei.c | bh = NULL; |
bh | 210 | fs/minix/namei.c | *res_buf = bh; |
bh | 219 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 233 | fs/minix/namei.c | error = minix_add_entry(dir,name,len, &bh ,&de); |
bh | 242 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 243 | fs/minix/namei.c | brelse(bh); |
bh | 253 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 258 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 259 | fs/minix/namei.c | if (bh) { |
bh | 260 | fs/minix/namei.c | brelse(bh); |
bh | 291 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
bh | 300 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 301 | fs/minix/namei.c | brelse(bh); |
bh | 311 | fs/minix/namei.c | struct buffer_head * bh, *dir_block; |
bh | 320 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 321 | fs/minix/namei.c | if (bh) { |
bh | 322 | fs/minix/namei.c | brelse(bh); |
bh | 359 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
bh | 367 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 372 | fs/minix/namei.c | brelse(bh); |
bh | 382 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 390 | fs/minix/namei.c | bh = NULL; |
bh | 396 | fs/minix/namei.c | bh = minix_bread(inode,0,0); |
bh | 397 | fs/minix/namei.c | if (!bh) |
bh | 399 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
bh | 402 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + info->s_dirsize); |
bh | 406 | fs/minix/namei.c | if (!bh) { |
bh | 407 | fs/minix/namei.c | bh = minix_bread(inode,block,0); |
bh | 408 | fs/minix/namei.c | if (!bh) { |
bh | 413 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + offset); |
bh | 416 | fs/minix/namei.c | brelse(bh); |
bh | 419 | fs/minix/namei.c | if (offset < bh->b_size) |
bh | 421 | fs/minix/namei.c | brelse(bh); |
bh | 422 | fs/minix/namei.c | bh = NULL; |
bh | 426 | fs/minix/namei.c | brelse(bh); |
bh | 429 | fs/minix/namei.c | brelse(bh); |
bh | 438 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 442 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 444 | fs/minix/namei.c | if (!bh) |
bh | 471 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 481 | fs/minix/namei.c | brelse(bh); |
bh | 489 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 495 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 496 | fs/minix/namei.c | if (!bh) |
bh | 502 | fs/minix/namei.c | brelse(bh); |
bh | 520 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 528 | fs/minix/namei.c | brelse(bh); |
bh | 538 | fs/minix/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 564 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 565 | fs/minix/namei.c | if (bh) { |
bh | 569 | fs/minix/namei.c | brelse(bh); |
bh | 573 | fs/minix/namei.c | i = minix_add_entry(dir, name, len, &bh, &de); |
bh | 582 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 583 | fs/minix/namei.c | brelse(bh); |
bh | 593 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 605 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 606 | fs/minix/namei.c | if (bh) { |
bh | 607 | fs/minix/namei.c | brelse(bh); |
bh | 612 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
bh | 619 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 620 | fs/minix/namei.c | brelse(bh); |
bh | 45 | fs/minix/symlink.c | struct buffer_head * bh; |
bh | 66 | fs/minix/symlink.c | if (!(bh = minix_bread(inode, 0, 0))) { |
bh | 73 | fs/minix/symlink.c | error = open_namei(bh->b_data,flag,mode,res_inode,dir); |
bh | 75 | fs/minix/symlink.c | brelse(bh); |
bh | 81 | fs/minix/symlink.c | struct buffer_head * bh; |
bh | 91 | fs/minix/symlink.c | bh = minix_bread(inode, 0, 0); |
bh | 93 | fs/minix/symlink.c | if (!bh) |
bh | 96 | fs/minix/symlink.c | while (i<buflen && (c = bh->b_data[i])) { |
bh | 100 | fs/minix/symlink.c | brelse(bh); |
bh | 30 | fs/minix/truncate.c | struct buffer_head * bh; |
bh | 40 | fs/minix/truncate.c | bh = get_hash_table(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 42 | fs/minix/truncate.c | brelse(bh); |
bh | 45 | fs/minix/truncate.c | if ((bh && bh->b_count != 1) || tmp != *p) { |
bh | 47 | fs/minix/truncate.c | brelse(bh); |
bh | 52 | fs/minix/truncate.c | brelse(bh); |
bh | 60 | fs/minix/truncate.c | struct buffer_head * bh; |
bh | 89 | fs/minix/truncate.c | bh = get_hash_table(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 91 | fs/minix/truncate.c | brelse(bh); |
bh | 94 | fs/minix/truncate.c | if ((bh && bh->b_count != 1) || tmp != *ind) { |
bh | 96 | fs/minix/truncate.c | brelse(bh); |
bh | 101 | fs/minix/truncate.c | brelse(bh); |
bh | 62 | fs/msdos/dir.c | struct buffer_head *bh; |
bh | 80 | fs/msdos/dir.c | bh = NULL; |
bh | 81 | fs/msdos/dir.c | while ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) { |
bh | 107 | fs/msdos/dir.c | brelse(bh); |
bh | 112 | fs/msdos/dir.c | if (bh) brelse(bh); |
bh | 20 | fs/msdos/fat.c | struct buffer_head *bh,*bh2,*c_bh,*c_bh2; |
bh | 31 | fs/msdos/fat.c | if (!(bh = msdos_sread(sb->s_dev,MSDOS_SB(sb)->fat_start+(first >> |
bh | 37 | fs/msdos/fat.c | bh2 = bh; |
bh | 43 | fs/msdos/fat.c | brelse(bh); |
bh | 77 | fs/msdos/fat.c | bh->b_dirt = 1; |
bh | 84 | fs/msdos/fat.c | if (data != data2 || bh != bh2) { |
bh | 98 | fs/msdos/fat.c | brelse(bh); |
bh | 86 | fs/msdos/file.c | struct buffer_head *bh; |
bh | 104 | fs/msdos/file.c | if (!(bh = msdos_sread(inode->i_dev,sector,&data))) break; |
bh | 117 | fs/msdos/file.c | brelse(bh); |
bh | 122 | fs/msdos/file.c | brelse(bh); |
bh | 135 | fs/msdos/file.c | struct buffer_head *bh; |
bh | 162 | fs/msdos/file.c | if (!(bh = msdos_sread(inode->i_dev,sector,&data))) { |
bh | 197 | fs/msdos/file.c | bh->b_dirt = 1; |
bh | 198 | fs/msdos/file.c | brelse(bh); |
bh | 146 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 162 | fs/msdos/inode.c | bh = bread(s->s_dev, 0, BLOCK_SIZE); |
bh | 164 | fs/msdos/inode.c | if (bh == NULL) { |
bh | 169 | fs/msdos/inode.c | b = (struct msdos_boot_sector *) bh->b_data; |
bh | 218 | fs/msdos/inode.c | brelse(bh); |
bh | 305 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 332 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, |
bh | 337 | fs/msdos/inode.c | raw_entry = &((struct msdos_dir_entry *) (bh->b_data)) |
bh | 382 | fs/msdos/inode.c | brelse(bh); |
bh | 388 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 393 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, |
bh | 398 | fs/msdos/inode.c | raw_entry = &((struct msdos_dir_entry *) (bh->b_data)) |
bh | 414 | fs/msdos/inode.c | bh->b_dirt = 1; |
bh | 415 | fs/msdos/inode.c | brelse(bh); |
bh | 113 | fs/msdos/misc.c | struct buffer_head *bh; |
bh | 172 | fs/msdos/misc.c | if (!(bh = getblk(inode->i_dev,sector >> 1, |
bh | 176 | fs/msdos/misc.c | memset(bh->b_data,0,BLOCK_SIZE); |
bh | 177 | fs/msdos/misc.c | bh->b_uptodate = 1; |
bh | 182 | fs/msdos/misc.c | if (!(bh = msdos_sread(inode->i_dev,sector, |
bh | 187 | fs/msdos/misc.c | if (bh) { |
bh | 188 | fs/msdos/misc.c | bh->b_dirt = 1; |
bh | 189 | fs/msdos/misc.c | brelse(bh); |
bh | 267 | fs/msdos/misc.c | int msdos_get_entry(struct inode *dir,int *pos,struct buffer_head **bh, |
bh | 280 | fs/msdos/misc.c | if (*bh) |
bh | 281 | fs/msdos/misc.c | brelse(*bh); |
bh | 282 | fs/msdos/misc.c | if (!(*bh = msdos_sread(dir->i_dev,sector,&data))) { |
bh | 350 | fs/msdos/misc.c | struct buffer_head *bh; |
bh | 355 | fs/msdos/misc.c | if (!(bh = msdos_sread(sb->s_dev,sector,(void **) &data))) return -EIO; |
bh | 368 | fs/msdos/misc.c | if (!res_bh) brelse(bh); |
bh | 370 | fs/msdos/misc.c | *res_bh = bh; |
bh | 376 | fs/msdos/misc.c | brelse(bh); |
bh | 94 | fs/msdos/namei.c | struct buffer_head **bh,struct msdos_dir_entry **de,int *ino) |
bh | 101 | fs/msdos/namei.c | return msdos_scan(dir,msdos_name,bh,de,ino); |
bh | 110 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 130 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) { |
bh | 134 | fs/msdos/namei.c | if (bh) brelse(bh); |
bh | 164 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 168 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) { |
bh | 172 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) return res; |
bh | 179 | fs/msdos/namei.c | bh->b_dirt = 1; |
bh | 182 | fs/msdos/namei.c | brelse(bh); |
bh | 194 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 206 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
bh | 208 | fs/msdos/namei.c | brelse(bh); |
bh | 241 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 253 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
bh | 255 | fs/msdos/namei.c | brelse(bh); |
bh | 299 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 306 | fs/msdos/namei.c | bh = NULL; |
bh | 307 | fs/msdos/namei.c | while (msdos_get_entry(dir,&pos,&bh,&de) > -1) |
bh | 311 | fs/msdos/namei.c | brelse(bh); |
bh | 314 | fs/msdos/namei.c | if (bh) |
bh | 315 | fs/msdos/namei.c | brelse(bh); |
bh | 324 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 328 | fs/msdos/namei.c | bh = NULL; |
bh | 333 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) goto rmdir_done; |
bh | 348 | fs/msdos/namei.c | bh->b_dirt = 1; |
bh | 351 | fs/msdos/namei.c | brelse(bh); |
bh | 361 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 365 | fs/msdos/namei.c | bh = NULL; |
bh | 367 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) |
bh | 381 | fs/msdos/namei.c | bh->b_dirt = 1; |
bh | 383 | fs/msdos/namei.c | brelse(bh); |
bh | 32 | fs/xiafs/bitmap.c | static int find_first_zero(struct buffer_head *bh, int start_bit, int end_bit) |
bh | 44 | fs/xiafs/bitmap.c | bmap=(u_long *)bh->b_data; |
bh | 68 | fs/xiafs/bitmap.c | bh->b_dirt=1; |
bh | 72 | fs/xiafs/bitmap.c | static void clear_buf(struct buffer_head * bh) |
bh | 77 | fs/xiafs/bitmap.c | lp=(long *)bh->b_data; |
bh | 78 | fs/xiafs/bitmap.c | for (i= bh->b_size >> 2; i-- > 0; ) |
bh | 179 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 202 | fs/xiafs/bitmap.c | bh = get__map_zone(sb, bmap_buf, bznr, cache, first_zone, |
bh | 204 | fs/xiafs/bitmap.c | if (!bh) |
bh | 206 | fs/xiafs/bitmap.c | tmp=find_first_zero(bh, start_bit, end_bit); |
bh | 223 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 235 | fs/xiafs/bitmap.c | bh = get_hash_table(sb->s_dev, d_addr, XIAFS_ZSIZE(sb)); |
bh | 236 | fs/xiafs/bitmap.c | if (bh) |
bh | 237 | fs/xiafs/bitmap.c | bh->b_dirt=0; |
bh | 238 | fs/xiafs/bitmap.c | brelse(bh); |
bh | 240 | fs/xiafs/bitmap.c | bh = get_zmap_zone(sb, bit, NULL); |
bh | 241 | fs/xiafs/bitmap.c | if (!bh) |
bh | 244 | fs/xiafs/bitmap.c | if (clear_bit(offset, bh->b_data)) |
bh | 246 | fs/xiafs/bitmap.c | bh->b_dirt = 1; |
bh | 252 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 268 | fs/xiafs/bitmap.c | if (!(bh = getblk(sb->s_dev, tmp, XIAFS_ZSIZE(sb)))) { |
bh | 272 | fs/xiafs/bitmap.c | if (bh->b_count != 1) { |
bh | 276 | fs/xiafs/bitmap.c | clear_buf(bh); |
bh | 277 | fs/xiafs/bitmap.c | bh->b_uptodate = 1; |
bh | 278 | fs/xiafs/bitmap.c | bh->b_dirt = 1; |
bh | 279 | fs/xiafs/bitmap.c | brelse(bh); |
bh | 285 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 295 | fs/xiafs/bitmap.c | bh = get_imap_zone(inode->i_sb, inode->i_ino, NULL); |
bh | 296 | fs/xiafs/bitmap.c | if (!bh) |
bh | 299 | fs/xiafs/bitmap.c | if (clear_bit(tmp, bh->b_data)) |
bh | 302 | fs/xiafs/bitmap.c | bh->b_dirt = 1; |
bh | 340 | fs/xiafs/bitmap.c | static u_long count_zone(struct buffer_head * bh) |
bh | 346 | fs/xiafs/bitmap.c | for (i=bh->b_size; i-- > 0; ) { |
bh | 347 | fs/xiafs/bitmap.c | tmp=bh->b_data[i]; |
bh | 355 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 362 | fs/xiafs/bitmap.c | bh=get_imap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), ¬_que); |
bh | 363 | fs/xiafs/bitmap.c | if (bh) { |
bh | 364 | fs/xiafs/bitmap.c | sum += count_zone(bh); |
bh | 374 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 381 | fs/xiafs/bitmap.c | bh=get_zmap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), ¬_que); |
bh | 382 | fs/xiafs/bitmap.c | if (bh) { |
bh | 383 | fs/xiafs/bitmap.c | sum += count_zone(bh); |
bh | 69 | fs/xiafs/dir.c | struct buffer_head * bh; |
bh | 78 | fs/xiafs/dir.c | bh = xiafs_bread(inode, filp->f_pos >> XIAFS_ZSIZE_BITS(inode->i_sb),0); |
bh | 79 | fs/xiafs/dir.c | if (!bh) { |
bh | 83 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (offset + bh->b_data); |
bh | 87 | fs/xiafs/dir.c | (char *)de+de->d_rec_len > XIAFS_ZSIZE(inode->i_sb)+bh->b_data || |
bh | 92 | fs/xiafs/dir.c | brelse(bh); |
bh | 103 | fs/xiafs/dir.c | brelse(bh); |
bh | 110 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (offset + bh->b_data); |
bh | 112 | fs/xiafs/dir.c | brelse(bh); |
bh | 190 | fs/xiafs/file.c | struct buffer_head * bh; |
bh | 211 | fs/xiafs/file.c | bh = xiafs_getblk(inode, pos >> XIAFS_ZSIZE_BITS(inode->i_sb), 1); |
bh | 212 | fs/xiafs/file.c | if (!bh) { |
bh | 220 | fs/xiafs/file.c | if (c != XIAFS_ZSIZE(inode->i_sb) && !bh->b_uptodate) { |
bh | 221 | fs/xiafs/file.c | ll_rw_block(READ, 1, &bh); |
bh | 222 | fs/xiafs/file.c | wait_on_buffer(bh); |
bh | 223 | fs/xiafs/file.c | if (!bh->b_uptodate) { |
bh | 224 | fs/xiafs/file.c | brelse(bh); |
bh | 230 | fs/xiafs/file.c | cp = (pos & (XIAFS_ZSIZE(inode->i_sb)-1)) + bh->b_data; |
bh | 239 | fs/xiafs/file.c | bh->b_uptodate = 1; |
bh | 240 | fs/xiafs/file.c | bh->b_dirt = 1; |
bh | 241 | fs/xiafs/file.c | brelse(bh); |
bh | 61 | fs/xiafs/inode.c | struct buffer_head *bh; |
bh | 67 | fs/xiafs/inode.c | if (!(bh = bread(dev, 0, BLOCK_SIZE))) { |
bh | 73 | fs/xiafs/inode.c | sp = (struct xiafs_super_block *) bh->b_data; |
bh | 78 | fs/xiafs/inode.c | brelse(bh); |
bh | 93 | fs/xiafs/inode.c | brelse(bh); |
bh | 160 | fs/xiafs/inode.c | static int zone_bmap(struct buffer_head * bh, int nr) |
bh | 164 | fs/xiafs/inode.c | if (!bh) |
bh | 166 | fs/xiafs/inode.c | tmp = ((u_long *) bh->b_data)[nr]; |
bh | 167 | fs/xiafs/inode.c | brelse(bh); |
bh | 250 | fs/xiafs/inode.c | indt_getblk(struct inode * inode, struct buffer_head * bh, |
bh | 257 | fs/xiafs/inode.c | if (!bh) |
bh | 259 | fs/xiafs/inode.c | if (!bh->b_uptodate) { |
bh | 260 | fs/xiafs/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 261 | fs/xiafs/inode.c | wait_on_buffer(bh); |
bh | 262 | fs/xiafs/inode.c | if (!bh->b_uptodate) { |
bh | 263 | fs/xiafs/inode.c | brelse(bh); |
bh | 267 | fs/xiafs/inode.c | lp = nr + (u_long *) bh->b_data; |
bh | 270 | fs/xiafs/inode.c | result = getblk(bh->b_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 272 | fs/xiafs/inode.c | brelse(bh); |
bh | 279 | fs/xiafs/inode.c | brelse(bh); |
bh | 284 | fs/xiafs/inode.c | brelse(bh); |
bh | 287 | fs/xiafs/inode.c | result = getblk(bh->b_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 295 | fs/xiafs/inode.c | bh->b_dirt = 1; |
bh | 296 | fs/xiafs/inode.c | brelse(bh); |
bh | 302 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 320 | fs/xiafs/inode.c | bh = dt_getblk(inode, &(inode->u.xiafs_i.i_ind_zone), create, prev_addr); |
bh | 321 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone, create, prev_addr); |
bh | 322 | fs/xiafs/inode.c | return bh; |
bh | 325 | fs/xiafs/inode.c | bh = dt_getblk(inode, &(inode->u.xiafs_i.i_dind_zone), create, prev_addr); |
bh | 326 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone>>XIAFS_ADDRS_PER_Z_BITS(inode->i_sb), |
bh | 328 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone&(XIAFS_ADDRS_PER_Z(inode->i_sb)-1), |
bh | 330 | fs/xiafs/inode.c | return bh; |
bh | 335 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 337 | fs/xiafs/inode.c | bh = xiafs_getblk(inode, zone, create); |
bh | 338 | fs/xiafs/inode.c | if (!bh || bh->b_uptodate) |
bh | 339 | fs/xiafs/inode.c | return bh; |
bh | 340 | fs/xiafs/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 341 | fs/xiafs/inode.c | wait_on_buffer(bh); |
bh | 342 | fs/xiafs/inode.c | if (bh->b_uptodate) |
bh | 343 | fs/xiafs/inode.c | return bh; |
bh | 344 | fs/xiafs/inode.c | brelse(bh); |
bh | 350 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 365 | fs/xiafs/inode.c | if (!(bh=bread(inode->i_dev, zone, XIAFS_ZSIZE(inode->i_sb)))) { |
bh | 369 | fs/xiafs/inode.c | raw_inode = ((struct xiafs_inode *) bh->b_data) + |
bh | 390 | fs/xiafs/inode.c | brelse(bh); |
bh | 407 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 427 | fs/xiafs/inode.c | if (!(bh=bread(inode->i_dev, zone, XIAFS_ZSIZE(inode->i_sb)))) { |
bh | 432 | fs/xiafs/inode.c | raw_inode = ((struct xiafs_inode *)bh->b_data) + |
bh | 455 | fs/xiafs/inode.c | bh->b_dirt=1; |
bh | 456 | fs/xiafs/inode.c | brelse(bh); |
bh | 61 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 76 | fs/xiafs/namei.c | bh = xiafs_bread(inode, i, 0); |
bh | 77 | fs/xiafs/namei.c | if (!bh) |
bh | 79 | fs/xiafs/namei.c | dep_pre=dep=(struct xiafs_direct *)bh->b_data; |
bh | 83 | fs/xiafs/namei.c | brelse(bh); |
bh | 90 | fs/xiafs/namei.c | dep->d_rec_len+(char *)dep > bh->b_data+XIAFS_ZSIZE(inode->i_sb) || |
bh | 93 | fs/xiafs/namei.c | brelse(bh); |
bh | 100 | fs/xiafs/namei.c | return bh; |
bh | 104 | fs/xiafs/namei.c | dep=(struct xiafs_direct *)(bh->b_data + pos); |
bh | 106 | fs/xiafs/namei.c | brelse(bh); |
bh | 120 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 129 | fs/xiafs/namei.c | if (!(bh = xiafs_find_entry(dir, name, len, &dep, NULL))) { |
bh | 134 | fs/xiafs/namei.c | brelse(bh); |
bh | 158 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 171 | fs/xiafs/namei.c | bh = xiafs_bread(dir, pos >> XIAFS_ZSIZE_BITS(dir->i_sb), pos ? 1:0); |
bh | 172 | fs/xiafs/namei.c | if (!bh) |
bh | 174 | fs/xiafs/namei.c | de_pre=de=(struct xiafs_direct *)bh->b_data; |
bh | 179 | fs/xiafs/namei.c | brelse(bh); |
bh | 183 | fs/xiafs/namei.c | de_pre=de=(struct xiafs_direct *)(bh->b_data+12); |
bh | 197 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(dir->i_sb) || |
bh | 201 | fs/xiafs/namei.c | brelse(bh); |
bh | 220 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 224 | fs/xiafs/namei.c | return bh; |
bh | 228 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
bh | 230 | fs/xiafs/namei.c | brelse(bh); |
bh | 244 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 258 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 259 | fs/xiafs/namei.c | if (!bh) { |
bh | 267 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 268 | fs/xiafs/namei.c | brelse(bh); |
bh | 277 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 282 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
bh | 283 | fs/xiafs/namei.c | if (bh) { |
bh | 284 | fs/xiafs/namei.c | brelse(bh); |
bh | 315 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 316 | fs/xiafs/namei.c | if (!bh) { |
bh | 324 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 325 | fs/xiafs/namei.c | brelse(bh); |
bh | 334 | fs/xiafs/namei.c | struct buffer_head * bh, *dir_block; |
bh | 337 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
bh | 338 | fs/xiafs/namei.c | if (bh) { |
bh | 339 | fs/xiafs/namei.c | brelse(bh); |
bh | 380 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 381 | fs/xiafs/namei.c | if (!bh) { |
bh | 388 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 393 | fs/xiafs/namei.c | brelse(bh); |
bh | 403 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 413 | fs/xiafs/namei.c | bh = xiafs_bread(inode, i, 0); |
bh | 415 | fs/xiafs/namei.c | if (!bh) { |
bh | 419 | fs/xiafs/namei.c | de=(struct xiafs_direct *)bh->b_data; |
bh | 423 | fs/xiafs/namei.c | brelse(bh); |
bh | 426 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(12 + bh->b_data); |
bh | 429 | fs/xiafs/namei.c | brelse(bh); |
bh | 436 | fs/xiafs/namei.c | if (!bh) |
bh | 439 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
bh | 442 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(inode->i_sb) || |
bh | 446 | fs/xiafs/namei.c | brelse(bh); |
bh | 450 | fs/xiafs/namei.c | brelse(bh); |
bh | 455 | fs/xiafs/namei.c | brelse(bh); |
bh | 484 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 488 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
bh | 490 | fs/xiafs/namei.c | if (!bh) |
bh | 517 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 527 | fs/xiafs/namei.c | brelse(bh); |
bh | 535 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 541 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
bh | 542 | fs/xiafs/namei.c | if (!bh) |
bh | 548 | fs/xiafs/namei.c | brelse(bh); |
bh | 565 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 572 | fs/xiafs/namei.c | brelse(bh); |
bh | 583 | fs/xiafs/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 587 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len, &de, NULL); |
bh | 588 | fs/xiafs/namei.c | if (bh) { |
bh | 589 | fs/xiafs/namei.c | brelse(bh); |
bh | 614 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 615 | fs/xiafs/namei.c | if (!bh) { |
bh | 623 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 624 | fs/xiafs/namei.c | brelse(bh); |
bh | 634 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 646 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, NULL); |
bh | 647 | fs/xiafs/namei.c | if (bh) { |
bh | 648 | fs/xiafs/namei.c | brelse(bh); |
bh | 653 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 654 | fs/xiafs/namei.c | if (!bh) { |
bh | 660 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 661 | fs/xiafs/namei.c | brelse(bh); |
bh | 49 | fs/xiafs/symlink.c | struct buffer_head * bh; |
bh | 59 | fs/xiafs/symlink.c | bh = xiafs_bread(inode, 0, 0); |
bh | 65 | fs/xiafs/symlink.c | if (!bh) |
bh | 67 | fs/xiafs/symlink.c | for (i=0; i < buflen && (c=bh->b_data[i]); i++) |
bh | 71 | fs/xiafs/symlink.c | brelse(bh); |
bh | 79 | fs/xiafs/symlink.c | struct buffer_head * bh; |
bh | 104 | fs/xiafs/symlink.c | if (!(bh = xiafs_bread(inode, 0, 0))) { |
bh | 111 | fs/xiafs/symlink.c | error = open_namei(bh->b_data,flag,mode,res_inode,dir); |
bh | 113 | fs/xiafs/symlink.c | brelse(bh); |
bh | 42 | fs/xiafs/truncate.c | struct buffer_head * bh; |
bh | 53 | fs/xiafs/truncate.c | bh = getblk(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 55 | fs/xiafs/truncate.c | brelse(bh); |
bh | 58 | fs/xiafs/truncate.c | if ((bh && bh->b_count != 1) || tmp != *lp) |
bh | 66 | fs/xiafs/truncate.c | brelse(bh); |
bh | 76 | fs/xiafs/truncate.c | struct buffer_head * bh, * ind_bh; |
bh | 99 | fs/xiafs/truncate.c | bh = getblk(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 101 | fs/xiafs/truncate.c | brelse(bh); |
bh | 104 | fs/xiafs/truncate.c | if ((bh && bh->b_count != 1) || tmp != *indp) |
bh | 112 | fs/xiafs/truncate.c | brelse(bh); |
bh | 365 | include/linux/fs.h | extern void ll_rw_block(int rw, int nr, struct buffer_head * bh[]); |
bh | 205 | include/linux/iso_fs.h | extern void leak_check_brelse(struct buffer_head * bh); |
bh | 10 | include/linux/locks.h | extern inline void wait_on_buffer(struct buffer_head * bh) |
bh | 12 | include/linux/locks.h | if (bh->b_lock) |
bh | 13 | include/linux/locks.h | __wait_on_buffer(bh); |
bh | 16 | include/linux/locks.h | extern inline void lock_buffer(struct buffer_head * bh) |
bh | 18 | include/linux/locks.h | if (bh->b_lock) |
bh | 19 | include/linux/locks.h | __wait_on_buffer(bh); |
bh | 20 | include/linux/locks.h | bh->b_lock = 1; |
bh | 23 | include/linux/locks.h | extern inline void unlock_buffer(struct buffer_head * bh) |
bh | 25 | include/linux/locks.h | bh->b_lock = 0; |
bh | 26 | include/linux/locks.h | wake_up(&bh->b_wait); |
bh | 115 | include/linux/msdos_fs.h | struct buffer_head *bh; |
bh | 117 | include/linux/msdos_fs.h | if (!(bh = bread(dev,sector >> 1, 1024))) |
bh | 119 | include/linux/msdos_fs.h | *start = bh->b_data+((sector & 1) << SECTOR_BITS); |
bh | 120 | include/linux/msdos_fs.h | return bh; |
bh | 136 | include/linux/msdos_fs.h | extern int msdos_get_entry(struct inode *dir,int *pos,struct buffer_head **bh, |
bh | 33 | kernel/blk_drv/blk.h | struct buffer_head * bh; |
bh | 199 | kernel/blk_drv/blk.h | extern inline void unlock_buffer(struct buffer_head * bh) |
bh | 201 | kernel/blk_drv/blk.h | if (!bh->b_lock) |
bh | 203 | kernel/blk_drv/blk.h | bh->b_lock=0; |
bh | 204 | kernel/blk_drv/blk.h | wake_up(&bh->b_wait); |
bh | 212 | kernel/blk_drv/blk.h | struct buffer_head * bh; |
bh | 226 | kernel/blk_drv/blk.h | if ((bh = req->bh) != NULL) { |
bh | 227 | kernel/blk_drv/blk.h | req->bh = bh->b_reqnext; |
bh | 228 | kernel/blk_drv/blk.h | bh->b_reqnext = NULL; |
bh | 229 | kernel/blk_drv/blk.h | bh->b_uptodate = uptodate; |
bh | 230 | kernel/blk_drv/blk.h | unlock_buffer(bh); |
bh | 231 | kernel/blk_drv/blk.h | if ((bh = req->bh) != NULL) { |
bh | 232 | kernel/blk_drv/blk.h | req->current_nr_sectors = bh->b_size >> 9; |
bh | 237 | kernel/blk_drv/blk.h | req->buffer = bh->b_data; |
bh | 267 | kernel/blk_drv/blk.h | if (CURRENT->bh) { \ |
bh | 268 | kernel/blk_drv/blk.h | if (!CURRENT->bh->b_lock) \ |
bh | 311 | kernel/blk_drv/floppy.c | int floppy_change(struct buffer_head * bh) |
bh | 313 | kernel/blk_drv/floppy.c | unsigned int mask = 1 << (bh->b_dev & 0x03); |
bh | 315 | kernel/blk_drv/floppy.c | if (MAJOR(bh->b_dev) != 2) { |
bh | 330 | kernel/blk_drv/floppy.c | if (!bh) |
bh | 332 | kernel/blk_drv/floppy.c | if (bh->b_dirt) |
bh | 333 | kernel/blk_drv/floppy.c | ll_rw_block(WRITE, 1, &bh); |
bh | 336 | kernel/blk_drv/floppy.c | bh->b_uptodate = 0; |
bh | 337 | kernel/blk_drv/floppy.c | ll_rw_block(READ, 1, &bh); |
bh | 340 | kernel/blk_drv/floppy.c | while (bh->b_lock) |
bh | 341 | kernel/blk_drv/floppy.c | sleep_on(&bh->b_wait); |
bh | 944 | kernel/blk_drv/floppy.c | if (CURRENT->bh) { |
bh | 945 | kernel/blk_drv/floppy.c | if (!CURRENT->bh->b_lock) |
bh | 38 | kernel/blk_drv/genhd.c | struct buffer_head *bh; |
bh | 49 | kernel/blk_drv/genhd.c | if (!(bh = bread(dev,0,1024))) |
bh | 55 | kernel/blk_drv/genhd.c | bh->b_dirt=0; |
bh | 56 | kernel/blk_drv/genhd.c | bh->b_uptodate=0; |
bh | 57 | kernel/blk_drv/genhd.c | if (*(unsigned short *) (bh->b_data+510) == 0xAA55) { |
bh | 58 | kernel/blk_drv/genhd.c | p = 0x1BE + (void *)bh->b_data; |
bh | 85 | kernel/blk_drv/genhd.c | brelse(bh); |
bh | 90 | kernel/blk_drv/genhd.c | brelse(bh); |
bh | 97 | kernel/blk_drv/genhd.c | struct buffer_head *bh; |
bh | 106 | kernel/blk_drv/genhd.c | if (!(bh = bread(dev,0,1024))) { |
bh | 112 | kernel/blk_drv/genhd.c | if (*(unsigned short *) (bh->b_data+510) == 0xAA55) { |
bh | 113 | kernel/blk_drv/genhd.c | p = 0x1BE + (void *)bh->b_data; |
bh | 130 | kernel/blk_drv/genhd.c | if (*(unsigned short *) (bh->b_data+0xfc) == 0x55AA) { |
bh | 131 | kernel/blk_drv/genhd.c | p = 0x1BE + (void *)bh->b_data; |
bh | 148 | kernel/blk_drv/genhd.c | brelse(bh); |
bh | 337 | kernel/blk_drv/hd.c | if (!i || (CURRENT->bh && !SUBSECTOR(i))) |
bh | 381 | kernel/blk_drv/hd.c | if (!i || (CURRENT->bh && !SUBSECTOR(i))) |
bh | 98 | kernel/blk_drv/ll_rw_blk.c | if (req->bh) |
bh | 99 | kernel/blk_drv/ll_rw_blk.c | req->bh->b_dirt = 0; |
bh | 124 | kernel/blk_drv/ll_rw_blk.c | static void make_request(int major,int rw, struct buffer_head * bh) |
bh | 134 | kernel/blk_drv/ll_rw_blk.c | if (bh->b_lock) |
bh | 145 | kernel/blk_drv/ll_rw_blk.c | count = bh->b_size >> 9; |
bh | 146 | kernel/blk_drv/ll_rw_blk.c | sector = bh->b_blocknr * count; |
bh | 148 | kernel/blk_drv/ll_rw_blk.c | if (blk_size[major][MINOR(bh->b_dev)] < (sector + count)>>1) { |
bh | 149 | kernel/blk_drv/ll_rw_blk.c | bh->b_dirt = bh->b_uptodate = 0; |
bh | 152 | kernel/blk_drv/ll_rw_blk.c | lock_buffer(bh); |
bh | 153 | kernel/blk_drv/ll_rw_blk.c | if ((rw == WRITE && !bh->b_dirt) || (rw == READ && bh->b_uptodate)) { |
bh | 154 | kernel/blk_drv/ll_rw_blk.c | unlock_buffer(bh); |
bh | 166 | kernel/blk_drv/ll_rw_blk.c | if (req->dev == bh->b_dev && |
bh | 171 | kernel/blk_drv/ll_rw_blk.c | req->bhtail->b_reqnext = bh; |
bh | 172 | kernel/blk_drv/ll_rw_blk.c | req->bhtail = bh; |
bh | 174 | kernel/blk_drv/ll_rw_blk.c | bh->b_dirt = 0; |
bh | 196 | kernel/blk_drv/ll_rw_blk.c | unlock_buffer(bh); |
bh | 205 | kernel/blk_drv/ll_rw_blk.c | req->dev = bh->b_dev; |
bh | 212 | kernel/blk_drv/ll_rw_blk.c | req->buffer = bh->b_data; |
bh | 214 | kernel/blk_drv/ll_rw_blk.c | req->bh = bh; |
bh | 215 | kernel/blk_drv/ll_rw_blk.c | req->bhtail = bh; |
bh | 255 | kernel/blk_drv/ll_rw_blk.c | req->bh = NULL; |
bh | 266 | kernel/blk_drv/ll_rw_blk.c | void ll_rw_block(int rw, int nr, struct buffer_head * bh[]) |
bh | 276 | kernel/blk_drv/ll_rw_blk.c | while(!bh[0]){ |
bh | 277 | kernel/blk_drv/ll_rw_blk.c | bh++; |
bh | 283 | kernel/blk_drv/ll_rw_blk.c | if(!bh[j]) continue; |
bh | 284 | kernel/blk_drv/ll_rw_blk.c | if (bh[j]->b_size != 1024) { |
bh | 285 | kernel/blk_drv/ll_rw_blk.c | printk("ll_rw_block: only 1024-char blocks implemented (%d)\n",bh[0]->b_size); |
bh | 287 | kernel/blk_drv/ll_rw_blk.c | if (bh[i]) bh[i]->b_dirt = bh[i]->b_uptodate = 0; |
bh | 292 | kernel/blk_drv/ll_rw_blk.c | if ((major=MAJOR(bh[0]->b_dev)) >= MAX_BLKDEV || |
bh | 294 | kernel/blk_drv/ll_rw_blk.c | printk("ll_rw_block: Trying to read nonexistent block-device %04x (%d)\n",bh[0]->b_dev,bh[0]->b_blocknr); |
bh | 296 | kernel/blk_drv/ll_rw_blk.c | if (bh[i]) bh[i]->b_dirt = bh[i]->b_uptodate = 0; |
bh | 299 | kernel/blk_drv/ll_rw_blk.c | if ((rw == WRITE || rw == WRITEA) && is_read_only(bh[0]->b_dev)) { |
bh | 300 | kernel/blk_drv/ll_rw_blk.c | printk("Can't write to read-only device 0x%X\n",bh[0]->b_dev); |
bh | 302 | kernel/blk_drv/ll_rw_blk.c | if (bh[i]) bh[i]->b_dirt = bh[i]->b_uptodate = 0; |
bh | 319 | kernel/blk_drv/ll_rw_blk.c | if (bh[i]) make_request(major, rw, bh[i]); |
bh | 369 | kernel/blk_drv/ll_rw_blk.c | req->bh = NULL; |
bh | 90 | kernel/blk_drv/ramdisk.c | struct buffer_head *bh; |
bh | 103 | kernel/blk_drv/ramdisk.c | bh = breada(ROOT_DEV,block+1,block,block+2,-1); |
bh | 104 | kernel/blk_drv/ramdisk.c | if (!bh) { |
bh | 108 | kernel/blk_drv/ramdisk.c | *((struct minix_super_block *) &s) = *((struct minix_super_block *) bh->b_data); |
bh | 109 | kernel/blk_drv/ramdisk.c | brelse(bh); |
bh | 124 | kernel/blk_drv/ramdisk.c | bh = breada(ROOT_DEV, block, block+1, block+2, -1); |
bh | 126 | kernel/blk_drv/ramdisk.c | bh = bread(ROOT_DEV, block, BLOCK_SIZE); |
bh | 127 | kernel/blk_drv/ramdisk.c | if (!bh) { |
bh | 132 | kernel/blk_drv/ramdisk.c | (void) memcpy(cp, bh->b_data, BLOCK_SIZE); |
bh | 133 | kernel/blk_drv/ramdisk.c | brelse(bh); |
bh | 450 | kernel/blk_drv/scsi/scsi.h | struct buffer_head * bh; |
bh | 461 | kernel/blk_drv/scsi/scsi.h | if ((bh = req->bh) != NULL) { |
bh | 462 | kernel/blk_drv/scsi/scsi.h | req->bh = bh->b_reqnext; |
bh | 463 | kernel/blk_drv/scsi/scsi.h | req->nr_sectors -= bh->b_size >> 9; |
bh | 464 | kernel/blk_drv/scsi/scsi.h | req->sector += bh->b_size >> 9; |
bh | 465 | kernel/blk_drv/scsi/scsi.h | bh->b_reqnext = NULL; |
bh | 466 | kernel/blk_drv/scsi/scsi.h | bh->b_uptodate = uptodate; |
bh | 467 | kernel/blk_drv/scsi/scsi.h | unlock_buffer(bh); |
bh | 468 | kernel/blk_drv/scsi/scsi.h | sectors -= bh->b_size >> 9; |
bh | 469 | kernel/blk_drv/scsi/scsi.h | if ((bh = req->bh) != NULL) { |
bh | 470 | kernel/blk_drv/scsi/scsi.h | req->current_nr_sectors = bh->b_size >> 9; |
bh | 477 | kernel/blk_drv/scsi/scsi.h | } while(sectors && bh); |
bh | 478 | kernel/blk_drv/scsi/scsi.h | if (req->bh){ |
bh | 479 | kernel/blk_drv/scsi/scsi.h | req->buffer = bh->b_data; |
bh | 507 | kernel/blk_drv/scsi/scsi.h | if (CURRENT->bh) { \ |
bh | 508 | kernel/blk_drv/scsi/scsi.h | if (!CURRENT->bh->b_lock) \ |
bh | 50 | kernel/blk_drv/scsi/scsi_debug.c | if (bh){ \ |
bh | 51 | kernel/blk_drv/scsi/scsi_debug.c | if (bh->b_size != 1024) panic ("Wrong bh size"); \ |
bh | 52 | kernel/blk_drv/scsi/scsi_debug.c | if ((bh->b_blocknr << 1) + start != block) \ |
bh | 53 | kernel/blk_drv/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",bh->b_blocknr, block); \ |
bh | 55 | kernel/blk_drv/scsi/scsi_debug.c | if (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
bh | 75 | kernel/blk_drv/scsi/scsi_debug.c | if (SCpnt->request.bh){ \ |
bh | 76 | kernel/blk_drv/scsi/scsi_debug.c | if (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size"); \ |
bh | 77 | kernel/blk_drv/scsi/scsi_debug.c | if ((SCpnt->request.bh->b_blocknr << 1) + start != block) \ |
bh | 78 | kernel/blk_drv/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block); \ |
bh | 80 | kernel/blk_drv/scsi/scsi_debug.c | if (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
bh | 142 | kernel/blk_drv/scsi/scsi_debug.c | struct buffer_head * bh = NULL; |
bh | 229 | kernel/blk_drv/scsi/scsi_debug.c | bh = SCpnt->request.bh; |
bh | 280 | kernel/blk_drv/scsi/scsi_debug.c | memcpy(buff+128, bh, sizeof(struct buffer_head)); |
bh | 282 | kernel/blk_drv/scsi/scsi_debug.c | bh = bh->b_reqnext; |
bh | 285 | kernel/blk_drv/scsi/scsi_debug.c | if(!bh) panic("Too few blocks for linked request."); |
bh | 292 | kernel/blk_drv/scsi/scsi_debug.c | if(bh) scsi_dump(SCpnt, 0); |
bh | 195 | kernel/blk_drv/scsi/sd.c | if (!SCpnt->request.bh) |
bh | 449 | kernel/blk_drv/scsi/sd.c | if (!SCpnt->request.bh || |
bh | 480 | kernel/blk_drv/scsi/sd.c | struct buffer_head * bh; |
bh | 483 | kernel/blk_drv/scsi/sd.c | bh = SCpnt->request.bh; |
bh | 487 | kernel/blk_drv/scsi/sd.c | while(bh && count < scsi_hosts[SCpnt->host].sg_tablesize) { |
bh | 488 | kernel/blk_drv/scsi/sd.c | if ((this_count + (bh->b_size >> 9)) > this_count_max) break; |
bh | 489 | kernel/blk_drv/scsi/sd.c | this_count += (bh->b_size >> 9); |
bh | 491 | kernel/blk_drv/scsi/sd.c | bh = bh->b_reqnext; |
bh | 507 | kernel/blk_drv/scsi/sd.c | bh = SCpnt->request.bh; |
bh | 508 | kernel/blk_drv/scsi/sd.c | for(count = 0, bh = SCpnt->request.bh; count < SCpnt->use_sg; |
bh | 509 | kernel/blk_drv/scsi/sd.c | count++, bh = bh->b_reqnext) { |
bh | 510 | kernel/blk_drv/scsi/sd.c | sgpnt[count].address = bh->b_data; |
bh | 512 | kernel/blk_drv/scsi/sd.c | sgpnt[count].length = bh->b_size; |
bh | 519 | kernel/blk_drv/scsi/sd.c | if(dma_free_sectors < (bh->b_size >> 9) + 5) { |
bh | 115 | kernel/blk_drv/scsi/sr.c | printk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data); |
bh | 133 | kernel/blk_drv/scsi/sr.c | SCpnt->request.bh && |
bh | 134 | kernel/blk_drv/scsi/sr.c | SCpnt->request.bh->b_reqnext && |
bh | 135 | kernel/blk_drv/scsi/sr.c | SCpnt->request.bh->b_reqnext->b_size == 1024) { |
bh | 136 | kernel/blk_drv/scsi/sr.c | memcpy((char *)SCpnt->request.bh->b_reqnext->b_data, |
bh | 164 | kernel/blk_drv/scsi/sr.c | printk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, |
bh | 170 | kernel/blk_drv/scsi/sr.c | if (!SCpnt->request.bh) |
bh | 416 | kernel/blk_drv/scsi/sr.c | struct buffer_head * bh; |
bh | 419 | kernel/blk_drv/scsi/sr.c | bh = SCpnt->request.bh; |
bh | 427 | kernel/blk_drv/scsi/sr.c | while(bh && count < scsi_hosts[SCpnt->host].sg_tablesize) { |
bh | 428 | kernel/blk_drv/scsi/sr.c | if ((this_count + (bh->b_size >> 9)) > this_count_max) break; |
bh | 429 | kernel/blk_drv/scsi/sr.c | this_count += (bh->b_size >> 9); |
bh | 431 | kernel/blk_drv/scsi/sr.c | bh = bh->b_reqnext; |
bh | 457 | kernel/blk_drv/scsi/sr.c | bh = SCpnt->request.bh; |
bh | 466 | kernel/blk_drv/scsi/sr.c | for(bh = SCpnt->request.bh; count < SCpnt->use_sg; |
bh | 467 | kernel/blk_drv/scsi/sr.c | count++, bh = bh->b_reqnext) { |
bh | 468 | kernel/blk_drv/scsi/sr.c | if (bh) { /* Need a placeholder at the end of the record? */ |
bh | 469 | kernel/blk_drv/scsi/sr.c | sgpnt[count].address = bh->b_data; |
bh | 470 | kernel/blk_drv/scsi/sr.c | sgpnt[count].length = bh->b_size; |
bh | 524 | kernel/blk_drv/scsi/sr.c | if (!SCpnt->request.bh) |
bh | 527 | kernel/blk_drv/scsi/sr.c | this_count = (SCpnt->request.bh->b_size >> 9); |
bh | 54 | kernel/irq.c | struct bh_struct *bh; |
bh | 56 | kernel/irq.c | bh = bh_base+nr; |
bh | 57 | kernel/irq.c | if (bh->routine != NULL) |
bh | 58 | kernel/irq.c | bh->routine(bh->data); |