tag | line | file | source code |
bh | 36 | drivers/block/blk.h | struct buffer_head * bh; |
bh | 273 | drivers/block/blk.h | struct buffer_head * bh; |
bh | 287 | drivers/block/blk.h | if ((bh = req->bh) != NULL) { |
bh | 288 | drivers/block/blk.h | req->bh = bh->b_reqnext; |
bh | 289 | drivers/block/blk.h | bh->b_reqnext = NULL; |
bh | 290 | drivers/block/blk.h | bh->b_uptodate = uptodate; |
bh | 291 | drivers/block/blk.h | unlock_buffer(bh); |
bh | 292 | drivers/block/blk.h | if ((bh = req->bh) != NULL) { |
bh | 293 | drivers/block/blk.h | req->current_nr_sectors = bh->b_size >> 9; |
bh | 298 | drivers/block/blk.h | req->buffer = bh->b_data; |
bh | 324 | drivers/block/blk.h | if (CURRENT->bh) { \ |
bh | 325 | drivers/block/blk.h | if (!CURRENT->bh->b_lock) \ |
bh | 451 | drivers/block/floppy.c | static int floppy_change(struct buffer_head * bh) |
bh | 453 | drivers/block/floppy.c | unsigned int mask = 1 << (bh->b_dev & 0x03); |
bh | 455 | drivers/block/floppy.c | if (MAJOR(bh->b_dev) != MAJOR_NR) { |
bh | 472 | drivers/block/floppy.c | if (!bh) |
bh | 474 | drivers/block/floppy.c | if (bh->b_dirt) |
bh | 475 | drivers/block/floppy.c | ll_rw_block(WRITE, 1, &bh); |
bh | 478 | drivers/block/floppy.c | bh->b_uptodate = 0; |
bh | 479 | drivers/block/floppy.c | ll_rw_block(READ, 1, &bh); |
bh | 481 | drivers/block/floppy.c | wait_on_buffer(bh); |
bh | 1135 | drivers/block/floppy.c | if (CURRENT->bh) { |
bh | 1136 | drivers/block/floppy.c | if (!CURRENT->bh->b_lock) |
bh | 1430 | drivers/block/floppy.c | struct buffer_head * bh; |
bh | 1432 | drivers/block/floppy.c | if (!(bh = getblk(dev,0,1024))) |
bh | 1434 | drivers/block/floppy.c | i = floppy_change(bh); |
bh | 1435 | drivers/block/floppy.c | brelse(bh); |
bh | 38 | drivers/block/genhd.c | struct buffer_head *bh; |
bh | 49 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) |
bh | 55 | drivers/block/genhd.c | bh->b_dirt = 0; |
bh | 56 | drivers/block/genhd.c | bh->b_uptodate = 0; |
bh | 57 | drivers/block/genhd.c | bh->b_req = 0; |
bh | 58 | drivers/block/genhd.c | if (*(unsigned short *) (bh->b_data+510) == 0xAA55) { |
bh | 59 | drivers/block/genhd.c | p = (struct partition *) (0x1BE + bh->b_data); |
bh | 86 | drivers/block/genhd.c | brelse(bh); |
bh | 91 | drivers/block/genhd.c | brelse(bh); |
bh | 98 | drivers/block/genhd.c | struct buffer_head *bh; |
bh | 107 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) { |
bh | 113 | drivers/block/genhd.c | if (*(unsigned short *) (bh->b_data+510) == 0xAA55) { |
bh | 114 | drivers/block/genhd.c | p = (struct partition *) (0x1BE + bh->b_data); |
bh | 131 | drivers/block/genhd.c | if (*(unsigned short *) (bh->b_data+0xfc) == 0x55AA) { |
bh | 132 | drivers/block/genhd.c | p = (struct partition *) (0x1BE + bh->b_data); |
bh | 149 | drivers/block/genhd.c | brelse(bh); |
bh | 522 | drivers/block/hd.c | WCURRENT.bh = WCURRENT.bh->b_reqnext; |
bh | 523 | drivers/block/hd.c | if (WCURRENT.bh == NULL) |
bh | 525 | drivers/block/hd.c | WCURRENT.current_nr_sectors = WCURRENT.bh->b_size>>9; |
bh | 526 | drivers/block/hd.c | WCURRENT.buffer = WCURRENT.bh->b_data; |
bh | 600 | drivers/block/hd.c | if (!i || (CURRENT->bh && !SUBSECTOR(i))) |
bh | 154 | drivers/block/ll_rw_blk.c | if (req->bh) |
bh | 155 | drivers/block/ll_rw_blk.c | mark_buffer_clean(req->bh); |
bh | 178 | drivers/block/ll_rw_blk.c | static void make_request(int major,int rw, struct buffer_head * bh) |
bh | 188 | drivers/block/ll_rw_blk.c | if (bh->b_lock) |
bh | 199 | drivers/block/ll_rw_blk.c | count = bh->b_size >> 9; |
bh | 200 | drivers/block/ll_rw_blk.c | sector = bh->b_blocknr * count; |
bh | 202 | drivers/block/ll_rw_blk.c | if (blk_size[major][MINOR(bh->b_dev)] < (sector + count)>>1) { |
bh | 203 | drivers/block/ll_rw_blk.c | bh->b_dirt = bh->b_uptodate = 0; |
bh | 206 | drivers/block/ll_rw_blk.c | lock_buffer(bh); |
bh | 207 | drivers/block/ll_rw_blk.c | if ((rw == WRITE && !bh->b_dirt) || (rw == READ && bh->b_uptodate)) { |
bh | 208 | drivers/block/ll_rw_blk.c | unlock_buffer(bh); |
bh | 235 | drivers/block/ll_rw_blk.c | if (req->dev == bh->b_dev && |
bh | 241 | drivers/block/ll_rw_blk.c | req->bhtail->b_reqnext = bh; |
bh | 242 | drivers/block/ll_rw_blk.c | req->bhtail = bh; |
bh | 244 | drivers/block/ll_rw_blk.c | mark_buffer_clean(bh); |
bh | 249 | drivers/block/ll_rw_blk.c | if (req->dev == bh->b_dev && |
bh | 256 | drivers/block/ll_rw_blk.c | bh->b_reqnext = req->bh; |
bh | 257 | drivers/block/ll_rw_blk.c | req->buffer = bh->b_data; |
bh | 260 | drivers/block/ll_rw_blk.c | mark_buffer_clean(bh); |
bh | 261 | drivers/block/ll_rw_blk.c | req->bh = bh; |
bh | 271 | drivers/block/ll_rw_blk.c | req = get_request(max_req, bh->b_dev); |
bh | 277 | drivers/block/ll_rw_blk.c | unlock_buffer(bh); |
bh | 294 | drivers/block/ll_rw_blk.c | req->buffer = bh->b_data; |
bh | 296 | drivers/block/ll_rw_blk.c | req->bh = bh; |
bh | 297 | drivers/block/ll_rw_blk.c | req->bhtail = bh; |
bh | 329 | drivers/block/ll_rw_blk.c | req->bh = NULL; |
bh | 339 | drivers/block/ll_rw_blk.c | void ll_rw_block(int rw, int nr, struct buffer_head * bh[]) |
bh | 349 | drivers/block/ll_rw_blk.c | while (!*bh) { |
bh | 350 | drivers/block/ll_rw_blk.c | bh++; |
bh | 356 | drivers/block/ll_rw_blk.c | if ((major = MAJOR(bh[0]->b_dev)) < MAX_BLKDEV) |
bh | 361 | drivers/block/ll_rw_blk.c | (unsigned long) bh[0]->b_dev, bh[0]->b_blocknr); |
bh | 368 | drivers/block/ll_rw_blk.c | i = blksize_size[major][MINOR(bh[0]->b_dev)]; |
bh | 375 | drivers/block/ll_rw_blk.c | if (bh[i] && bh[i]->b_size != correct_size) { |
bh | 378 | drivers/block/ll_rw_blk.c | correct_size, bh[i]->b_size); |
bh | 383 | drivers/block/ll_rw_blk.c | if ((rw == WRITE || rw == WRITEA) && is_read_only(bh[0]->b_dev)) { |
bh | 384 | drivers/block/ll_rw_blk.c | printk("Can't write to read-only device 0x%X\n",bh[0]->b_dev); |
bh | 403 | drivers/block/ll_rw_blk.c | if (bh[i]) { |
bh | 404 | drivers/block/ll_rw_blk.c | bh[i]->b_req = 1; |
bh | 405 | drivers/block/ll_rw_blk.c | make_request(major, rw, bh[i]); |
bh | 422 | drivers/block/ll_rw_blk.c | if (bh[i]) |
bh | 423 | drivers/block/ll_rw_blk.c | bh[i]->b_dirt = bh[i]->b_uptodate = 0; |
bh | 464 | drivers/block/ll_rw_blk.c | req->bh = NULL; |
bh | 628 | drivers/block/mcd.c | if (CURRENT->bh) { |
bh | 629 | drivers/block/mcd.c | if (!CURRENT->bh->b_lock) |
bh | 99 | drivers/block/ramdisk.c | struct buffer_head *bh; |
bh | 116 | drivers/block/ramdisk.c | bh = breada(ROOT_DEV,block+1,BLOCK_SIZE, 0, PAGE_SIZE); |
bh | 117 | drivers/block/ramdisk.c | if (!bh) { |
bh | 124 | drivers/block/ramdisk.c | *((struct minix_super_block *) bh->b_data); |
bh | 125 | drivers/block/ramdisk.c | brelse(bh); |
bh | 144 | drivers/block/ramdisk.c | bh = breada(ROOT_DEV, block, BLOCK_SIZE, 0, PAGE_SIZE); |
bh | 146 | drivers/block/ramdisk.c | bh = bread(ROOT_DEV, block, BLOCK_SIZE); |
bh | 147 | drivers/block/ramdisk.c | if (!bh) { |
bh | 152 | drivers/block/ramdisk.c | (void) memcpy(cp, bh->b_data, BLOCK_SIZE); |
bh | 153 | drivers/block/ramdisk.c | brelse(bh); |
bh | 581 | drivers/scsi/scsi.c | struct buffer_head * bh, *bhp; |
bh | 605 | drivers/scsi/scsi.c | bhp = bh = req->bh; |
bh | 606 | drivers/scsi/scsi.c | if(!tablesize) bh = NULL; |
bh | 609 | drivers/scsi/scsi.c | while(req->nr_sectors && bh){ |
bh | 611 | drivers/scsi/scsi.c | if(!bhp || !CONTIGUOUS_BUFFERS(bh,bhp)) tablesize--; |
bh | 612 | drivers/scsi/scsi.c | req->nr_sectors -= bh->b_size >> 9; |
bh | 613 | drivers/scsi/scsi.c | req->sector += bh->b_size >> 9; |
bh | 615 | drivers/scsi/scsi.c | bh = bhp; |
bh | 617 | drivers/scsi/scsi.c | if(req->nr_sectors && bh && bh->b_reqnext){ /* Any leftovers? */ |
bh | 618 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
bh | 619 | drivers/scsi/scsi.c | req->bh = bh->b_reqnext; /* Divide request */ |
bh | 620 | drivers/scsi/scsi.c | bh->b_reqnext = NULL; |
bh | 621 | drivers/scsi/scsi.c | bh = req->bh; |
bh | 625 | drivers/scsi/scsi.c | req->current_nr_sectors = bh->b_size >> 9; |
bh | 626 | drivers/scsi/scsi.c | req->buffer = bh->b_data; |
bh | 659 | drivers/scsi/scsi.c | struct buffer_head * bh, *bhp; |
bh | 705 | drivers/scsi/scsi.c | bhp = bh = req->bh; |
bh | 706 | drivers/scsi/scsi.c | if(!tablesize) bh = NULL; |
bh | 709 | drivers/scsi/scsi.c | while(req->nr_sectors && bh){ |
bh | 711 | drivers/scsi/scsi.c | if(!bhp || !CONTIGUOUS_BUFFERS(bh,bhp)) tablesize--; |
bh | 712 | drivers/scsi/scsi.c | req->nr_sectors -= bh->b_size >> 9; |
bh | 713 | drivers/scsi/scsi.c | req->sector += bh->b_size >> 9; |
bh | 715 | drivers/scsi/scsi.c | bh = bhp; |
bh | 717 | drivers/scsi/scsi.c | if(req->nr_sectors && bh && bh->b_reqnext){ /* Any leftovers? */ |
bh | 718 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
bh | 719 | drivers/scsi/scsi.c | req->bh = bh->b_reqnext; /* Divide request */ |
bh | 720 | drivers/scsi/scsi.c | bh->b_reqnext = NULL; |
bh | 721 | drivers/scsi/scsi.c | bh = req->bh; |
bh | 724 | drivers/scsi/scsi.c | req->current_nr_sectors = bh->b_size >> 9; |
bh | 725 | drivers/scsi/scsi.c | req->buffer = bh->b_data; |
bh | 524 | drivers/scsi/scsi.h | struct buffer_head * bh; |
bh | 534 | drivers/scsi/scsi.h | if ((bh = req->bh) != NULL) { |
bh | 535 | drivers/scsi/scsi.h | req->bh = bh->b_reqnext; |
bh | 536 | drivers/scsi/scsi.h | req->nr_sectors -= bh->b_size >> 9; |
bh | 537 | drivers/scsi/scsi.h | req->sector += bh->b_size >> 9; |
bh | 538 | drivers/scsi/scsi.h | bh->b_reqnext = NULL; |
bh | 539 | drivers/scsi/scsi.h | bh->b_uptodate = uptodate; |
bh | 540 | drivers/scsi/scsi.h | unlock_buffer(bh); |
bh | 541 | drivers/scsi/scsi.h | sectors -= bh->b_size >> 9; |
bh | 542 | drivers/scsi/scsi.h | if ((bh = req->bh) != NULL) { |
bh | 543 | drivers/scsi/scsi.h | req->current_nr_sectors = bh->b_size >> 9; |
bh | 550 | drivers/scsi/scsi.h | } while(sectors && bh); |
bh | 551 | drivers/scsi/scsi.h | if (req->bh){ |
bh | 552 | drivers/scsi/scsi.h | req->buffer = bh->b_data; |
bh | 577 | drivers/scsi/scsi.h | if (CURRENT->bh) { \ |
bh | 578 | drivers/scsi/scsi.h | if (!CURRENT->bh->b_lock) \ |
bh | 68 | drivers/scsi/scsi_debug.c | if (bh){ \ |
bh | 69 | drivers/scsi/scsi_debug.c | if (bh->b_size != 1024) panic ("Wrong bh size"); \ |
bh | 70 | drivers/scsi/scsi_debug.c | if ((bh->b_blocknr << 1) + start != block) \ |
bh | 71 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",bh->b_blocknr, block); \ |
bh | 73 | drivers/scsi/scsi_debug.c | if (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
bh | 93 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh){ \ |
bh | 94 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size"); \ |
bh | 95 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.bh->b_blocknr << 1) + start != block) \ |
bh | 96 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block); \ |
bh | 98 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
bh | 160 | drivers/scsi/scsi_debug.c | struct buffer_head * bh = NULL; |
bh | 262 | drivers/scsi/scsi_debug.c | bh = SCpnt->request.bh; |
bh | 322 | drivers/scsi/scsi_debug.c | memcpy(buff+128, bh, sizeof(struct buffer_head)); |
bh | 325 | drivers/scsi/scsi_debug.c | bh = bh->b_reqnext; |
bh | 328 | drivers/scsi/scsi_debug.c | if(!bh) panic("Too few blocks for linked request."); |
bh | 340 | drivers/scsi/scsi_debug.c | if(bh) scsi_dump(SCpnt, 0); |
bh | 206 | drivers/scsi/sd.c | if (!SCpnt->request.bh) |
bh | 395 | drivers/scsi/sd.c | struct buffer_head * bh, *bhp; |
bh | 466 | drivers/scsi/sd.c | if (contiguous && SCpnt->request.bh && |
bh | 467 | drivers/scsi/sd.c | ((int) SCpnt->request.bh->b_data) + (SCpnt->request.nr_sectors << 9) - 1 > |
bh | 469 | drivers/scsi/sd.c | if(((int) SCpnt->request.bh->b_data) > ISA_DMA_THRESHOLD) |
bh | 474 | drivers/scsi/sd.c | if(contiguous && SCpnt->request.bh && SCpnt->request.bh->b_reqnext) |
bh | 475 | drivers/scsi/sd.c | for(bh = SCpnt->request.bh, bhp = bh->b_reqnext; bhp; bh = bhp, |
bh | 477 | drivers/scsi/sd.c | if(!CONTIGUOUS_BUFFERS(bh,bhp)) { |
bh | 483 | drivers/scsi/sd.c | if (!SCpnt->request.bh || contiguous) { |
bh | 517 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
bh | 522 | drivers/scsi/sd.c | while(bh) { |
bh | 523 | drivers/scsi/sd.c | if ((this_count + (bh->b_size >> 9)) > this_count_max) break; |
bh | 524 | drivers/scsi/sd.c | if(!bhp || !CONTIGUOUS_BUFFERS(bhp,bh) || |
bh | 527 | drivers/scsi/sd.c | ((unsigned int) bh->b_data-1) == ISA_DMA_THRESHOLD)) { |
bh | 531 | drivers/scsi/sd.c | this_count += (bh->b_size >> 9); |
bh | 532 | drivers/scsi/sd.c | bhp = bh; |
bh | 533 | drivers/scsi/sd.c | bh = bh->b_reqnext; |
bh | 537 | drivers/scsi/sd.c | ((unsigned int) SCpnt->request.bh->b_data-1) == ISA_DMA_THRESHOLD) count--; |
bh | 556 | drivers/scsi/sd.c | for(count = 0, bh = SCpnt->request.bh, bhp = bh->b_reqnext; |
bh | 557 | drivers/scsi/sd.c | count < SCpnt->use_sg && bh; |
bh | 558 | drivers/scsi/sd.c | count++, bh = bhp) { |
bh | 560 | drivers/scsi/sd.c | bhp = bh->b_reqnext; |
bh | 562 | drivers/scsi/sd.c | if(!sgpnt[count].address) sgpnt[count].address = bh->b_data; |
bh | 563 | drivers/scsi/sd.c | sgpnt[count].length += bh->b_size; |
bh | 564 | drivers/scsi/sd.c | counted += bh->b_size >> 9; |
bh | 596 | drivers/scsi/sd.c | this_count = counted -= bh->b_size >> 9; |
bh | 606 | drivers/scsi/sd.c | if(bhp && CONTIGUOUS_BUFFERS(bh,bhp) && CLUSTERABLE_DEVICE(SCpnt)) { |
bh | 638 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
bh | 641 | drivers/scsi/sd.c | while(bh){ |
bh | 642 | drivers/scsi/sd.c | printk("[%p %lx] ", bh->b_data, bh->b_size); |
bh | 643 | drivers/scsi/sd.c | bh = bh->b_reqnext; |
bh | 130 | drivers/scsi/sr.c | printk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data); |
bh | 148 | drivers/scsi/sr.c | SCpnt->request.bh && |
bh | 149 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext && |
bh | 150 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext->b_size == 1024) { |
bh | 151 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.bh->b_reqnext->b_data, |
bh | 179 | drivers/scsi/sr.c | printk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, |
bh | 185 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
bh | 437 | drivers/scsi/sr.c | struct buffer_head * bh; |
bh | 440 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
bh | 448 | drivers/scsi/sr.c | while(bh && count < SCpnt->host->sg_tablesize) { |
bh | 449 | drivers/scsi/sr.c | if ((this_count + (bh->b_size >> 9)) > this_count_max) break; |
bh | 450 | drivers/scsi/sr.c | this_count += (bh->b_size >> 9); |
bh | 452 | drivers/scsi/sr.c | bh = bh->b_reqnext; |
bh | 478 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
bh | 487 | drivers/scsi/sr.c | for(bh = SCpnt->request.bh; count < SCpnt->use_sg; |
bh | 488 | drivers/scsi/sr.c | count++, bh = bh->b_reqnext) { |
bh | 489 | drivers/scsi/sr.c | if (bh) { /* Need a placeholder at the end of the record? */ |
bh | 490 | drivers/scsi/sr.c | sgpnt[count].address = bh->b_data; |
bh | 491 | drivers/scsi/sr.c | sgpnt[count].length = bh->b_size; |
bh | 545 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
bh | 548 | drivers/scsi/sr.c | this_count = (SCpnt->request.bh->b_size >> 9); |
bh | 31 | fs/block_dev.c | struct buffer_head * bh; |
bh | 64 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
bh | 66 | fs/block_dev.c | bh = breada(dev,block,block+1,block+2,-1); |
bh | 72 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
bh | 74 | fs/block_dev.c | if (chars != blocksize && !bh->b_uptodate) { |
bh | 78 | fs/block_dev.c | brelse(bh); |
bh | 79 | fs/block_dev.c | bh = bread(dev,block,blocksize); |
bh | 87 | fs/block_dev.c | bhlist[0] = bh; |
bh | 106 | fs/block_dev.c | if (!bh) |
bh | 108 | fs/block_dev.c | p = offset + bh->b_data; |
bh | 116 | fs/block_dev.c | bh->b_uptodate = 1; |
bh | 117 | fs/block_dev.c | mark_buffer_dirty(bh, 0); |
bh | 118 | fs/block_dev.c | brelse(bh); |
bh | 111 | fs/buffer.c | void __wait_on_buffer(struct buffer_head * bh) |
bh | 115 | fs/buffer.c | bh->b_count++; |
bh | 116 | fs/buffer.c | add_wait_queue(&bh->b_wait, &wait); |
bh | 119 | fs/buffer.c | if (bh->b_lock) { |
bh | 123 | fs/buffer.c | remove_wait_queue(&bh->b_wait, &wait); |
bh | 124 | fs/buffer.c | bh->b_count--; |
bh | 142 | fs/buffer.c | struct buffer_head * bh, *next; |
bh | 156 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 157 | fs/buffer.c | if(!bh) continue; |
bh | 158 | fs/buffer.c | for (i = nr_buffers_type[nlist]*2 ; i-- > 0 ; bh = next) { |
bh | 159 | fs/buffer.c | if(bh->b_list != nlist) goto repeat1; |
bh | 160 | fs/buffer.c | next = bh->b_next_free; |
bh | 162 | fs/buffer.c | if (dev && bh->b_dev != dev) |
bh | 164 | fs/buffer.c | if (bh->b_lock) |
bh | 172 | fs/buffer.c | wait_on_buffer (bh); |
bh | 176 | fs/buffer.c | if (wait && bh->b_req && !bh->b_lock && |
bh | 177 | fs/buffer.c | !bh->b_dirt && !bh->b_uptodate) { |
bh | 179 | fs/buffer.c | printk("Weird - unlocked, clean and not uptodate buffer on list %d %x %lu\n", nlist, bh->b_dev, bh->b_blocknr); |
bh | 184 | fs/buffer.c | if (!bh->b_dirt || pass>=2) |
bh | 186 | fs/buffer.c | bh->b_count++; |
bh | 187 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 188 | fs/buffer.c | ll_rw_block(WRITE, 1, &bh); |
bh | 191 | fs/buffer.c | printk("[%d %x %ld] ", nlist, bh->b_dev, bh->b_blocknr); |
bh | 194 | fs/buffer.c | bh->b_count--; |
bh | 254 | fs/buffer.c | struct buffer_head * bh; |
bh | 257 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 259 | fs/buffer.c | bh = bh->b_next_free) { |
bh | 260 | fs/buffer.c | if (bh->b_dev != dev) |
bh | 262 | fs/buffer.c | wait_on_buffer(bh); |
bh | 263 | fs/buffer.c | if (bh->b_dev == dev) |
bh | 264 | fs/buffer.c | bh->b_flushtime = bh->b_uptodate = |
bh | 265 | fs/buffer.c | bh->b_dirt = bh->b_req = 0; |
bh | 273 | fs/buffer.c | static inline void remove_from_hash_queue(struct buffer_head * bh) |
bh | 275 | fs/buffer.c | if (bh->b_next) |
bh | 276 | fs/buffer.c | bh->b_next->b_prev = bh->b_prev; |
bh | 277 | fs/buffer.c | if (bh->b_prev) |
bh | 278 | fs/buffer.c | bh->b_prev->b_next = bh->b_next; |
bh | 279 | fs/buffer.c | if (hash(bh->b_dev,bh->b_blocknr) == bh) |
bh | 280 | fs/buffer.c | hash(bh->b_dev,bh->b_blocknr) = bh->b_next; |
bh | 281 | fs/buffer.c | bh->b_next = bh->b_prev = NULL; |
bh | 284 | fs/buffer.c | static inline void remove_from_lru_list(struct buffer_head * bh) |
bh | 286 | fs/buffer.c | if (!(bh->b_prev_free) || !(bh->b_next_free)) |
bh | 288 | fs/buffer.c | if (bh->b_dev == 0xffff) panic("LRU list corrupted"); |
bh | 289 | fs/buffer.c | bh->b_prev_free->b_next_free = bh->b_next_free; |
bh | 290 | fs/buffer.c | bh->b_next_free->b_prev_free = bh->b_prev_free; |
bh | 292 | fs/buffer.c | if (lru_list[bh->b_list] == bh) |
bh | 293 | fs/buffer.c | lru_list[bh->b_list] = bh->b_next_free; |
bh | 294 | fs/buffer.c | if(lru_list[bh->b_list] == bh) |
bh | 295 | fs/buffer.c | lru_list[bh->b_list] = NULL; |
bh | 296 | fs/buffer.c | bh->b_next_free = bh->b_prev_free = NULL; |
bh | 299 | fs/buffer.c | static inline void remove_from_free_list(struct buffer_head * bh) |
bh | 301 | fs/buffer.c | int isize = BUFSIZE_INDEX(bh->b_size); |
bh | 302 | fs/buffer.c | if (!(bh->b_prev_free) || !(bh->b_next_free)) |
bh | 304 | fs/buffer.c | if(bh->b_dev != 0xffff) panic("Free list corrupted"); |
bh | 308 | fs/buffer.c | if(bh->b_next_free == bh) |
bh | 311 | fs/buffer.c | bh->b_prev_free->b_next_free = bh->b_next_free; |
bh | 312 | fs/buffer.c | bh->b_next_free->b_prev_free = bh->b_prev_free; |
bh | 313 | fs/buffer.c | if (free_list[isize] == bh) |
bh | 314 | fs/buffer.c | free_list[isize] = bh->b_next_free; |
bh | 316 | fs/buffer.c | bh->b_next_free = bh->b_prev_free = NULL; |
bh | 319 | fs/buffer.c | static inline void remove_from_queues(struct buffer_head * bh) |
bh | 321 | fs/buffer.c | if(bh->b_dev == 0xffff) { |
bh | 322 | fs/buffer.c | remove_from_free_list(bh); /* Free list entries should not be |
bh | 326 | fs/buffer.c | nr_buffers_type[bh->b_list]--; |
bh | 327 | fs/buffer.c | nr_buffers_st[BUFSIZE_INDEX(bh->b_size)][bh->b_list]--; |
bh | 328 | fs/buffer.c | remove_from_hash_queue(bh); |
bh | 329 | fs/buffer.c | remove_from_lru_list(bh); |
bh | 332 | fs/buffer.c | static inline void put_last_lru(struct buffer_head * bh) |
bh | 334 | fs/buffer.c | if (!bh) |
bh | 336 | fs/buffer.c | if (bh == lru_list[bh->b_list]) { |
bh | 337 | fs/buffer.c | lru_list[bh->b_list] = bh->b_next_free; |
bh | 340 | fs/buffer.c | if(bh->b_dev == 0xffff) panic("Wrong block for lru list"); |
bh | 341 | fs/buffer.c | remove_from_lru_list(bh); |
bh | 344 | fs/buffer.c | if(!lru_list[bh->b_list]) { |
bh | 345 | fs/buffer.c | lru_list[bh->b_list] = bh; |
bh | 346 | fs/buffer.c | lru_list[bh->b_list]->b_prev_free = bh; |
bh | 349 | fs/buffer.c | bh->b_next_free = lru_list[bh->b_list]; |
bh | 350 | fs/buffer.c | bh->b_prev_free = lru_list[bh->b_list]->b_prev_free; |
bh | 351 | fs/buffer.c | lru_list[bh->b_list]->b_prev_free->b_next_free = bh; |
bh | 352 | fs/buffer.c | lru_list[bh->b_list]->b_prev_free = bh; |
bh | 355 | fs/buffer.c | static inline void put_last_free(struct buffer_head * bh) |
bh | 358 | fs/buffer.c | if (!bh) |
bh | 361 | fs/buffer.c | isize = BUFSIZE_INDEX(bh->b_size); |
bh | 362 | fs/buffer.c | bh->b_dev = 0xffff; /* So it is obvious we are on the free list */ |
bh | 366 | fs/buffer.c | free_list[isize] = bh; |
bh | 367 | fs/buffer.c | bh->b_prev_free = bh; |
bh | 371 | fs/buffer.c | bh->b_next_free = free_list[isize]; |
bh | 372 | fs/buffer.c | bh->b_prev_free = free_list[isize]->b_prev_free; |
bh | 373 | fs/buffer.c | free_list[isize]->b_prev_free->b_next_free = bh; |
bh | 374 | fs/buffer.c | free_list[isize]->b_prev_free = bh; |
bh | 377 | fs/buffer.c | static inline void insert_into_queues(struct buffer_head * bh) |
bh | 381 | fs/buffer.c | if(bh->b_dev == 0xffff) { |
bh | 382 | fs/buffer.c | put_last_free(bh); |
bh | 385 | fs/buffer.c | if(!lru_list[bh->b_list]) { |
bh | 386 | fs/buffer.c | lru_list[bh->b_list] = bh; |
bh | 387 | fs/buffer.c | bh->b_prev_free = bh; |
bh | 389 | fs/buffer.c | if (bh->b_next_free) panic("VFS: buffer LRU pointers corrupted"); |
bh | 390 | fs/buffer.c | bh->b_next_free = lru_list[bh->b_list]; |
bh | 391 | fs/buffer.c | bh->b_prev_free = lru_list[bh->b_list]->b_prev_free; |
bh | 392 | fs/buffer.c | lru_list[bh->b_list]->b_prev_free->b_next_free = bh; |
bh | 393 | fs/buffer.c | lru_list[bh->b_list]->b_prev_free = bh; |
bh | 394 | fs/buffer.c | nr_buffers_type[bh->b_list]++; |
bh | 395 | fs/buffer.c | nr_buffers_st[BUFSIZE_INDEX(bh->b_size)][bh->b_list]++; |
bh | 397 | fs/buffer.c | bh->b_prev = NULL; |
bh | 398 | fs/buffer.c | bh->b_next = NULL; |
bh | 399 | fs/buffer.c | if (!bh->b_dev) |
bh | 401 | fs/buffer.c | bh->b_next = hash(bh->b_dev,bh->b_blocknr); |
bh | 402 | fs/buffer.c | hash(bh->b_dev,bh->b_blocknr) = bh; |
bh | 403 | fs/buffer.c | if (bh->b_next) |
bh | 404 | fs/buffer.c | bh->b_next->b_prev = bh; |
bh | 432 | fs/buffer.c | struct buffer_head * bh; |
bh | 435 | fs/buffer.c | if (!(bh=find_buffer(dev,block,size))) |
bh | 437 | fs/buffer.c | bh->b_count++; |
bh | 438 | fs/buffer.c | wait_on_buffer(bh); |
bh | 439 | fs/buffer.c | if (bh->b_dev == dev && bh->b_blocknr == block && bh->b_size == size) |
bh | 440 | fs/buffer.c | return bh; |
bh | 441 | fs/buffer.c | bh->b_count--; |
bh | 448 | fs/buffer.c | struct buffer_head * bh, *bhnext; |
bh | 471 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 472 | fs/buffer.c | for (i = nr_buffers_type[nlist]*2 ; --i > 0 ; bh = bhnext) { |
bh | 473 | fs/buffer.c | if(!bh) break; |
bh | 474 | fs/buffer.c | bhnext = bh->b_next_free; |
bh | 475 | fs/buffer.c | if (bh->b_dev != dev) |
bh | 477 | fs/buffer.c | if (bh->b_size == size) |
bh | 480 | fs/buffer.c | wait_on_buffer(bh); |
bh | 481 | fs/buffer.c | if (bh->b_dev == dev && bh->b_size != size) { |
bh | 482 | fs/buffer.c | bh->b_uptodate = bh->b_dirt = bh->b_req = |
bh | 483 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 485 | fs/buffer.c | remove_from_hash_queue(bh); |
bh | 490 | fs/buffer.c | #define BADNESS(bh) (((bh)->b_dirt<<1)+(bh)->b_lock) |
bh | 494 | fs/buffer.c | struct buffer_head * bh, * tmp; |
bh | 548 | fs/buffer.c | for (bh = lru_list[i]; buffers[i] > 0; bh = tmp, buffers[i]--) |
bh | 551 | fs/buffer.c | tmp = bh->b_next_free; |
bh | 552 | fs/buffer.c | if (!bh) break; |
bh | 554 | fs/buffer.c | if (mem_map[MAP_NR((unsigned long) bh->b_data)] != 1 || |
bh | 555 | fs/buffer.c | bh->b_dirt) { |
bh | 556 | fs/buffer.c | refile_buffer(bh); |
bh | 560 | fs/buffer.c | if (bh->b_count || bh->b_size != size) |
bh | 567 | fs/buffer.c | if(bh->b_lock && (i == BUF_LOCKED || i == BUF_LOCKED1)) { |
bh | 572 | fs/buffer.c | if (BADNESS(bh)) continue; |
bh | 576 | fs/buffer.c | else candidate[i] = bh; |
bh | 597 | fs/buffer.c | bh = candidate[i]; |
bh | 598 | fs/buffer.c | candidate[i] = bh->b_next_free; |
bh | 599 | fs/buffer.c | if(candidate[i] == bh) candidate[i] = NULL; /* Got last one */ |
bh | 600 | fs/buffer.c | if (bh->b_count || bh->b_size != size) |
bh | 602 | fs/buffer.c | if (mem_map[MAP_NR((unsigned long) bh->b_data)] != 1) |
bh | 604 | fs/buffer.c | if (BADNESS(bh)) panic("Buffer in candidate list with BADNESS != 0\n"); |
bh | 606 | fs/buffer.c | if(bh->b_dev == 0xffff) panic("Wrong list"); |
bh | 607 | fs/buffer.c | remove_from_queues(bh); |
bh | 608 | fs/buffer.c | bh->b_dev = 0xffff; |
bh | 609 | fs/buffer.c | put_last_free(bh); |
bh | 610 | fs/buffer.c | needed -= bh->b_size; |
bh | 620 | fs/buffer.c | for (bh = candidate[i]; buffers[i] > 0; bh = tmp, buffers[i]--) { |
bh | 622 | fs/buffer.c | tmp = bh->b_next_free; |
bh | 623 | fs/buffer.c | if (!bh) break; |
bh | 625 | fs/buffer.c | if (mem_map[MAP_NR((unsigned long) bh->b_data)] != 1 || |
bh | 626 | fs/buffer.c | bh->b_dirt) { |
bh | 627 | fs/buffer.c | refile_buffer(bh); |
bh | 631 | fs/buffer.c | if (bh->b_count || bh->b_size != size) |
bh | 638 | fs/buffer.c | if(bh->b_lock && (i == BUF_LOCKED || i == BUF_LOCKED1)) { |
bh | 643 | fs/buffer.c | if (BADNESS(bh)) continue; |
bh | 647 | fs/buffer.c | else candidate[i] = bh; |
bh | 685 | fs/buffer.c | struct buffer_head * bh; |
bh | 695 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
bh | 696 | fs/buffer.c | if (bh) { |
bh | 697 | fs/buffer.c | if (bh->b_uptodate && !bh->b_dirt) |
bh | 698 | fs/buffer.c | put_last_lru(bh); |
bh | 699 | fs/buffer.c | if(!bh->b_dirt) bh->b_flushtime = 0; |
bh | 700 | fs/buffer.c | return bh; |
bh | 708 | fs/buffer.c | bh = free_list[isize]; |
bh | 709 | fs/buffer.c | remove_from_free_list(bh); |
bh | 713 | fs/buffer.c | bh->b_count=1; |
bh | 714 | fs/buffer.c | bh->b_dirt=0; |
bh | 715 | fs/buffer.c | bh->b_lock=0; |
bh | 716 | fs/buffer.c | bh->b_uptodate=0; |
bh | 717 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 718 | fs/buffer.c | bh->b_req=0; |
bh | 719 | fs/buffer.c | bh->b_dev=dev; |
bh | 720 | fs/buffer.c | bh->b_blocknr=block; |
bh | 721 | fs/buffer.c | insert_into_queues(bh); |
bh | 722 | fs/buffer.c | return bh; |
bh | 797 | fs/buffer.c | struct buffer_head * bh; |
bh | 799 | fs/buffer.c | if (!(bh = getblk(dev, block, size))) { |
bh | 804 | fs/buffer.c | if (bh->b_uptodate) |
bh | 805 | fs/buffer.c | return bh; |
bh | 806 | fs/buffer.c | ll_rw_block(READ, 1, &bh); |
bh | 807 | fs/buffer.c | wait_on_buffer(bh); |
bh | 808 | fs/buffer.c | if (bh->b_uptodate) |
bh | 809 | fs/buffer.c | return bh; |
bh | 810 | fs/buffer.c | brelse(bh); |
bh | 827 | fs/buffer.c | struct buffer_head * bh; |
bh | 834 | fs/buffer.c | if (block < 0 || !(bh = getblk(dev,block,bufsize))) |
bh | 837 | fs/buffer.c | index = BUFSIZE_INDEX(bh->b_size); |
bh | 839 | fs/buffer.c | if (bh->b_uptodate) |
bh | 840 | fs/buffer.c | return bh; |
bh | 849 | fs/buffer.c | bhlist[0] = bh; |
bh | 852 | fs/buffer.c | bh = getblk(dev,block+i,bufsize); |
bh | 853 | fs/buffer.c | if (bh->b_uptodate) { |
bh | 854 | fs/buffer.c | brelse(bh); |
bh | 857 | fs/buffer.c | bhlist[j++] = bh; |
bh | 867 | fs/buffer.c | bh = bhlist[0]; |
bh | 868 | fs/buffer.c | wait_on_buffer(bh); |
bh | 869 | fs/buffer.c | if (bh->b_uptodate) |
bh | 870 | fs/buffer.c | return bh; |
bh | 871 | fs/buffer.c | brelse(bh); |
bh | 878 | fs/buffer.c | static void put_unused_buffer_head(struct buffer_head * bh) |
bh | 882 | fs/buffer.c | wait = ((volatile struct buffer_head *) bh)->b_wait; |
bh | 883 | fs/buffer.c | memset((void *) bh,0,sizeof(*bh)); |
bh | 884 | fs/buffer.c | ((volatile struct buffer_head *) bh)->b_wait = wait; |
bh | 885 | fs/buffer.c | bh->b_next_free = unused_list; |
bh | 886 | fs/buffer.c | unused_list = bh; |
bh | 892 | fs/buffer.c | struct buffer_head * bh; |
bh | 897 | fs/buffer.c | if (!(bh = (struct buffer_head*) get_free_page(GFP_BUFFER))) |
bh | 900 | fs/buffer.c | for (nr_buffer_heads+=i=PAGE_SIZE/sizeof*bh ; i>0; i--) { |
bh | 901 | fs/buffer.c | bh->b_next_free = unused_list; /* only make link */ |
bh | 902 | fs/buffer.c | unused_list = bh++; |
bh | 908 | fs/buffer.c | struct buffer_head * bh; |
bh | 913 | fs/buffer.c | bh = unused_list; |
bh | 914 | fs/buffer.c | unused_list = bh->b_next_free; |
bh | 915 | fs/buffer.c | bh->b_next_free = NULL; |
bh | 916 | fs/buffer.c | bh->b_data = NULL; |
bh | 917 | fs/buffer.c | bh->b_size = 0; |
bh | 918 | fs/buffer.c | bh->b_req = 0; |
bh | 919 | fs/buffer.c | return bh; |
bh | 930 | fs/buffer.c | struct buffer_head *bh, *head; |
bh | 936 | fs/buffer.c | bh = get_unused_buffer_head(); |
bh | 937 | fs/buffer.c | if (!bh) |
bh | 939 | fs/buffer.c | bh->b_this_page = head; |
bh | 940 | fs/buffer.c | head = bh; |
bh | 941 | fs/buffer.c | bh->b_data = (char *) (page+offset); |
bh | 942 | fs/buffer.c | bh->b_size = size; |
bh | 943 | fs/buffer.c | bh->b_dev = 0xffff; /* Flag as unused */ |
bh | 950 | fs/buffer.c | bh = head; |
bh | 951 | fs/buffer.c | while (bh) { |
bh | 952 | fs/buffer.c | head = bh; |
bh | 953 | fs/buffer.c | bh = bh->b_this_page; |
bh | 959 | fs/buffer.c | static void read_buffers(struct buffer_head * bh[], int nrbuf) |
bh | 966 | fs/buffer.c | if (bh[i] && !bh[i]->b_uptodate) |
bh | 967 | fs/buffer.c | bhr[bhnum++] = bh[i]; |
bh | 972 | fs/buffer.c | if (bh[i]) { |
bh | 973 | fs/buffer.c | wait_on_buffer(bh[i]); |
bh | 981 | fs/buffer.c | struct buffer_head * bh[8]; |
bh | 993 | fs/buffer.c | bh[0] = first; |
bh | 1002 | fs/buffer.c | bh[nrbuf++] = first; |
bh | 1006 | fs/buffer.c | read_buffers(bh,nrbuf); /* make sure they are actually read correctly */ |
bh | 1008 | fs/buffer.c | brelse(bh[nrbuf]); |
bh | 1014 | fs/buffer.c | brelse(bh[nrbuf]); |
bh | 1022 | fs/buffer.c | struct buffer_head * bh, * tmp, * arr[8]; |
bh | 1028 | fs/buffer.c | bh = create_buffers(address, size); |
bh | 1029 | fs/buffer.c | if (!bh) |
bh | 1040 | fs/buffer.c | tmp = bh; |
bh | 1044 | fs/buffer.c | arr[block++] = bh; |
bh | 1045 | fs/buffer.c | bh->b_count = 1; |
bh | 1046 | fs/buffer.c | bh->b_dirt = 0; |
bh | 1047 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 1048 | fs/buffer.c | bh->b_uptodate = 0; |
bh | 1049 | fs/buffer.c | bh->b_req = 0; |
bh | 1050 | fs/buffer.c | bh->b_dev = dev; |
bh | 1051 | fs/buffer.c | bh->b_blocknr = *(p++); |
bh | 1052 | fs/buffer.c | bh->b_list = BUF_CLEAN; |
bh | 1055 | fs/buffer.c | insert_into_queues(bh); |
bh | 1056 | fs/buffer.c | if (bh->b_this_page) |
bh | 1057 | fs/buffer.c | bh = bh->b_this_page; |
bh | 1062 | fs/buffer.c | bh->b_this_page = tmp; |
bh | 1064 | fs/buffer.c | buffer_pages[address >> PAGE_SHIFT] = bh; |
bh | 1071 | fs/buffer.c | while ((tmp = bh) != NULL) { |
bh | 1072 | fs/buffer.c | bh = bh->b_this_page; |
bh | 1092 | fs/buffer.c | struct buffer_head * bh; |
bh | 1098 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
bh | 1099 | fs/buffer.c | if (bh) |
bh | 1100 | fs/buffer.c | return check_aligned(bh, address, dev, b, size); |
bh | 1118 | fs/buffer.c | struct buffer_head * bh[8]; |
bh | 1129 | fs/buffer.c | bh[i] = NULL; |
bh | 1131 | fs/buffer.c | bh[i] = getblk(dev, b[i], size); |
bh | 1133 | fs/buffer.c | read_buffers(bh,i); |
bh | 1136 | fs/buffer.c | if (bh[i]) { |
bh | 1137 | fs/buffer.c | if (bh[i]->b_uptodate) |
bh | 1138 | fs/buffer.c | COPYBLK(size, (unsigned long) bh[i]->b_data, where); |
bh | 1139 | fs/buffer.c | brelse(bh[i]); |
bh | 1152 | fs/buffer.c | struct buffer_head *bh, *tmp; |
bh | 1165 | fs/buffer.c | bh = create_buffers(page, size); |
bh | 1166 | fs/buffer.c | if (!bh) { |
bh | 1173 | fs/buffer.c | tmp = bh; |
bh | 1192 | fs/buffer.c | free_list[isize] = bh; |
bh | 1193 | fs/buffer.c | buffer_pages[page >> PAGE_SHIFT] = bh; |
bh | 1194 | fs/buffer.c | tmp->b_this_page = bh; |
bh | 1204 | fs/buffer.c | static int try_to_free(struct buffer_head * bh, struct buffer_head ** bhp) |
bh | 1208 | fs/buffer.c | int isize = BUFSIZE_INDEX(bh->b_size); |
bh | 1210 | fs/buffer.c | *bhp = bh; |
bh | 1211 | fs/buffer.c | page = (unsigned long) bh->b_data; |
bh | 1213 | fs/buffer.c | tmp = bh; |
bh | 1220 | fs/buffer.c | } while (tmp != bh); |
bh | 1221 | fs/buffer.c | tmp = bh; |
bh | 1235 | fs/buffer.c | } while (tmp != bh); |
bh | 1315 | fs/buffer.c | struct buffer_head *bh; |
bh | 1328 | fs/buffer.c | bh = free_list[isize]; |
bh | 1329 | fs/buffer.c | if(!bh) continue; |
bh | 1330 | fs/buffer.c | for (i=0 ; !i || bh != free_list[isize]; bh = bh->b_next_free, i++) { |
bh | 1331 | fs/buffer.c | if (bh->b_count || !bh->b_this_page) |
bh | 1333 | fs/buffer.c | if (try_to_free(bh, &bh)) |
bh | 1335 | fs/buffer.c | if(!bh) break; /* Some interrupt must have used it after we |
bh | 1345 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 1346 | fs/buffer.c | if(!bh) continue; |
bh | 1348 | fs/buffer.c | for ( ; i-- > 0 ; bh = bh->b_next_free) { |
bh | 1350 | fs/buffer.c | if(bh->b_list != nlist) goto repeat1; |
bh | 1351 | fs/buffer.c | if (bh->b_count || !bh->b_this_page) |
bh | 1353 | fs/buffer.c | if(size && bh->b_size != size) continue; |
bh | 1354 | fs/buffer.c | if (bh->b_lock) |
bh | 1358 | fs/buffer.c | wait_on_buffer(bh); |
bh | 1359 | fs/buffer.c | if (bh->b_dirt) { |
bh | 1360 | fs/buffer.c | bh->b_count++; |
bh | 1361 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 1362 | fs/buffer.c | ll_rw_block(WRITEA, 1, &bh); |
bh | 1363 | fs/buffer.c | bh->b_count--; |
bh | 1366 | fs/buffer.c | if (try_to_free(bh, &bh)) |
bh | 1368 | fs/buffer.c | if(!bh) break; |
bh | 1377 | fs/buffer.c | struct buffer_head * bh; |
bh | 1388 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 1389 | fs/buffer.c | if(!bh) continue; |
bh | 1392 | fs/buffer.c | if (bh->b_lock) |
bh | 1394 | fs/buffer.c | if (bh->b_dirt) |
bh | 1396 | fs/buffer.c | if(mem_map[MAP_NR(((unsigned long) bh->b_data))] !=1) shared++; |
bh | 1397 | fs/buffer.c | if (bh->b_count) |
bh | 1399 | fs/buffer.c | bh = bh->b_next_free; |
bh | 1400 | fs/buffer.c | } while (bh != lru_list[nlist]); |
bh | 1418 | fs/buffer.c | static inline int try_to_reassign(struct buffer_head * bh, struct buffer_head ** bhp, |
bh | 1424 | fs/buffer.c | *bhp = bh; |
bh | 1425 | fs/buffer.c | page = (unsigned long) bh->b_data; |
bh | 1428 | fs/buffer.c | tmp = bh; |
bh | 1436 | fs/buffer.c | } while (tmp != bh); |
bh | 1437 | fs/buffer.c | tmp = bh; |
bh | 1443 | fs/buffer.c | bh = tmp; |
bh | 1453 | fs/buffer.c | } while (tmp != bh); |
bh | 1474 | fs/buffer.c | struct buffer_head *bh; |
bh | 1484 | fs/buffer.c | bh = free_list[isize]; |
bh | 1485 | fs/buffer.c | if(bh) |
bh | 1486 | fs/buffer.c | for (i=0 ; !i || bh != free_list[isize] ; bh = bh->b_next_free, i++) { |
bh | 1487 | fs/buffer.c | if (!bh->b_this_page) continue; |
bh | 1488 | fs/buffer.c | if (try_to_reassign(bh, &bh, dev, starting_block)) |
bh | 1500 | fs/buffer.c | struct buffer_head * bh, * tmp, * arr[8]; |
bh | 1509 | fs/buffer.c | bh = create_buffers(page, size); |
bh | 1510 | fs/buffer.c | if (!bh) { |
bh | 1519 | fs/buffer.c | tmp = bh; |
bh | 1522 | fs/buffer.c | arr[nblock++] = bh; |
bh | 1523 | fs/buffer.c | bh->b_count = 1; |
bh | 1524 | fs/buffer.c | bh->b_dirt = 0; |
bh | 1525 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 1526 | fs/buffer.c | bh->b_lock = 0; |
bh | 1527 | fs/buffer.c | bh->b_uptodate = 0; |
bh | 1528 | fs/buffer.c | bh->b_req = 0; |
bh | 1529 | fs/buffer.c | bh->b_dev = dev; |
bh | 1530 | fs/buffer.c | bh->b_list = BUF_CLEAN; |
bh | 1531 | fs/buffer.c | bh->b_blocknr = block++; |
bh | 1534 | fs/buffer.c | insert_into_queues(bh); |
bh | 1535 | fs/buffer.c | if (bh->b_this_page) |
bh | 1536 | fs/buffer.c | bh = bh->b_this_page; |
bh | 1541 | fs/buffer.c | buffer_pages[page >> PAGE_SHIFT] = bh; |
bh | 1542 | fs/buffer.c | bh->b_this_page = tmp; |
bh | 1547 | fs/buffer.c | while ((tmp = bh) != NULL) { |
bh | 1548 | fs/buffer.c | bh = bh->b_this_page; |
bh | 1661 | fs/buffer.c | struct buffer_head * bh, *next; |
bh | 1676 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 1677 | fs/buffer.c | if(bh) |
bh | 1678 | fs/buffer.c | for (i = nr_buffers_type[nlist]; i-- > 0; bh = next) { |
bh | 1680 | fs/buffer.c | if(bh->b_list != nlist) goto repeat; |
bh | 1681 | fs/buffer.c | next = bh->b_next_free; |
bh | 1688 | fs/buffer.c | if (nlist == BUF_DIRTY && !bh->b_dirt && !bh->b_lock) |
bh | 1690 | fs/buffer.c | refile_buffer(bh); |
bh | 1694 | fs/buffer.c | if (bh->b_lock || !bh->b_dirt) |
bh | 1697 | fs/buffer.c | if(bh->b_flushtime > jiffies) continue; |
bh | 1699 | fs/buffer.c | bh->b_count++; |
bh | 1700 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 1704 | fs/buffer.c | ll_rw_block(WRITE, 1, &bh); |
bh | 1705 | fs/buffer.c | bh->b_count--; |
bh | 1736 | fs/buffer.c | struct buffer_head * bh, *next; |
bh | 1776 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 1777 | fs/buffer.c | if(bh) |
bh | 1779 | fs/buffer.c | bh = next) { |
bh | 1781 | fs/buffer.c | if(bh->b_list != nlist) goto repeat; |
bh | 1782 | fs/buffer.c | next = bh->b_next_free; |
bh | 1789 | fs/buffer.c | if (nlist == BUF_DIRTY && !bh->b_dirt && !bh->b_lock) |
bh | 1791 | fs/buffer.c | refile_buffer(bh); |
bh | 1795 | fs/buffer.c | if (bh->b_lock || !bh->b_dirt) |
bh | 1799 | fs/buffer.c | bh->b_count++; |
bh | 1801 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 1802 | fs/buffer.c | ll_rw_block(WRITE, 1, &bh); |
bh | 1806 | fs/buffer.c | bh->b_count--; |
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 | 201 | fs/ext/file.c | struct buffer_head * bh; |
bh | 222 | fs/ext/file.c | bh = ext_getblk(inode,pos/BLOCK_SIZE,1); |
bh | 223 | fs/ext/file.c | if (!bh) { |
bh | 231 | fs/ext/file.c | if (c != BLOCK_SIZE && !bh->b_uptodate) { |
bh | 232 | fs/ext/file.c | ll_rw_block(READ, 1, &bh); |
bh | 233 | fs/ext/file.c | wait_on_buffer(bh); |
bh | 234 | fs/ext/file.c | if (!bh->b_uptodate) { |
bh | 235 | fs/ext/file.c | brelse(bh); |
bh | 241 | fs/ext/file.c | p = (pos % BLOCK_SIZE) + bh->b_data; |
bh | 250 | fs/ext/file.c | bh->b_uptodate = 1; |
bh | 251 | fs/ext/file.c | mark_buffer_dirty(bh, 0); |
bh | 252 | fs/ext/file.c | brelse(bh); |
bh | 49 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 62 | fs/ext/freelists.c | bh = get_hash_table(sb->s_dev, block, sb->s_blocksize); |
bh | 63 | fs/ext/freelists.c | if (bh) |
bh | 64 | fs/ext/freelists.c | bh->b_dirt=0; |
bh | 65 | fs/ext/freelists.c | brelse(bh); |
bh | 93 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 132 | fs/ext/freelists.c | if (!(bh=getblk(sb->s_dev, j, sb->s_blocksize))) { |
bh | 136 | fs/ext/freelists.c | clear_block(bh->b_data); |
bh | 137 | fs/ext/freelists.c | bh->b_uptodate = 1; |
bh | 138 | fs/ext/freelists.c | mark_buffer_dirty(bh, 1); |
bh | 139 | fs/ext/freelists.c | brelse(bh); |
bh | 150 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 162 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
bh | 166 | fs/ext/freelists.c | efb = (struct ext_free_block *) bh->b_data; |
bh | 169 | fs/ext/freelists.c | brelse (bh); |
bh | 184 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 229 | fs/ext/freelists.c | if (!(bh = bread(dev, block, sb->s_blocksize))) |
bh | 231 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) bh->b_data) + |
bh | 236 | fs/ext/freelists.c | sb->u.ext_sb.s_firstfreeinodeblock = bh; |
bh | 310 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 329 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
bh | 333 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) bh->b_data) + |
bh | 337 | fs/ext/freelists.c | brelse (bh); |
bh | 32 | fs/ext/fsync.c | struct buffer_head * bh; |
bh | 38 | fs/ext/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
bh | 39 | fs/ext/fsync.c | if (!bh) |
bh | 42 | fs/ext/fsync.c | brelse (bh); |
bh | 45 | fs/ext/fsync.c | if (wait && bh->b_req && !bh->b_uptodate) { |
bh | 46 | fs/ext/fsync.c | brelse(bh); |
bh | 49 | fs/ext/fsync.c | if (wait || !bh->b_uptodate || !bh->b_dirt) |
bh | 51 | fs/ext/fsync.c | brelse(bh); |
bh | 54 | fs/ext/fsync.c | ll_rw_block(WRITE, 1, &bh); |
bh | 55 | fs/ext/fsync.c | bh->b_count--; |
bh | 60 | fs/ext/fsync.c | struct buffer_head **bh, int wait) |
bh | 64 | fs/ext/fsync.c | *bh = NULL; |
bh | 71 | fs/ext/fsync.c | *bh = bread(inode->i_dev, tmp, blocksize); |
bh | 73 | fs/ext/fsync.c | brelse(*bh); |
bh | 74 | fs/ext/fsync.c | *bh = NULL; |
bh | 77 | fs/ext/fsync.c | if (!*bh) |
bh | 60 | fs/ext/inode.c | struct buffer_head *bh; |
bh | 66 | fs/ext/inode.c | if (!(bh = bread(dev, 1, BLOCK_SIZE))) { |
bh | 72 | fs/ext/inode.c | es = (struct ext_super_block *) bh->b_data; |
bh | 85 | fs/ext/inode.c | brelse(bh); |
bh | 130 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 133 | fs/ext/inode.c | if (!(bh = bread(sb->s_dev, 1, BLOCK_SIZE))) { |
bh | 137 | fs/ext/inode.c | es = (struct ext_super_block *) bh->b_data; |
bh | 142 | fs/ext/inode.c | mark_buffer_dirty(bh, 1); |
bh | 143 | fs/ext/inode.c | brelse (bh); |
bh | 166 | fs/ext/inode.c | static int block_bmap(struct buffer_head * bh, int nr) |
bh | 170 | fs/ext/inode.c | if (!bh) |
bh | 172 | fs/ext/inode.c | tmp = ((unsigned long *) bh->b_data)[nr]; |
bh | 173 | fs/ext/inode.c | brelse(bh); |
bh | 255 | fs/ext/inode.c | struct buffer_head * bh, int nr, int create) |
bh | 261 | fs/ext/inode.c | if (!bh) |
bh | 263 | fs/ext/inode.c | if (!bh->b_uptodate) { |
bh | 264 | fs/ext/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 265 | fs/ext/inode.c | wait_on_buffer(bh); |
bh | 266 | fs/ext/inode.c | if (!bh->b_uptodate) { |
bh | 267 | fs/ext/inode.c | brelse(bh); |
bh | 271 | fs/ext/inode.c | p = nr + (unsigned long *) bh->b_data; |
bh | 275 | fs/ext/inode.c | result = getblk(bh->b_dev, tmp, BLOCK_SIZE); |
bh | 277 | fs/ext/inode.c | brelse(bh); |
bh | 284 | fs/ext/inode.c | brelse(bh); |
bh | 289 | fs/ext/inode.c | brelse(bh); |
bh | 292 | fs/ext/inode.c | result = getblk(bh->b_dev, tmp, BLOCK_SIZE); |
bh | 299 | fs/ext/inode.c | mark_buffer_dirty(bh, 1); |
bh | 300 | fs/ext/inode.c | brelse(bh); |
bh | 306 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 320 | fs/ext/inode.c | bh = inode_getblk(inode,9,create); |
bh | 321 | fs/ext/inode.c | return block_getblk(inode,bh,block,create); |
bh | 325 | fs/ext/inode.c | bh = inode_getblk(inode,10,create); |
bh | 326 | fs/ext/inode.c | bh = block_getblk(inode,bh,block>>8,create); |
bh | 327 | fs/ext/inode.c | return block_getblk(inode,bh,block & 255,create); |
bh | 330 | fs/ext/inode.c | bh = inode_getblk(inode,11,create); |
bh | 331 | fs/ext/inode.c | bh = block_getblk(inode,bh,block>>16,create); |
bh | 332 | fs/ext/inode.c | bh = block_getblk(inode,bh,(block>>8) & 255,create); |
bh | 333 | fs/ext/inode.c | return block_getblk(inode,bh,block & 255,create); |
bh | 338 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 340 | fs/ext/inode.c | bh = ext_getblk(inode,block,create); |
bh | 341 | fs/ext/inode.c | if (!bh || bh->b_uptodate) |
bh | 342 | fs/ext/inode.c | return bh; |
bh | 343 | fs/ext/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 344 | fs/ext/inode.c | wait_on_buffer(bh); |
bh | 345 | fs/ext/inode.c | if (bh->b_uptodate) |
bh | 346 | fs/ext/inode.c | return bh; |
bh | 347 | fs/ext/inode.c | brelse(bh); |
bh | 353 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 358 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
bh | 360 | fs/ext/inode.c | raw_inode = ((struct ext_inode *) bh->b_data) + |
bh | 373 | fs/ext/inode.c | brelse(bh); |
bh | 391 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 396 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
bh | 398 | fs/ext/inode.c | raw_inode = ((struct ext_inode *)bh->b_data) + |
bh | 410 | fs/ext/inode.c | mark_buffer_dirty(bh, 1); |
bh | 412 | fs/ext/inode.c | return bh; |
bh | 417 | fs/ext/inode.c | struct buffer_head *bh; |
bh | 418 | fs/ext/inode.c | bh = ext_update_inode (inode); |
bh | 419 | fs/ext/inode.c | brelse(bh); |
bh | 425 | fs/ext/inode.c | struct buffer_head *bh; |
bh | 427 | fs/ext/inode.c | bh = ext_update_inode(inode); |
bh | 428 | fs/ext/inode.c | if (bh && bh->b_dirt) |
bh | 430 | fs/ext/inode.c | ll_rw_block(WRITE, 1, &bh); |
bh | 431 | fs/ext/inode.c | wait_on_buffer(bh); |
bh | 432 | fs/ext/inode.c | if (bh->b_req && !bh->b_uptodate) |
bh | 439 | fs/ext/inode.c | else if (!bh) |
bh | 441 | fs/ext/inode.c | brelse (bh); |
bh | 93 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 106 | fs/ext/namei.c | bh = ext_bread(dir,0,0); |
bh | 107 | fs/ext/namei.c | if (!bh) |
bh | 114 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 116 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data) { |
bh | 117 | fs/ext/namei.c | brelse(bh); |
bh | 118 | fs/ext/namei.c | bh = NULL; |
bh | 119 | fs/ext/namei.c | bh = ext_bread(dir,offset>>BLOCK_SIZE_BITS,0); |
bh | 120 | fs/ext/namei.c | if (!bh) |
bh | 122 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 128 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
bh | 132 | fs/ext/namei.c | de = (struct ext_dir_entry *) (bh->b_data+BLOCK_SIZE); |
bh | 142 | fs/ext/namei.c | ((char *)de) + de->rec_len < BLOCK_SIZE+bh->b_data) |
bh | 147 | fs/ext/namei.c | return bh; |
bh | 154 | fs/ext/namei.c | brelse(bh); |
bh | 163 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 172 | fs/ext/namei.c | if (!(bh = ext_find_entry(dir,name,len,&de,NULL,NULL))) { |
bh | 177 | fs/ext/namei.c | brelse(bh); |
bh | 202 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 217 | fs/ext/namei.c | bh = ext_bread(dir,0,0); |
bh | 218 | fs/ext/namei.c | if (!bh) |
bh | 222 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 224 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data && offset < dir->i_size) { |
bh | 228 | fs/ext/namei.c | brelse(bh); |
bh | 229 | fs/ext/namei.c | bh = NULL; |
bh | 230 | fs/ext/namei.c | bh = ext_bread(dir,offset>>BLOCK_SIZE_BITS,0); |
bh | 231 | fs/ext/namei.c | if (!bh) |
bh | 233 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 253 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 255 | fs/ext/namei.c | brelse (bh); |
bh | 256 | fs/ext/namei.c | bh = NULL; |
bh | 260 | fs/ext/namei.c | bh = ext_bread(dir,offset>>BLOCK_SIZE_BITS,1); |
bh | 261 | fs/ext/namei.c | if (!bh) |
bh | 263 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 276 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
bh | 280 | fs/ext/namei.c | brelse (bh); |
bh | 300 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 302 | fs/ext/namei.c | return bh; |
bh | 307 | fs/ext/namei.c | brelse(bh); |
bh | 315 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 329 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 330 | fs/ext/namei.c | if (!bh) { |
bh | 338 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 339 | fs/ext/namei.c | brelse(bh); |
bh | 348 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 353 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 354 | fs/ext/namei.c | if (bh) { |
bh | 355 | fs/ext/namei.c | brelse(bh); |
bh | 388 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 389 | fs/ext/namei.c | if (!bh) { |
bh | 397 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 398 | fs/ext/namei.c | brelse(bh); |
bh | 407 | fs/ext/namei.c | struct buffer_head * bh, *dir_block; |
bh | 410 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 411 | fs/ext/namei.c | if (bh) { |
bh | 412 | fs/ext/namei.c | brelse(bh); |
bh | 455 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 456 | fs/ext/namei.c | if (!bh) { |
bh | 463 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 468 | fs/ext/namei.c | brelse(bh); |
bh | 478 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 481 | fs/ext/namei.c | if (inode->i_size < 2 * 12 || !(bh = ext_bread(inode,0,0))) { |
bh | 485 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 495 | fs/ext/namei.c | if ((void *) de >= (void *) (bh->b_data+BLOCK_SIZE)) { |
bh | 496 | fs/ext/namei.c | brelse(bh); |
bh | 497 | fs/ext/namei.c | bh = ext_bread(inode, offset >> BLOCK_SIZE_BITS,1); |
bh | 498 | fs/ext/namei.c | if (!bh) { |
bh | 502 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 509 | fs/ext/namei.c | brelse (bh); |
bh | 513 | fs/ext/namei.c | brelse(bh); |
bh | 519 | fs/ext/namei.c | brelse(bh); |
bh | 536 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 540 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
bh | 542 | fs/ext/namei.c | if (!bh) |
bh | 572 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 582 | fs/ext/namei.c | brelse(bh); |
bh | 590 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 595 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
bh | 596 | fs/ext/namei.c | if (!bh) |
bh | 615 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 623 | fs/ext/namei.c | brelse(bh); |
bh | 633 | fs/ext/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 659 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 660 | fs/ext/namei.c | if (bh) { |
bh | 664 | fs/ext/namei.c | brelse(bh); |
bh | 668 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 669 | fs/ext/namei.c | if (!bh) { |
bh | 677 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 678 | fs/ext/namei.c | brelse(bh); |
bh | 687 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 699 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 700 | fs/ext/namei.c | if (bh) { |
bh | 701 | fs/ext/namei.c | brelse(bh); |
bh | 706 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 707 | fs/ext/namei.c | if (!bh) { |
bh | 713 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 714 | 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 | 36 | fs/ext/truncate.c | struct buffer_head * bh; |
bh | 45 | fs/ext/truncate.c | bh = getblk(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 47 | fs/ext/truncate.c | brelse(bh); |
bh | 50 | fs/ext/truncate.c | if ((bh && bh->b_count != 1) || tmp != *p) { |
bh | 52 | fs/ext/truncate.c | brelse(bh); |
bh | 57 | fs/ext/truncate.c | brelse(bh); |
bh | 66 | fs/ext/truncate.c | struct buffer_head * bh; |
bh | 94 | fs/ext/truncate.c | bh = getblk(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 96 | fs/ext/truncate.c | brelse(bh); |
bh | 99 | fs/ext/truncate.c | if ((bh && bh->b_count != 1) || tmp != *ind) { |
bh | 101 | fs/ext/truncate.c | brelse(bh); |
bh | 106 | fs/ext/truncate.c | brelse(bh); |
bh | 121 | fs/ext2/balloc.c | struct buffer_head ** bh) |
bh | 142 | fs/ext2/balloc.c | if (bh) |
bh | 143 | fs/ext2/balloc.c | *bh = sb->u.ext2_sb.s_group_desc[group_desc]; |
bh | 152 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 155 | fs/ext2/balloc.c | bh = bread (sb->s_dev, gdp->bg_block_bitmap, sb->s_blocksize); |
bh | 156 | fs/ext2/balloc.c | if (!bh) |
bh | 162 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[bitmap_nr] = bh; |
bh | 252 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 287 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 303 | fs/ext2/balloc.c | if (!clear_bit (bit + i, bh->b_data)) |
bh | 316 | fs/ext2/balloc.c | mark_buffer_dirty(bh, 1); |
bh | 318 | fs/ext2/balloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 319 | fs/ext2/balloc.c | wait_on_buffer (bh); |
bh | 337 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 377 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 381 | fs/ext2/balloc.c | if (!test_bit(j, bh->b_data)) { |
bh | 393 | fs/ext2/balloc.c | lmap = ((((unsigned long *) bh->b_data)[j >> 5]) >> |
bh | 396 | fs/ext2/balloc.c | lmap |= (((unsigned long *) bh->b_data)[(j >> 5) + 1]) << |
bh | 423 | fs/ext2/balloc.c | p = ((char *) bh->b_data) + (j >> 3); |
bh | 426 | fs/ext2/balloc.c | k = (r - ((char *) bh->b_data)) << 3; |
bh | 431 | fs/ext2/balloc.c | k = find_next_zero_bit ((unsigned long *) bh->b_data, |
bh | 459 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 460 | fs/ext2/balloc.c | r = find_first_zero_byte (bh->b_data, |
bh | 462 | fs/ext2/balloc.c | j = (r - bh->b_data) << 3; |
bh | 466 | fs/ext2/balloc.c | j = find_first_zero_bit ((unsigned long *) bh->b_data, |
bh | 481 | fs/ext2/balloc.c | for (k = 0; k < 7 && j > 0 && !test_bit (j - 1, bh->b_data); k++, j--); |
bh | 497 | fs/ext2/balloc.c | if (set_bit (j, bh->b_data)) { |
bh | 514 | fs/ext2/balloc.c | if (set_bit (j + k, bh->b_data)) |
bh | 527 | fs/ext2/balloc.c | mark_buffer_dirty(bh, 1); |
bh | 529 | fs/ext2/balloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 530 | fs/ext2/balloc.c | wait_on_buffer (bh); |
bh | 540 | fs/ext2/balloc.c | if (!(bh = getblk (sb->s_dev, j, sb->s_blocksize))) { |
bh | 545 | fs/ext2/balloc.c | clear_block (bh->b_data, sb->s_blocksize); |
bh | 546 | fs/ext2/balloc.c | bh->b_uptodate = 1; |
bh | 547 | fs/ext2/balloc.c | mark_buffer_dirty(bh, 1); |
bh | 548 | fs/ext2/balloc.c | brelse (bh); |
bh | 605 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 624 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 626 | fs/ext2/balloc.c | if (!test_bit (0, bh->b_data)) |
bh | 631 | fs/ext2/balloc.c | if (!test_bit (j + 1, bh->b_data)) |
bh | 636 | fs/ext2/balloc.c | if (!block_in_use (gdp->bg_block_bitmap, sb, bh->b_data)) |
bh | 641 | fs/ext2/balloc.c | if (!block_in_use (gdp->bg_inode_bitmap, sb, bh->b_data)) |
bh | 647 | fs/ext2/balloc.c | if (!block_in_use (gdp->bg_inode_table + j, sb, bh->b_data)) |
bh | 652 | fs/ext2/balloc.c | x = ext2_count_free (bh, sb->s_blocksize); |
bh | 68 | fs/ext2/dir.c | struct ext2_dir_entry * de, struct buffer_head * bh, |
bh | 79 | fs/ext2/dir.c | else if (dir && ((char *) de - bh->b_data) + de->rec_len > |
bh | 96 | fs/ext2/dir.c | struct buffer_head * bh, * tmp, * bha[16]; |
bh | 107 | fs/ext2/dir.c | bh = ext2_bread (inode, blk, 0, &err); |
bh | 108 | fs/ext2/dir.c | if (!bh) { |
bh | 132 | fs/ext2/dir.c | de = (struct ext2_dir_entry *) (offset + bh->b_data); |
bh | 135 | fs/ext2/dir.c | bh, offset)) { |
bh | 136 | fs/ext2/dir.c | brelse (bh); |
bh | 153 | fs/ext2/dir.c | brelse (bh); |
bh | 163 | fs/ext2/dir.c | brelse (bh); |
bh | 231 | fs/ext2/file.c | struct buffer_head * bh; |
bh | 259 | fs/ext2/file.c | bh = ext2_getblk (inode, pos / sb->s_blocksize, 1, &err); |
bh | 260 | fs/ext2/file.c | if (!bh) { |
bh | 268 | fs/ext2/file.c | if (c != sb->s_blocksize && !bh->b_uptodate) { |
bh | 269 | fs/ext2/file.c | ll_rw_block (READ, 1, &bh); |
bh | 270 | fs/ext2/file.c | wait_on_buffer (bh); |
bh | 271 | fs/ext2/file.c | if (!bh->b_uptodate) { |
bh | 272 | fs/ext2/file.c | brelse (bh); |
bh | 278 | fs/ext2/file.c | p = (pos % sb->s_blocksize) + bh->b_data; |
bh | 283 | fs/ext2/file.c | bh->b_uptodate = 1; |
bh | 284 | fs/ext2/file.c | mark_buffer_dirty(bh, 0); |
bh | 285 | fs/ext2/file.c | brelse (bh); |
bh | 32 | fs/ext2/fsync.c | struct buffer_head * bh; |
bh | 38 | fs/ext2/fsync.c | bh = get_hash_table (inode->i_dev, *block, blocksize); |
bh | 39 | fs/ext2/fsync.c | if (!bh) |
bh | 42 | fs/ext2/fsync.c | brelse (bh); |
bh | 45 | fs/ext2/fsync.c | if (wait && bh->b_req && !bh->b_uptodate) { |
bh | 46 | fs/ext2/fsync.c | brelse (bh); |
bh | 49 | fs/ext2/fsync.c | if (wait || !bh->b_uptodate || !bh->b_dirt) { |
bh | 50 | fs/ext2/fsync.c | brelse (bh); |
bh | 53 | fs/ext2/fsync.c | ll_rw_block (WRITE, 1, &bh); |
bh | 54 | fs/ext2/fsync.c | bh->b_count--; |
bh | 59 | fs/ext2/fsync.c | struct buffer_head ** bh, int wait) |
bh | 63 | fs/ext2/fsync.c | *bh = NULL; |
bh | 70 | fs/ext2/fsync.c | *bh = bread (inode->i_dev, tmp, blocksize); |
bh | 72 | fs/ext2/fsync.c | brelse (*bh); |
bh | 73 | fs/ext2/fsync.c | *bh = NULL; |
bh | 76 | fs/ext2/fsync.c | if (!*bh) |
bh | 64 | fs/ext2/ialloc.c | struct buffer_head ** bh) |
bh | 85 | fs/ext2/ialloc.c | if (bh) |
bh | 86 | fs/ext2/ialloc.c | *bh = sb->u.ext2_sb.s_group_desc[group_desc]; |
bh | 95 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 98 | fs/ext2/ialloc.c | bh = bread (sb->s_dev, gdp->bg_inode_bitmap, sb->s_blocksize); |
bh | 99 | fs/ext2/ialloc.c | if (!bh) |
bh | 104 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[bitmap_nr] = bh; |
bh | 187 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 193 | fs/ext2/ialloc.c | bh = bread (inode->i_sb->s_dev, inode_block, inode->i_sb->s_blocksize); |
bh | 194 | fs/ext2/ialloc.c | if (!bh) |
bh | 199 | fs/ext2/ialloc.c | raw_inode = ((struct ext2_inode *) bh->b_data) + |
bh | 205 | fs/ext2/ialloc.c | mark_buffer_dirty(bh, 1); |
bh | 207 | fs/ext2/ialloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 208 | fs/ext2/ialloc.c | wait_on_buffer (bh); |
bh | 210 | fs/ext2/ialloc.c | brelse (bh); |
bh | 216 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 260 | fs/ext2/ialloc.c | bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; |
bh | 261 | fs/ext2/ialloc.c | if (!clear_bit (bit, bh->b_data)) |
bh | 274 | fs/ext2/ialloc.c | mark_buffer_dirty(bh, 1); |
bh | 276 | fs/ext2/ialloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 277 | fs/ext2/ialloc.c | wait_on_buffer (bh); |
bh | 295 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 301 | fs/ext2/ialloc.c | bh = bread (inode->i_sb->s_dev, inode_block, inode->i_sb->s_blocksize); |
bh | 302 | fs/ext2/ialloc.c | if (!bh) { |
bh | 310 | fs/ext2/ialloc.c | raw_inode = ((struct ext2_inode *) bh->b_data) + |
bh | 316 | fs/ext2/ialloc.c | mark_buffer_dirty(bh, 1); |
bh | 317 | fs/ext2/ialloc.c | brelse (bh); |
bh | 333 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 432 | fs/ext2/ialloc.c | bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; |
bh | 433 | fs/ext2/ialloc.c | if ((j = find_first_zero_bit ((unsigned long *) bh->b_data, |
bh | 436 | fs/ext2/ialloc.c | if (set_bit (j, bh->b_data)) { |
bh | 441 | fs/ext2/ialloc.c | mark_buffer_dirty(bh, 1); |
bh | 443 | fs/ext2/ialloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 444 | fs/ext2/ialloc.c | wait_on_buffer (bh); |
bh | 50 | fs/ext2/inode.c | static int block_bmap (struct buffer_head * bh, int nr) |
bh | 54 | fs/ext2/inode.c | if (!bh) |
bh | 56 | fs/ext2/inode.c | tmp = ((unsigned long *) bh->b_data)[nr]; |
bh | 57 | fs/ext2/inode.c | brelse (bh); |
bh | 87 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 104 | fs/ext2/inode.c | if (!(bh = getblk (inode->i_sb->s_dev, result, |
bh | 110 | fs/ext2/inode.c | clear_block (bh->b_data, inode->i_sb->s_blocksize); |
bh | 111 | fs/ext2/inode.c | bh->b_uptodate = 1; |
bh | 112 | fs/ext2/inode.c | mark_buffer_dirty(bh, 1); |
bh | 113 | fs/ext2/inode.c | brelse (bh); |
bh | 255 | fs/ext2/inode.c | struct buffer_head * bh, int nr, |
bh | 264 | fs/ext2/inode.c | if (!bh) |
bh | 266 | fs/ext2/inode.c | if (!bh->b_uptodate) { |
bh | 267 | fs/ext2/inode.c | ll_rw_block (READ, 1, &bh); |
bh | 268 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 269 | fs/ext2/inode.c | if (!bh->b_uptodate) { |
bh | 270 | fs/ext2/inode.c | brelse (bh); |
bh | 274 | fs/ext2/inode.c | p = (unsigned long *) bh->b_data + nr; |
bh | 278 | fs/ext2/inode.c | result = getblk (bh->b_dev, tmp, blocksize); |
bh | 280 | fs/ext2/inode.c | brelse (bh); |
bh | 289 | fs/ext2/inode.c | brelse (bh); |
bh | 297 | fs/ext2/inode.c | if (((unsigned long *) bh->b_data)[tmp]) { |
bh | 298 | fs/ext2/inode.c | goal = ((unsigned long *)bh->b_data)[tmp]; |
bh | 303 | fs/ext2/inode.c | goal = bh->b_blocknr; |
bh | 307 | fs/ext2/inode.c | brelse (bh); |
bh | 310 | fs/ext2/inode.c | result = getblk (bh->b_dev, tmp, blocksize); |
bh | 317 | fs/ext2/inode.c | mark_buffer_dirty(bh, 1); |
bh | 319 | fs/ext2/inode.c | ll_rw_block (WRITE, 1, &bh); |
bh | 320 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 327 | fs/ext2/inode.c | brelse (bh); |
bh | 331 | fs/ext2/inode.c | static int block_getcluster (struct inode * inode, struct buffer_head * bh, |
bh | 342 | fs/ext2/inode.c | if(!bh) return 0; |
bh | 348 | fs/ext2/inode.c | p = (unsigned long *) bh->b_data + nr + i; |
bh | 358 | fs/ext2/inode.c | p = (unsigned long *) bh->b_data + nr; |
bh | 359 | fs/ext2/inode.c | result = generate_cluster(bh->b_dev, (int *) p, blocksize); |
bh | 362 | fs/ext2/inode.c | brelse(bh); |
bh | 369 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 405 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_IND_BLOCK, create, b, err); |
bh | 406 | fs/ext2/inode.c | return block_getblk (inode, bh, block, create, |
bh | 411 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_DIND_BLOCK, create, b, err); |
bh | 412 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block / addr_per_block, create, |
bh | 414 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), |
bh | 418 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_TIND_BLOCK, create, b, err); |
bh | 419 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block/(addr_per_block * addr_per_block), |
bh | 421 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block/addr_per_block) & (addr_per_block - 1), |
bh | 423 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), create, |
bh | 429 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 454 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_IND_BLOCK, create, b, &err); |
bh | 455 | fs/ext2/inode.c | return block_getcluster (inode, bh, block, |
bh | 460 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_DIND_BLOCK, create, b, &err); |
bh | 461 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block / addr_per_block, create, |
bh | 463 | fs/ext2/inode.c | return block_getcluster (inode, bh, block & (addr_per_block - 1), |
bh | 467 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_TIND_BLOCK, create, b, &err); |
bh | 468 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block/(addr_per_block * addr_per_block), |
bh | 470 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block/addr_per_block) & (addr_per_block - 1), |
bh | 472 | fs/ext2/inode.c | return block_getcluster (inode, bh, block & (addr_per_block - 1), |
bh | 479 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 481 | fs/ext2/inode.c | bh = ext2_getblk (inode, block, create, err); |
bh | 482 | fs/ext2/inode.c | if (!bh || bh->b_uptodate) |
bh | 483 | fs/ext2/inode.c | return bh; |
bh | 484 | fs/ext2/inode.c | ll_rw_block (READ, 1, &bh); |
bh | 485 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 486 | fs/ext2/inode.c | if (bh->b_uptodate) |
bh | 487 | fs/ext2/inode.c | return bh; |
bh | 488 | fs/ext2/inode.c | brelse (bh); |
bh | 495 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 516 | fs/ext2/inode.c | bh = inode->i_sb->u.ext2_sb.s_group_desc[group_desc]; |
bh | 517 | fs/ext2/inode.c | if (!bh) |
bh | 520 | fs/ext2/inode.c | gdp = (struct ext2_group_desc *) bh->b_data; |
bh | 524 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
bh | 528 | fs/ext2/inode.c | raw_inode = ((struct ext2_inode *) bh->b_data) + |
bh | 558 | fs/ext2/inode.c | brelse (bh); |
bh | 581 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 601 | fs/ext2/inode.c | bh = inode->i_sb->u.ext2_sb.s_group_desc[group_desc]; |
bh | 602 | fs/ext2/inode.c | if (!bh) |
bh | 605 | fs/ext2/inode.c | gdp = (struct ext2_group_desc *) bh->b_data; |
bh | 609 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
bh | 613 | fs/ext2/inode.c | raw_inode = ((struct ext2_inode *)bh->b_data) + |
bh | 636 | fs/ext2/inode.c | mark_buffer_dirty(bh, 1); |
bh | 638 | fs/ext2/inode.c | return bh; |
bh | 643 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 644 | fs/ext2/inode.c | bh = ext2_update_inode (inode); |
bh | 645 | fs/ext2/inode.c | brelse (bh); |
bh | 651 | fs/ext2/inode.c | struct buffer_head *bh; |
bh | 653 | fs/ext2/inode.c | bh = ext2_update_inode (inode); |
bh | 654 | fs/ext2/inode.c | if (bh && bh->b_dirt) |
bh | 656 | fs/ext2/inode.c | ll_rw_block (WRITE, 1, &bh); |
bh | 657 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 658 | fs/ext2/inode.c | if (bh->b_req && !bh->b_uptodate) |
bh | 665 | fs/ext2/inode.c | else if (!bh) |
bh | 667 | fs/ext2/inode.c | brelse (bh); |
bh | 101 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 105 | fs/ext2/namei.c | bh = ext2_getblk (dir, block, 0, &err); |
bh | 106 | fs/ext2/namei.c | bh_use[block] = bh; |
bh | 107 | fs/ext2/namei.c | if (bh && !bh->b_uptodate) |
bh | 108 | fs/ext2/namei.c | bh_read[toread++] = bh; |
bh | 114 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 122 | fs/ext2/namei.c | bh = bh_use[block % NAMEI_RA_SIZE]; |
bh | 123 | fs/ext2/namei.c | if (!bh) |
bh | 126 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 127 | fs/ext2/namei.c | if (!bh->b_uptodate) { |
bh | 134 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 135 | fs/ext2/namei.c | dlimit = bh->b_data + sb->s_blocksize; |
bh | 138 | fs/ext2/namei.c | de, bh, offset)) |
bh | 142 | fs/ext2/namei.c | if (bh_use[i] != bh) |
bh | 146 | fs/ext2/namei.c | return bh; |
bh | 153 | fs/ext2/namei.c | brelse (bh); |
bh | 156 | fs/ext2/namei.c | bh = NULL; |
bh | 158 | fs/ext2/namei.c | bh = ext2_getblk (dir, block + NAMEI_RA_SIZE, 0, &err); |
bh | 159 | fs/ext2/namei.c | bh_use[block++ % NAMEI_RA_SIZE] = bh; |
bh | 160 | fs/ext2/namei.c | if (bh && !bh->b_uptodate) |
bh | 161 | fs/ext2/namei.c | bh_read[toread++] = bh; |
bh | 175 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 187 | fs/ext2/namei.c | if (!(bh = ext2_find_entry (dir, name, len, &de))) { |
bh | 196 | fs/ext2/namei.c | brelse (bh); |
bh | 225 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 251 | fs/ext2/namei.c | bh = ext2_bread (dir, 0, 0, err); |
bh | 252 | fs/ext2/namei.c | if (!bh) |
bh | 256 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 259 | fs/ext2/namei.c | if ((char *)de >= sb->s_blocksize + bh->b_data) { |
bh | 260 | fs/ext2/namei.c | brelse (bh); |
bh | 261 | fs/ext2/namei.c | bh = NULL; |
bh | 262 | fs/ext2/namei.c | bh = ext2_bread (dir, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, err); |
bh | 263 | fs/ext2/namei.c | if (!bh) |
bh | 273 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 282 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 285 | fs/ext2/namei.c | if (!ext2_check_dir_entry ("ext2_add_entry", dir, de, bh, |
bh | 288 | fs/ext2/namei.c | brelse (bh); |
bh | 293 | fs/ext2/namei.c | brelse (bh); |
bh | 323 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 326 | fs/ext2/namei.c | return bh; |
bh | 331 | fs/ext2/namei.c | brelse (bh); |
bh | 340 | fs/ext2/namei.c | struct buffer_head * bh) |
bh | 347 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 348 | fs/ext2/namei.c | while (i < bh->b_size) { |
bh | 350 | fs/ext2/namei.c | de, bh, i)) |
bh | 369 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 384 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 385 | fs/ext2/namei.c | if (!bh) { |
bh | 398 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 400 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 401 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 403 | fs/ext2/namei.c | brelse (bh); |
bh | 413 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 419 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 420 | fs/ext2/namei.c | if (bh) { |
bh | 421 | fs/ext2/namei.c | brelse (bh); |
bh | 451 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 452 | fs/ext2/namei.c | if (!bh) { |
bh | 465 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 467 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 468 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 470 | fs/ext2/namei.c | brelse (bh); |
bh | 479 | fs/ext2/namei.c | struct buffer_head * bh, * dir_block; |
bh | 485 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 486 | fs/ext2/namei.c | if (bh) { |
bh | 487 | fs/ext2/namei.c | brelse (bh); |
bh | 528 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 529 | fs/ext2/namei.c | if (!bh) { |
bh | 542 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 544 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 545 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 551 | fs/ext2/namei.c | brelse (bh); |
bh | 561 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 568 | fs/ext2/namei.c | !(bh = ext2_bread (inode, 0, 0, &err))) { |
bh | 573 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 584 | fs/ext2/namei.c | if ((void *) de >= (void *) (bh->b_data + sb->s_blocksize)) { |
bh | 585 | fs/ext2/namei.c | brelse (bh); |
bh | 586 | fs/ext2/namei.c | bh = ext2_bread (inode, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, &err); |
bh | 587 | fs/ext2/namei.c | if (!bh) { |
bh | 591 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 593 | fs/ext2/namei.c | if (!ext2_check_dir_entry ("empty_dir", inode, de, bh, |
bh | 595 | fs/ext2/namei.c | brelse (bh); |
bh | 599 | fs/ext2/namei.c | brelse (bh); |
bh | 605 | fs/ext2/namei.c | brelse (bh); |
bh | 613 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 620 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 622 | fs/ext2/namei.c | if (!bh) |
bh | 631 | fs/ext2/namei.c | brelse(bh); |
bh | 662 | fs/ext2/namei.c | retval = ext2_delete_entry (de, bh); |
bh | 668 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 670 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 671 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 692 | fs/ext2/namei.c | brelse (bh); |
bh | 700 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 708 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 709 | fs/ext2/namei.c | if (!bh) |
bh | 718 | fs/ext2/namei.c | brelse(bh); |
bh | 733 | fs/ext2/namei.c | retval = ext2_delete_entry (de, bh); |
bh | 737 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 739 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 740 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 752 | fs/ext2/namei.c | brelse (bh); |
bh | 763 | fs/ext2/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 807 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 808 | fs/ext2/namei.c | if (bh) { |
bh | 812 | fs/ext2/namei.c | brelse (bh); |
bh | 816 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 817 | fs/ext2/namei.c | if (!bh) { |
bh | 830 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 832 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 833 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 835 | fs/ext2/namei.c | brelse (bh); |
bh | 845 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 858 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 859 | fs/ext2/namei.c | if (bh) { |
bh | 860 | fs/ext2/namei.c | brelse (bh); |
bh | 865 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 866 | fs/ext2/namei.c | if (!bh) { |
bh | 877 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 879 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 880 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 882 | fs/ext2/namei.c | brelse (bh); |
bh | 133 | fs/ext2/super.c | struct buffer_head * bh) |
bh | 142 | fs/ext2/super.c | es = (struct ext2_super_block *) bh->b_data; |
bh | 165 | fs/ext2/super.c | mark_buffer_dirty(bh, 1); |
bh | 358 | fs/ext2/super.c | struct buffer_head * bh; |
bh | 378 | fs/ext2/super.c | if (!(bh = bread (dev, sb_block, BLOCK_SIZE))) { |
bh | 388 | fs/ext2/super.c | es = (struct ext2_super_block *) bh->b_data; |
bh | 398 | fs/ext2/super.c | brelse (bh); |
bh | 411 | fs/ext2/super.c | brelse (bh); |
bh | 415 | fs/ext2/super.c | bh = bread (dev, logic_sb_block, sb->s_blocksize); |
bh | 416 | fs/ext2/super.c | if(!bh) |
bh | 418 | fs/ext2/super.c | es = (struct ext2_super_block *) (((char *)bh->b_data) + offset); |
bh | 423 | fs/ext2/super.c | brelse (bh); |
bh | 444 | fs/ext2/super.c | sb->u.ext2_sb.s_sbh = bh; |
bh | 457 | fs/ext2/super.c | brelse (bh); |
bh | 467 | fs/ext2/super.c | brelse (bh); |
bh | 471 | fs/ext2/super.c | if (!convert_pre_02b_fs (sb, bh)) { |
bh | 474 | fs/ext2/super.c | brelse (bh); |
bh | 485 | fs/ext2/super.c | brelse (bh); |
bh | 491 | fs/ext2/super.c | if (sb->s_blocksize != bh->b_size) { |
bh | 494 | fs/ext2/super.c | brelse (bh); |
bh | 504 | fs/ext2/super.c | brelse (bh); |
bh | 521 | fs/ext2/super.c | brelse (bh); |
bh | 533 | fs/ext2/super.c | brelse (bh); |
bh | 543 | fs/ext2/super.c | brelse (bh); |
bh | 566 | fs/ext2/super.c | brelse (bh); |
bh | 54 | fs/ext2/symlink.c | struct buffer_head * bh = NULL; |
bh | 77 | fs/ext2/symlink.c | if (!(bh = ext2_bread (inode, 0, 0, &error))) { |
bh | 82 | fs/ext2/symlink.c | link = bh->b_data; |
bh | 89 | fs/ext2/symlink.c | if (bh) |
bh | 90 | fs/ext2/symlink.c | brelse (bh); |
bh | 96 | fs/ext2/symlink.c | struct buffer_head * bh = NULL; |
bh | 108 | fs/ext2/symlink.c | bh = ext2_bread (inode, 0, 0, &err); |
bh | 109 | fs/ext2/symlink.c | if (!bh) { |
bh | 113 | fs/ext2/symlink.c | link = bh->b_data; |
bh | 123 | fs/ext2/symlink.c | if (bh) |
bh | 124 | fs/ext2/symlink.c | brelse (bh); |
bh | 57 | fs/ext2/truncate.c | struct buffer_head * bh; |
bh | 73 | fs/ext2/truncate.c | bh = getblk (inode->i_dev, tmp, |
bh | 76 | fs/ext2/truncate.c | bh = get_hash_table (inode->i_dev, tmp, |
bh | 79 | fs/ext2/truncate.c | brelse (bh); |
bh | 82 | fs/ext2/truncate.c | if ((bh && bh->b_count != 1) || tmp != *p) { |
bh | 84 | fs/ext2/truncate.c | brelse (bh); |
bh | 91 | fs/ext2/truncate.c | clear_block (bh->b_data, inode->i_sb->s_blocksize, |
bh | 93 | fs/ext2/truncate.c | mark_buffer_dirty(bh, 1); |
bh | 95 | fs/ext2/truncate.c | brelse (bh); |
bh | 116 | fs/ext2/truncate.c | struct buffer_head * bh; |
bh | 150 | fs/ext2/truncate.c | bh = getblk (inode->i_dev, tmp, |
bh | 153 | fs/ext2/truncate.c | bh = get_hash_table (inode->i_dev, tmp, |
bh | 156 | fs/ext2/truncate.c | brelse (bh); |
bh | 159 | fs/ext2/truncate.c | if ((bh && bh->b_count != 1) || tmp != *ind) { |
bh | 161 | fs/ext2/truncate.c | brelse (bh); |
bh | 167 | fs/ext2/truncate.c | clear_block (bh->b_data, inode->i_sb->s_blocksize, |
bh | 169 | fs/ext2/truncate.c | mark_buffer_dirty(bh, 1); |
bh | 171 | fs/ext2/truncate.c | brelse (bh); |
bh | 225 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh[4]; |
bh | 867 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh; |
bh | 899 | fs/hpfs/hpfs_fs.c | block = map_sector(inode->i_dev, hpfs_bmap(inode, q), &bh); |
bh | 927 | fs/hpfs/hpfs_fs.c | brelse(bh); |
bh | 998 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh; |
bh | 1014 | fs/hpfs/hpfs_fs.c | fnode = map_fnode(inode->i_dev, inode->i_ino, &bh); |
bh | 1018 | fs/hpfs/hpfs_fs.c | file_secno, &bh); |
bh | 1019 | fs/hpfs/hpfs_fs.c | brelse(bh); |
bh | 1571 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh; |
bh | 1575 | fs/hpfs/hpfs_fs.c | fnode = map_fnode(dev, ino, &bh); |
bh | 1580 | fs/hpfs/hpfs_fs.c | brelse(bh); |
bh | 1653 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh; |
bh | 1655 | fs/hpfs/hpfs_fs.c | if ((*bhp = bh = bread(dev, secno, 512)) != 0) |
bh | 1656 | fs/hpfs/hpfs_fs.c | return bh->b_data; |
bh | 1668 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh; |
bh | 1680 | fs/hpfs/hpfs_fs.c | qbh->bh[0] = bh = breada(dev, secno, 512, 0, UINT_MAX); |
bh | 1681 | fs/hpfs/hpfs_fs.c | if (!bh) |
bh | 1683 | fs/hpfs/hpfs_fs.c | memcpy(data, bh->b_data, 512); |
bh | 1685 | fs/hpfs/hpfs_fs.c | qbh->bh[1] = bh = bread(dev, secno + 1, 512); |
bh | 1686 | fs/hpfs/hpfs_fs.c | if (!bh) |
bh | 1688 | fs/hpfs/hpfs_fs.c | memcpy(data + 512, bh->b_data, 512); |
bh | 1690 | fs/hpfs/hpfs_fs.c | qbh->bh[2] = bh = bread(dev, secno + 2, 512); |
bh | 1691 | fs/hpfs/hpfs_fs.c | if (!bh) |
bh | 1693 | fs/hpfs/hpfs_fs.c | memcpy(data + 2 * 512, bh->b_data, 512); |
bh | 1695 | fs/hpfs/hpfs_fs.c | qbh->bh[3] = bh = bread(dev, secno + 3, 512); |
bh | 1696 | fs/hpfs/hpfs_fs.c | if (!bh) |
bh | 1698 | fs/hpfs/hpfs_fs.c | memcpy(data + 3 * 512, bh->b_data, 512); |
bh | 1703 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[2]); |
bh | 1705 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[1]); |
bh | 1707 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[0]); |
bh | 1719 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[3]); |
bh | 1720 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[2]); |
bh | 1721 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[1]); |
bh | 1722 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[0]); |
bh | 74 | fs/isofs/dir.c | struct buffer_head * bh; |
bh | 89 | fs/isofs/dir.c | if(!(bh = breada(inode->i_dev, block, bufsize, filp->f_pos, inode->i_size))) |
bh | 97 | fs/isofs/dir.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
bh | 105 | fs/isofs/dir.c | brelse(bh); |
bh | 111 | fs/isofs/dir.c | || !(bh = breada(inode->i_dev, block, bufsize, filp->f_pos, |
bh | 128 | fs/isofs/dir.c | memcpy(cpnt, bh->b_data, bufsize); |
bh | 131 | fs/isofs/dir.c | brelse(bh); |
bh | 135 | fs/isofs/dir.c | || !(bh = breada(inode->i_dev, block, bufsize, |
bh | 140 | fs/isofs/dir.c | memcpy((char *)cpnt+bufsize, bh->b_data, bufsize); |
bh | 234 | fs/isofs/dir.c | brelse(bh); |
bh | 243 | fs/isofs/dir.c | brelse(bh); |
bh | 93 | fs/isofs/file.c | struct buffer_head * bh; |
bh | 97 | fs/isofs/file.c | if (block && (bh = bread(inode->i_dev,block, ISOFS_BUFFER_SIZE(inode)))) { |
bh | 98 | fs/isofs/file.c | pnt = (unsigned char *) bh->b_data; |
bh | 109 | fs/isofs/file.c | brelse(bh); |
bh | 135 | fs/isofs/inode.c | struct buffer_head *bh; |
bh | 180 | fs/isofs/inode.c | if (!(bh = bread(dev, iso_blknum << (ISOFS_BLOCK_BITS-blocksize_bits), opt.blocksize))) { |
bh | 188 | fs/isofs/inode.c | vdp = (struct iso_volume_descriptor *)bh->b_data; |
bh | 189 | fs/isofs/inode.c | hdp = (struct hs_volume_descriptor *)bh->b_data; |
bh | 215 | fs/isofs/inode.c | brelse(bh); |
bh | 264 | fs/isofs/inode.c | brelse(bh); |
bh | 297 | fs/isofs/inode.c | brelse(bh); |
bh | 329 | fs/isofs/inode.c | struct buffer_head * bh; |
bh | 338 | fs/isofs/inode.c | if (!(bh=bread(inode->i_dev,block, bufsize))) { |
bh | 343 | fs/isofs/inode.c | pnt = ((unsigned char *) bh->b_data |
bh | 352 | fs/isofs/inode.c | brelse(bh); |
bh | 355 | fs/isofs/inode.c | memcpy(cpnt, bh->b_data, bufsize); |
bh | 356 | fs/isofs/inode.c | brelse(bh); |
bh | 357 | fs/isofs/inode.c | if (!(bh = bread(inode->i_dev,++block, bufsize))) { |
bh | 362 | fs/isofs/inode.c | memcpy((char *)cpnt + bufsize, bh->b_data, bufsize); |
bh | 464 | fs/isofs/inode.c | brelse(bh); |
bh | 539 | fs/isofs/inode.c | struct buffer_head * bh; |
bh | 544 | fs/isofs/inode.c | if (!(bh = bread(parent->i_dev, block, bufsize))) return -1; |
bh | 547 | fs/isofs/inode.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
bh | 550 | fs/isofs/inode.c | brelse(bh); |
bh | 560 | fs/isofs/inode.c | brelse(bh); |
bh | 567 | fs/isofs/inode.c | brelse(bh); |
bh | 582 | fs/isofs/inode.c | if (!block || !(bh = bread(parent->i_dev,block, bufsize))) |
bh | 587 | fs/isofs/inode.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
bh | 596 | fs/isofs/inode.c | brelse(bh); |
bh | 602 | fs/isofs/inode.c | || !(bh = bread(parent->i_dev,block, bufsize))) |
bh | 618 | fs/isofs/inode.c | memcpy(cpnt, bh->b_data, bufsize); |
bh | 621 | fs/isofs/inode.c | brelse(bh); |
bh | 624 | fs/isofs/inode.c | if (!(bh = bread(parent->i_dev,block,bufsize))) { |
bh | 628 | fs/isofs/inode.c | memcpy((char *)cpnt+bufsize, bh->b_data, bufsize); |
bh | 650 | fs/isofs/inode.c | brelse(bh); |
bh | 680 | fs/isofs/inode.c | void leak_check_brelse(struct buffer_head * bh){ |
bh | 682 | fs/isofs/inode.c | return brelse(bh); |
bh | 72 | fs/isofs/namei.c | struct buffer_head * bh; |
bh | 91 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,bufsize))) return NULL; |
bh | 94 | fs/isofs/namei.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
bh | 102 | fs/isofs/namei.c | brelse(bh); |
bh | 107 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,bufsize))) |
bh | 120 | fs/isofs/namei.c | memcpy(cpnt, bh->b_data, bufsize); |
bh | 123 | fs/isofs/namei.c | brelse(bh); |
bh | 126 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,bufsize))) { |
bh | 130 | fs/isofs/namei.c | memcpy((char *)cpnt+bufsize,bh->b_data,bufsize); |
bh | 201 | fs/isofs/namei.c | return bh; |
bh | 207 | fs/isofs/namei.c | brelse(bh); |
bh | 215 | fs/isofs/namei.c | struct buffer_head * bh; |
bh | 245 | fs/isofs/namei.c | if (!(bh = isofs_find_entry(dir,name,len, &ino, &ino_back))) { |
bh | 249 | fs/isofs/namei.c | brelse(bh); |
bh | 57 | fs/isofs/rock.c | struct buffer_head * bh; \ |
bh | 67 | fs/isofs/rock.c | bh = bread(DEV->i_dev, block++, ISOFS_BUFFER_SIZE(DEV)); \ |
bh | 68 | fs/isofs/rock.c | memcpy(buffer, bh->b_data + offset, 1024 - offset); \ |
bh | 69 | fs/isofs/rock.c | brelse(bh); \ |
bh | 74 | fs/isofs/rock.c | bh = bread(DEV->i_dev, block, ISOFS_BUFFER_SIZE(DEV)); \ |
bh | 75 | fs/isofs/rock.c | if(bh){ \ |
bh | 76 | fs/isofs/rock.c | memcpy(buffer + offset1, bh->b_data + offset, cont_size - offset1); \ |
bh | 77 | fs/isofs/rock.c | brelse(bh); \ |
bh | 388 | fs/isofs/rock.c | struct buffer_head * bh; |
bh | 407 | fs/isofs/rock.c | if (!(bh=bread(inode->i_dev,block, bufsize))) { |
bh | 412 | fs/isofs/rock.c | pnt = ((unsigned char *) bh->b_data) + (inode->i_ino & (bufsize - 1)); |
bh | 418 | fs/isofs/rock.c | memcpy(cpnt, bh->b_data, bufsize); |
bh | 419 | fs/isofs/rock.c | brelse(bh); |
bh | 420 | fs/isofs/rock.c | if (!(bh = bread(inode->i_dev,++block, bufsize))) { |
bh | 425 | fs/isofs/rock.c | memcpy((char *)cpnt+bufsize, bh->b_data, bufsize); |
bh | 492 | fs/isofs/rock.c | brelse(bh); |
bh | 45 | fs/minix/bitmap.c | struct buffer_head *bh; |
bh | 48 | fs/minix/bitmap.c | if (!(bh=map[i])) |
bh | 57 | fs/minix/bitmap.c | tmp = bh->b_data[end] & ((1<<numbits)-1); |
bh | 62 | fs/minix/bitmap.c | sum += nibblemap[bh->b_data[j] & 0xf] |
bh | 63 | fs/minix/bitmap.c | + nibblemap[(bh->b_data[j]>>4)&0xf]; |
bh | 70 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 82 | fs/minix/bitmap.c | bh = get_hash_table(sb->s_dev,block,BLOCK_SIZE); |
bh | 83 | fs/minix/bitmap.c | if (bh) |
bh | 84 | fs/minix/bitmap.c | bh->b_dirt=0; |
bh | 85 | fs/minix/bitmap.c | brelse(bh); |
bh | 89 | fs/minix/bitmap.c | bh = sb->u.minix_sb.s_zmap[zone]; |
bh | 90 | fs/minix/bitmap.c | if (!bh) { |
bh | 94 | fs/minix/bitmap.c | if (!clear_bit(bit,bh->b_data)) |
bh | 96 | fs/minix/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 102 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 112 | fs/minix/bitmap.c | if ((bh=sb->u.minix_sb.s_zmap[i]) != NULL) |
bh | 113 | fs/minix/bitmap.c | if ((j=find_first_zero(bh->b_data))<8192) |
bh | 115 | fs/minix/bitmap.c | if (i>=8 || !bh || j>=8192) |
bh | 117 | fs/minix/bitmap.c | if (set_bit(j,bh->b_data)) { |
bh | 121 | fs/minix/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 126 | fs/minix/bitmap.c | if (!(bh = getblk(sb->s_dev,j,BLOCK_SIZE))) { |
bh | 130 | fs/minix/bitmap.c | clear_block(bh->b_data); |
bh | 131 | fs/minix/bitmap.c | bh->b_uptodate = 1; |
bh | 132 | fs/minix/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 133 | fs/minix/bitmap.c | brelse(bh); |
bh | 145 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 171 | fs/minix/bitmap.c | if (!(bh=inode->i_sb->u.minix_sb.s_imap[ino >> 13])) { |
bh | 176 | fs/minix/bitmap.c | if (!clear_bit(ino & 8191, bh->b_data)) |
bh | 178 | fs/minix/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 185 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 195 | fs/minix/bitmap.c | if ((bh = inode->i_sb->u.minix_sb.s_imap[i]) != NULL) |
bh | 196 | fs/minix/bitmap.c | if ((j=find_first_zero(bh->b_data))<8192) |
bh | 198 | fs/minix/bitmap.c | if (!bh || j >= 8192) { |
bh | 202 | fs/minix/bitmap.c | if (set_bit(j,bh->b_data)) { /* shouldn't happen */ |
bh | 207 | fs/minix/bitmap.c | mark_buffer_dirty(bh, 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 | 193 | fs/minix/file.c | struct buffer_head * bh; |
bh | 211 | fs/minix/file.c | bh = minix_getblk(inode,pos/BLOCK_SIZE,1); |
bh | 212 | fs/minix/file.c | if (!bh) { |
bh | 220 | fs/minix/file.c | if (c != BLOCK_SIZE && !bh->b_uptodate) { |
bh | 221 | fs/minix/file.c | ll_rw_block(READ, 1, &bh); |
bh | 222 | fs/minix/file.c | wait_on_buffer(bh); |
bh | 223 | fs/minix/file.c | if (!bh->b_uptodate) { |
bh | 224 | fs/minix/file.c | brelse(bh); |
bh | 230 | fs/minix/file.c | p = (pos % BLOCK_SIZE) + bh->b_data; |
bh | 235 | fs/minix/file.c | bh->b_uptodate = 1; |
bh | 236 | fs/minix/file.c | mark_buffer_dirty(bh, 0); |
bh | 237 | fs/minix/file.c | brelse(bh); |
bh | 29 | fs/minix/fsync.c | struct buffer_head * bh; |
bh | 35 | fs/minix/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
bh | 36 | fs/minix/fsync.c | if (!bh) |
bh | 39 | fs/minix/fsync.c | brelse (bh); |
bh | 42 | fs/minix/fsync.c | if (wait && bh->b_req && !bh->b_uptodate) { |
bh | 43 | fs/minix/fsync.c | brelse(bh); |
bh | 46 | fs/minix/fsync.c | if (wait || !bh->b_uptodate || !bh->b_dirt) |
bh | 48 | fs/minix/fsync.c | brelse(bh); |
bh | 51 | fs/minix/fsync.c | ll_rw_block(WRITE, 1, &bh); |
bh | 52 | fs/minix/fsync.c | bh->b_count--; |
bh | 57 | fs/minix/fsync.c | struct buffer_head **bh, int wait) |
bh | 62 | fs/minix/fsync.c | *bh = NULL; |
bh | 69 | fs/minix/fsync.c | *bh = bread(inode->i_dev, tmp, blocksize); |
bh | 71 | fs/minix/fsync.c | brelse(*bh); |
bh | 72 | fs/minix/fsync.c | *bh = NULL; |
bh | 75 | fs/minix/fsync.c | if (!*bh) |
bh | 118 | fs/minix/inode.c | struct buffer_head *bh; |
bh | 125 | fs/minix/inode.c | if (!(bh = bread(dev,1,BLOCK_SIZE))) { |
bh | 131 | fs/minix/inode.c | ms = (struct minix_super_block *) bh->b_data; |
bh | 133 | fs/minix/inode.c | s->u.minix_sb.s_sbh = bh; |
bh | 154 | fs/minix/inode.c | brelse(bh); |
bh | 181 | fs/minix/inode.c | brelse(bh); |
bh | 194 | fs/minix/inode.c | brelse(bh); |
bh | 200 | fs/minix/inode.c | mark_buffer_dirty(bh, 1); |
bh | 232 | fs/minix/inode.c | static int block_bmap(struct buffer_head * bh, int nr) |
bh | 236 | fs/minix/inode.c | if (!bh) |
bh | 238 | fs/minix/inode.c | tmp = ((unsigned short *) bh->b_data)[nr]; |
bh | 239 | fs/minix/inode.c | brelse(bh); |
bh | 308 | fs/minix/inode.c | struct buffer_head * bh, int nr, int create) |
bh | 314 | fs/minix/inode.c | if (!bh) |
bh | 316 | fs/minix/inode.c | if (!bh->b_uptodate) { |
bh | 317 | fs/minix/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 318 | fs/minix/inode.c | wait_on_buffer(bh); |
bh | 319 | fs/minix/inode.c | if (!bh->b_uptodate) { |
bh | 320 | fs/minix/inode.c | brelse(bh); |
bh | 324 | fs/minix/inode.c | p = nr + (unsigned short *) bh->b_data; |
bh | 328 | fs/minix/inode.c | result = getblk(bh->b_dev, tmp, BLOCK_SIZE); |
bh | 330 | fs/minix/inode.c | brelse(bh); |
bh | 337 | fs/minix/inode.c | brelse(bh); |
bh | 342 | fs/minix/inode.c | brelse(bh); |
bh | 345 | fs/minix/inode.c | result = getblk(bh->b_dev, tmp, BLOCK_SIZE); |
bh | 352 | fs/minix/inode.c | mark_buffer_dirty(bh, 1); |
bh | 353 | fs/minix/inode.c | brelse(bh); |
bh | 359 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 373 | fs/minix/inode.c | bh = inode_getblk(inode,7,create); |
bh | 374 | fs/minix/inode.c | return block_getblk(inode, bh, block, create); |
bh | 377 | fs/minix/inode.c | bh = inode_getblk(inode,8,create); |
bh | 378 | fs/minix/inode.c | bh = block_getblk(inode, bh, block>>9, create); |
bh | 379 | fs/minix/inode.c | return block_getblk(inode, bh, block & 511, create); |
bh | 384 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 386 | fs/minix/inode.c | bh = minix_getblk(inode,block,create); |
bh | 387 | fs/minix/inode.c | if (!bh || bh->b_uptodate) |
bh | 388 | fs/minix/inode.c | return bh; |
bh | 389 | fs/minix/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 390 | fs/minix/inode.c | wait_on_buffer(bh); |
bh | 391 | fs/minix/inode.c | if (bh->b_uptodate) |
bh | 392 | fs/minix/inode.c | return bh; |
bh | 393 | fs/minix/inode.c | brelse(bh); |
bh | 399 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 414 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,block, BLOCK_SIZE))) { |
bh | 419 | fs/minix/inode.c | raw_inode = ((struct minix_inode *) bh->b_data) + |
bh | 432 | fs/minix/inode.c | brelse(bh); |
bh | 449 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 462 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) { |
bh | 467 | fs/minix/inode.c | raw_inode = ((struct minix_inode *)bh->b_data) + |
bh | 480 | fs/minix/inode.c | mark_buffer_dirty(bh, 1); |
bh | 481 | fs/minix/inode.c | return bh; |
bh | 486 | fs/minix/inode.c | struct buffer_head *bh; |
bh | 487 | fs/minix/inode.c | bh = minix_update_inode(inode); |
bh | 488 | fs/minix/inode.c | brelse(bh); |
bh | 494 | fs/minix/inode.c | struct buffer_head *bh; |
bh | 496 | fs/minix/inode.c | bh = minix_update_inode(inode); |
bh | 497 | fs/minix/inode.c | if (bh && bh->b_dirt) |
bh | 499 | fs/minix/inode.c | ll_rw_block(WRITE, 1, &bh); |
bh | 500 | fs/minix/inode.c | wait_on_buffer(bh); |
bh | 501 | fs/minix/inode.c | if (bh->b_req && !bh->b_uptodate) |
bh | 508 | fs/minix/inode.c | else if (!bh) |
bh | 510 | 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 | 191 | fs/minix/namei.c | brelse(bh); |
bh | 198 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 202 | fs/minix/namei.c | if (offset < bh->b_size) |
bh | 204 | fs/minix/namei.c | brelse(bh); |
bh | 205 | fs/minix/namei.c | bh = NULL; |
bh | 209 | fs/minix/namei.c | *res_buf = bh; |
bh | 218 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 232 | fs/minix/namei.c | error = minix_add_entry(dir,name,len, &bh ,&de); |
bh | 241 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 242 | fs/minix/namei.c | brelse(bh); |
bh | 252 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 257 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 258 | fs/minix/namei.c | if (bh) { |
bh | 259 | fs/minix/namei.c | brelse(bh); |
bh | 289 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
bh | 298 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 299 | fs/minix/namei.c | brelse(bh); |
bh | 309 | fs/minix/namei.c | struct buffer_head * bh, *dir_block; |
bh | 318 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 319 | fs/minix/namei.c | if (bh) { |
bh | 320 | fs/minix/namei.c | brelse(bh); |
bh | 356 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
bh | 364 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 369 | fs/minix/namei.c | brelse(bh); |
bh | 379 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 387 | fs/minix/namei.c | bh = NULL; |
bh | 393 | fs/minix/namei.c | bh = minix_bread(inode,0,0); |
bh | 394 | fs/minix/namei.c | if (!bh) |
bh | 396 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
bh | 399 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + info->s_dirsize); |
bh | 403 | fs/minix/namei.c | if (!bh) { |
bh | 404 | fs/minix/namei.c | bh = minix_bread(inode,block,0); |
bh | 405 | fs/minix/namei.c | if (!bh) { |
bh | 410 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + offset); |
bh | 413 | fs/minix/namei.c | brelse(bh); |
bh | 416 | fs/minix/namei.c | if (offset < bh->b_size) |
bh | 418 | fs/minix/namei.c | brelse(bh); |
bh | 419 | fs/minix/namei.c | bh = NULL; |
bh | 423 | fs/minix/namei.c | brelse(bh); |
bh | 426 | fs/minix/namei.c | brelse(bh); |
bh | 435 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 439 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 441 | fs/minix/namei.c | if (!bh) |
bh | 473 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 483 | fs/minix/namei.c | brelse(bh); |
bh | 491 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 497 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 498 | fs/minix/namei.c | if (!bh) |
bh | 507 | fs/minix/namei.c | brelse(bh); |
bh | 526 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 534 | fs/minix/namei.c | brelse(bh); |
bh | 544 | fs/minix/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 570 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 571 | fs/minix/namei.c | if (bh) { |
bh | 575 | fs/minix/namei.c | brelse(bh); |
bh | 579 | fs/minix/namei.c | i = minix_add_entry(dir, name, len, &bh, &de); |
bh | 588 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 589 | fs/minix/namei.c | brelse(bh); |
bh | 599 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 611 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 612 | fs/minix/namei.c | if (bh) { |
bh | 613 | fs/minix/namei.c | brelse(bh); |
bh | 618 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
bh | 625 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 626 | 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 | 29 | fs/minix/truncate.c | struct buffer_head * bh; |
bh | 39 | fs/minix/truncate.c | bh = get_hash_table(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 41 | fs/minix/truncate.c | brelse(bh); |
bh | 44 | fs/minix/truncate.c | if ((bh && bh->b_count != 1) || tmp != *p) { |
bh | 46 | fs/minix/truncate.c | brelse(bh); |
bh | 51 | fs/minix/truncate.c | brelse(bh); |
bh | 59 | fs/minix/truncate.c | struct buffer_head * bh; |
bh | 88 | fs/minix/truncate.c | bh = get_hash_table(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 90 | fs/minix/truncate.c | brelse(bh); |
bh | 93 | fs/minix/truncate.c | if ((bh && bh->b_count != 1) || tmp != *ind) { |
bh | 95 | fs/minix/truncate.c | brelse(bh); |
bh | 100 | 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 | 21 | fs/msdos/fat.c | struct buffer_head *bh,*bh2,*c_bh,*c_bh2; |
bh | 32 | fs/msdos/fat.c | if (!(bh = msdos_sread(sb->s_dev,MSDOS_SB(sb)->fat_start+(first >> |
bh | 38 | fs/msdos/fat.c | bh2 = bh; |
bh | 44 | fs/msdos/fat.c | brelse(bh); |
bh | 78 | fs/msdos/fat.c | mark_buffer_dirty(bh, 1); |
bh | 85 | fs/msdos/fat.c | if (data != data2 || bh != bh2) { |
bh | 99 | 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 | 126 | fs/msdos/file.c | brelse(bh); |
bh | 141 | fs/msdos/file.c | struct buffer_head *bh; |
bh | 168 | fs/msdos/file.c | if (!(bh = msdos_sread(inode->i_dev,sector,&data))) { |
bh | 203 | fs/msdos/file.c | mark_buffer_dirty(bh, 0); |
bh | 204 | fs/msdos/file.c | brelse(bh); |
bh | 147 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 163 | fs/msdos/inode.c | bh = bread(s->s_dev, 0, BLOCK_SIZE); |
bh | 165 | fs/msdos/inode.c | if (bh == NULL) { |
bh | 170 | fs/msdos/inode.c | b = (struct msdos_boot_sector *) bh->b_data; |
bh | 220 | fs/msdos/inode.c | brelse(bh); |
bh | 307 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 334 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, |
bh | 339 | fs/msdos/inode.c | raw_entry = &((struct msdos_dir_entry *) (bh->b_data)) |
bh | 386 | fs/msdos/inode.c | brelse(bh); |
bh | 392 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 397 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, |
bh | 402 | fs/msdos/inode.c | raw_entry = &((struct msdos_dir_entry *) (bh->b_data)) |
bh | 418 | fs/msdos/inode.c | mark_buffer_dirty(bh, 1); |
bh | 419 | fs/msdos/inode.c | brelse(bh); |
bh | 114 | fs/msdos/misc.c | struct buffer_head *bh; |
bh | 173 | fs/msdos/misc.c | if (!(bh = getblk(inode->i_dev,sector >> 1, |
bh | 177 | fs/msdos/misc.c | memset(bh->b_data,0,BLOCK_SIZE); |
bh | 178 | fs/msdos/misc.c | bh->b_uptodate = 1; |
bh | 183 | fs/msdos/misc.c | if (!(bh = msdos_sread(inode->i_dev,sector, |
bh | 188 | fs/msdos/misc.c | if (bh) { |
bh | 189 | fs/msdos/misc.c | mark_buffer_dirty(bh, 1); |
bh | 190 | fs/msdos/misc.c | brelse(bh); |
bh | 268 | fs/msdos/misc.c | int msdos_get_entry(struct inode *dir, off_t *pos,struct buffer_head **bh, |
bh | 281 | fs/msdos/misc.c | if (*bh) |
bh | 282 | fs/msdos/misc.c | brelse(*bh); |
bh | 283 | fs/msdos/misc.c | if (!(*bh = msdos_sread(dir->i_dev,sector,&data))) { |
bh | 351 | fs/msdos/misc.c | struct buffer_head *bh; |
bh | 356 | fs/msdos/misc.c | if (!(bh = msdos_sread(sb->s_dev,sector,(void **) &data))) return -EIO; |
bh | 369 | fs/msdos/misc.c | if (!res_bh) brelse(bh); |
bh | 371 | fs/msdos/misc.c | *res_bh = bh; |
bh | 377 | 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 | 184 | fs/msdos/namei.c | mark_buffer_dirty(bh, 1); |
bh | 187 | fs/msdos/namei.c | brelse(bh); |
bh | 199 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 211 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
bh | 213 | fs/msdos/namei.c | brelse(bh); |
bh | 246 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 258 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
bh | 260 | fs/msdos/namei.c | brelse(bh); |
bh | 304 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 311 | fs/msdos/namei.c | bh = NULL; |
bh | 312 | fs/msdos/namei.c | while (msdos_get_entry(dir,&pos,&bh,&de) > -1) |
bh | 316 | fs/msdos/namei.c | brelse(bh); |
bh | 319 | fs/msdos/namei.c | if (bh) |
bh | 320 | fs/msdos/namei.c | brelse(bh); |
bh | 329 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 333 | fs/msdos/namei.c | bh = NULL; |
bh | 338 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) goto rmdir_done; |
bh | 353 | fs/msdos/namei.c | mark_buffer_dirty(bh, 1); |
bh | 356 | fs/msdos/namei.c | brelse(bh); |
bh | 366 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 370 | fs/msdos/namei.c | bh = NULL; |
bh | 372 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) |
bh | 387 | fs/msdos/namei.c | mark_buffer_dirty(bh, 1); |
bh | 389 | fs/msdos/namei.c | brelse(bh); |
bh | 44 | fs/sysv/balloc.c | struct buffer_head * bh; |
bh | 69 | fs/sysv/balloc.c | bh = bread(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
bh | 71 | fs/sysv/balloc.c | bh = getblk(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
bh | 72 | fs/sysv/balloc.c | if (!bh) { |
bh | 77 | fs/sysv/balloc.c | bh_data = bh->b_data + ((block & sb->sv_block_size_ratio_1) << sb->sv_block_size_bits); |
bh | 99 | fs/sysv/balloc.c | mark_buffer_dirty(bh, 1); |
bh | 100 | fs/sysv/balloc.c | bh->b_uptodate = 1; |
bh | 101 | fs/sysv/balloc.c | brelse(bh); |
bh | 109 | fs/sysv/balloc.c | bh = bread(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
bh | 111 | fs/sysv/balloc.c | bh = getblk(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
bh | 112 | fs/sysv/balloc.c | if (!bh) { |
bh | 117 | fs/sysv/balloc.c | bh_data = bh->b_data + ((block & sb->sv_block_size_ratio_1) << sb->sv_block_size_bits); |
bh | 120 | fs/sysv/balloc.c | mark_buffer_dirty(bh, 1); |
bh | 121 | fs/sysv/balloc.c | bh->b_uptodate = 1; |
bh | 122 | fs/sysv/balloc.c | brelse(bh); |
bh | 127 | fs/sysv/balloc.c | bh = get_hash_table(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
bh | 128 | fs/sysv/balloc.c | if (bh) |
bh | 129 | fs/sysv/balloc.c | bh->b_dirt = 0; |
bh | 130 | fs/sysv/balloc.c | brelse(bh); |
bh | 149 | fs/sysv/balloc.c | struct buffer_head * bh; |
bh | 178 | fs/sysv/balloc.c | if (!(bh = sysv_bread(sb, sb->s_dev, block, &bh_data))) { |
bh | 206 | fs/sysv/balloc.c | brelse(bh); |
bh | 212 | fs/sysv/balloc.c | brelse(bh); |
bh | 216 | fs/sysv/balloc.c | bh = bread(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
bh | 218 | fs/sysv/balloc.c | bh = getblk(sb->s_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
bh | 219 | fs/sysv/balloc.c | if (!bh) { |
bh | 224 | fs/sysv/balloc.c | bh_data = bh->b_data + ((block & sb->sv_block_size_ratio_1) << sb->sv_block_size_bits); |
bh | 226 | fs/sysv/balloc.c | if (bh->b_count != 1) { |
bh | 232 | fs/sysv/balloc.c | mark_buffer_dirty(bh, 1); |
bh | 233 | fs/sysv/balloc.c | bh->b_uptodate = 1; |
bh | 234 | fs/sysv/balloc.c | brelse(bh); |
bh | 251 | fs/sysv/balloc.c | struct buffer_head * bh; |
bh | 278 | fs/sysv/balloc.c | if (!(bh = sysv_bread(sb, sb->s_dev, block, &bh_data))) { |
bh | 303 | fs/sysv/balloc.c | brelse(bh); |
bh | 307 | fs/sysv/balloc.c | brelse(bh); |
bh | 321 | fs/sysv/balloc.c | brelse(bh); |
bh | 70 | fs/sysv/dir.c | struct buffer_head * bh; |
bh | 80 | fs/sysv/dir.c | bh = sysv_file_bread(inode, filp->f_pos >> sb->sv_block_size_bits, 0, &bh_data); |
bh | 81 | fs/sysv/dir.c | if (!bh) { |
bh | 102 | fs/sysv/dir.c | brelse(bh); |
bh | 107 | fs/sysv/dir.c | brelse(bh); |
bh | 105 | fs/sysv/file.c | struct buffer_head * bh; |
bh | 170 | fs/sysv/file.c | bhb->bh = sysv_getblk(inode, block++, 0, &bhb->bh_data); |
bh | 171 | fs/sysv/file.c | if (bhb->bh && !bhb->bh->b_uptodate) { |
bh | 175 | fs/sysv/file.c | if (bhreq[bhreqi] == bhb->bh) |
bh | 177 | fs/sysv/file.c | bhreq[bhrequest++] = bhb->bh; |
bh | 197 | fs/sysv/file.c | if (bhe->bh) { |
bh | 198 | fs/sysv/file.c | wait_on_buffer(bhe->bh); |
bh | 199 | fs/sysv/file.c | if (!bhe->bh->b_uptodate) { /* read error? */ |
bh | 200 | fs/sysv/file.c | brelse(bhe->bh); |
bh | 214 | fs/sysv/file.c | if (bhe->bh) { |
bh | 216 | fs/sysv/file.c | brelse(bhe->bh); |
bh | 225 | fs/sysv/file.c | } while (left > 0 && bhe != bhb && (!bhe->bh || !bhe->bh->b_lock)); |
bh | 230 | fs/sysv/file.c | brelse(bhe->bh); |
bh | 247 | fs/sysv/file.c | struct buffer_head * bh; |
bh | 274 | fs/sysv/file.c | bh = sysv_getblk (inode, pos >> sb->sv_block_size_bits, 1, &bh_data); |
bh | 275 | fs/sysv/file.c | if (!bh) { |
bh | 283 | fs/sysv/file.c | if (c != BLOCK_SIZE && !bh->b_uptodate) { |
bh | 284 | fs/sysv/file.c | ll_rw_block(READ, 1, &bh); |
bh | 285 | fs/sysv/file.c | wait_on_buffer(bh); |
bh | 286 | fs/sysv/file.c | if (!bh->b_uptodate) { |
bh | 287 | fs/sysv/file.c | brelse(bh); |
bh | 303 | fs/sysv/file.c | bh->b_uptodate = 1; |
bh | 304 | fs/sysv/file.c | mark_buffer_dirty(bh, 0); |
bh | 305 | fs/sysv/file.c | brelse(bh); |
bh | 31 | fs/sysv/fsync.c | struct buffer_head * bh; |
bh | 41 | fs/sysv/fsync.c | bh = get_hash_table(inode->i_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
bh | 42 | fs/sysv/fsync.c | if (!bh) |
bh | 45 | fs/sysv/fsync.c | brelse (bh); |
bh | 48 | fs/sysv/fsync.c | if (wait && bh->b_req && !bh->b_uptodate) { |
bh | 49 | fs/sysv/fsync.c | brelse(bh); |
bh | 52 | fs/sysv/fsync.c | if (wait || !bh->b_uptodate || !bh->b_dirt) { |
bh | 53 | fs/sysv/fsync.c | brelse(bh); |
bh | 56 | fs/sysv/fsync.c | ll_rw_block(WRITE, 1, &bh); |
bh | 57 | fs/sysv/fsync.c | bh->b_count--; |
bh | 63 | fs/sysv/fsync.c | struct buffer_head * *bh, char * *bh_data, int wait) |
bh | 68 | fs/sysv/fsync.c | *bh = NULL; |
bh | 77 | fs/sysv/fsync.c | *bh = sysv_bread(inode->i_sb, inode->i_dev, block, bh_data); |
bh | 79 | fs/sysv/fsync.c | brelse(*bh); |
bh | 80 | fs/sysv/fsync.c | *bh = NULL; |
bh | 83 | fs/sysv/fsync.c | if (!*bh) |
bh | 40 | fs/sysv/ialloc.c | struct buffer_head * bh; |
bh | 67 | fs/sysv/ialloc.c | if (!(bh = sysv_bread(sb, inode->i_dev, sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits), &bh_data))) { |
bh | 80 | fs/sysv/ialloc.c | mark_buffer_dirty(bh, 1); |
bh | 82 | fs/sysv/ialloc.c | brelse(bh); |
bh | 90 | fs/sysv/ialloc.c | struct buffer_head * bh; |
bh | 112 | fs/sysv/ialloc.c | if (!(bh = sysv_bread(sb, sb->s_dev, block, &bh_data))) { |
bh | 122 | fs/sysv/ialloc.c | brelse(bh); |
bh | 164 | fs/sysv/ialloc.c | struct buffer_head * bh; |
bh | 179 | fs/sysv/ialloc.c | if (!(bh = sysv_bread(sb, sb->s_dev, block, &bh_data))) { |
bh | 188 | fs/sysv/ialloc.c | brelse(bh); |
bh | 120 | fs/sysv/inode.c | static const char* detect_xenix (struct super_block *sb, struct buffer_head *bh) |
bh | 124 | fs/sysv/inode.c | sbd = (struct xenix_super_block *) bh->b_data; |
bh | 134 | fs/sysv/inode.c | sb->sv_bh = bh; |
bh | 156 | fs/sysv/inode.c | static const char* detect_sysv4 (struct super_block *sb, struct buffer_head *bh) |
bh | 160 | fs/sysv/inode.c | sbd = (struct sysv4_super_block *) (bh->b_data + BLOCK_SIZE/2); |
bh | 172 | fs/sysv/inode.c | sb->sv_bh = bh; |
bh | 194 | fs/sysv/inode.c | static const char* detect_sysv2 (struct super_block *sb, struct buffer_head *bh) |
bh | 198 | fs/sysv/inode.c | sbd = (struct sysv2_super_block *) (bh->b_data + BLOCK_SIZE/2); |
bh | 210 | fs/sysv/inode.c | sb->sv_bh = bh; |
bh | 232 | fs/sysv/inode.c | static const char* detect_coherent (struct super_block *sb, struct buffer_head *bh) |
bh | 236 | fs/sysv/inode.c | sbd = (struct coh_super_block *) (bh->b_data + BLOCK_SIZE/2); |
bh | 247 | fs/sysv/inode.c | sb->sv_bh = bh; |
bh | 268 | fs/sysv/inode.c | struct buffer_head *bh; |
bh | 286 | fs/sysv/inode.c | if ((bh = bread(dev, 1, BLOCK_SIZE)) != NULL) { |
bh | 287 | fs/sysv/inode.c | if ((found = detect_xenix(sb,bh)) != NULL) |
bh | 289 | fs/sysv/inode.c | brelse(bh); |
bh | 291 | fs/sysv/inode.c | if ((bh = bread(dev, 0, BLOCK_SIZE)) != NULL) { |
bh | 293 | fs/sysv/inode.c | if ((found = detect_sysv4(sb,bh)) != NULL) |
bh | 295 | fs/sysv/inode.c | if ((found = detect_sysv2(sb,bh)) != NULL) |
bh | 298 | fs/sysv/inode.c | if ((found = detect_coherent(sb,bh)) != NULL) |
bh | 300 | fs/sysv/inode.c | brelse(bh); |
bh | 307 | fs/sysv/inode.c | if ((bh = bread(dev, offsets[i], BLOCK_SIZE)) != NULL) { |
bh | 309 | fs/sysv/inode.c | if ((found = detect_sysv2(sb,bh)) != NULL) { |
bh | 313 | fs/sysv/inode.c | brelse(bh); |
bh | 333 | fs/sysv/inode.c | brelse(bh); |
bh | 397 | fs/sysv/inode.c | static int block_bmap(struct super_block * sb, struct buffer_head * bh, int nr, int convert) |
bh | 401 | fs/sysv/inode.c | if (!bh) |
bh | 403 | fs/sysv/inode.c | tmp = ((sysv_zone_t *) bh->b_data) [nr]; |
bh | 406 | fs/sysv/inode.c | brelse(bh); |
bh | 418 | fs/sysv/inode.c | struct buffer_head * bh; |
bh | 428 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,BLOCK_SIZE); |
bh | 429 | fs/sysv/inode.c | return block_bmap(sb,bh,block,convert); |
bh | 436 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,BLOCK_SIZE); |
bh | 437 | fs/sysv/inode.c | i = block_bmap(sb,bh,block/IND_PER_BLOCK,convert); |
bh | 440 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,BLOCK_SIZE); |
bh | 441 | fs/sysv/inode.c | return block_bmap(sb,bh,block%IND_PER_BLOCK,convert); |
bh | 448 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,BLOCK_SIZE); |
bh | 449 | fs/sysv/inode.c | i = block_bmap(sb,bh,block/(IND_PER_BLOCK*IND_PER_BLOCK),convert); |
bh | 452 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,BLOCK_SIZE); |
bh | 453 | fs/sysv/inode.c | i = block_bmap(sb,bh,(block/IND_PER_BLOCK)%IND_PER_BLOCK,convert); |
bh | 456 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,BLOCK_SIZE); |
bh | 457 | fs/sysv/inode.c | return block_bmap(sb,bh,block%IND_PER_BLOCK,convert); |
bh | 511 | fs/sysv/inode.c | struct buffer_head * bh, int nr, int create, char * *start) |
bh | 518 | fs/sysv/inode.c | if (!bh) |
bh | 520 | fs/sysv/inode.c | if (!bh->b_uptodate) { |
bh | 521 | fs/sysv/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 522 | fs/sysv/inode.c | wait_on_buffer(bh); |
bh | 523 | fs/sysv/inode.c | if (!bh->b_uptodate) { |
bh | 524 | fs/sysv/inode.c | brelse(bh); |
bh | 535 | fs/sysv/inode.c | result = getblk(bh->b_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
bh | 537 | fs/sysv/inode.c | brelse(bh); |
bh | 545 | fs/sysv/inode.c | brelse(bh); |
bh | 550 | fs/sysv/inode.c | brelse(bh); |
bh | 553 | fs/sysv/inode.c | result = getblk(bh->b_dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE); |
bh | 560 | fs/sysv/inode.c | mark_buffer_dirty(bh, 1); |
bh | 561 | fs/sysv/inode.c | brelse(bh); |
bh | 570 | fs/sysv/inode.c | struct buffer_head * bh; |
bh | 576 | fs/sysv/inode.c | bh = inode_getblk(inode,10,create,start); |
bh | 577 | fs/sysv/inode.c | return block_getblk(inode, bh, block, create, start); |
bh | 581 | fs/sysv/inode.c | bh = inode_getblk(inode,11,create,start); |
bh | 582 | fs/sysv/inode.c | bh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_bits, create, start); |
bh | 583 | fs/sysv/inode.c | return block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create, start); |
bh | 587 | fs/sysv/inode.c | bh = inode_getblk(inode,12,create,start); |
bh | 588 | fs/sysv/inode.c | bh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_2_bits, create, start); |
bh | 589 | fs/sysv/inode.c | bh = block_getblk(inode, bh, (block >> sb->sv_ind_per_block_bits) & sb->sv_ind_per_block_1, create, start); |
bh | 590 | fs/sysv/inode.c | return block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create, start); |
bh | 602 | fs/sysv/inode.c | struct buffer_head * bh; |
bh | 604 | fs/sysv/inode.c | bh = sysv_getblk(inode,block,create,start); |
bh | 605 | fs/sysv/inode.c | if (!bh || bh->b_uptodate) |
bh | 606 | fs/sysv/inode.c | return bh; |
bh | 607 | fs/sysv/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 608 | fs/sysv/inode.c | wait_on_buffer(bh); |
bh | 609 | fs/sysv/inode.c | if (bh->b_uptodate) |
bh | 610 | fs/sysv/inode.c | return bh; |
bh | 611 | fs/sysv/inode.c | brelse(bh); |
bh | 643 | fs/sysv/inode.c | struct buffer_head * bh; |
bh | 658 | fs/sysv/inode.c | if (!(bh=sysv_bread(sb,inode->i_dev,block,&bh_data))) { |
bh | 695 | fs/sysv/inode.c | brelse(bh); |
bh | 728 | fs/sysv/inode.c | struct buffer_head * bh; |
bh | 742 | fs/sysv/inode.c | if (!(bh = sysv_bread(sb,inode->i_dev,block,&bh_data))) { |
bh | 776 | fs/sysv/inode.c | mark_buffer_dirty(bh, 1); |
bh | 777 | fs/sysv/inode.c | return bh; |
bh | 782 | fs/sysv/inode.c | struct buffer_head *bh; |
bh | 783 | fs/sysv/inode.c | bh = sysv_update_inode(inode); |
bh | 784 | fs/sysv/inode.c | brelse(bh); |
bh | 790 | fs/sysv/inode.c | struct buffer_head *bh; |
bh | 792 | fs/sysv/inode.c | bh = sysv_update_inode(inode); |
bh | 793 | fs/sysv/inode.c | if (bh && bh->b_dirt) { |
bh | 794 | fs/sysv/inode.c | ll_rw_block(WRITE, 1, &bh); |
bh | 795 | fs/sysv/inode.c | wait_on_buffer(bh); |
bh | 796 | fs/sysv/inode.c | if (bh->b_req && !bh->b_uptodate) |
bh | 803 | fs/sysv/inode.c | else if (!bh) |
bh | 805 | fs/sysv/inode.c | brelse (bh); |
bh | 70 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 82 | fs/sysv/namei.c | bh = NULL; |
bh | 85 | fs/sysv/namei.c | if (!bh) { |
bh | 86 | fs/sysv/namei.c | bh = sysv_file_bread(dir,block,0,&bh_data); |
bh | 87 | fs/sysv/namei.c | if (!bh) { |
bh | 95 | fs/sysv/namei.c | return bh; |
bh | 100 | fs/sysv/namei.c | brelse(bh); |
bh | 101 | fs/sysv/namei.c | bh = NULL; |
bh | 104 | fs/sysv/namei.c | brelse(bh); |
bh | 114 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 123 | fs/sysv/namei.c | if (!(bh = sysv_find_entry(dir,name,len,&de))) { |
bh | 128 | fs/sysv/namei.c | brelse(bh); |
bh | 155 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 171 | fs/sysv/namei.c | bh = NULL; |
bh | 174 | fs/sysv/namei.c | if (!bh) { |
bh | 175 | fs/sysv/namei.c | bh = sysv_file_bread(dir,block,1,&bh_data); |
bh | 176 | fs/sysv/namei.c | if (!bh) |
bh | 189 | fs/sysv/namei.c | brelse(bh); |
bh | 196 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 202 | fs/sysv/namei.c | brelse(bh); |
bh | 203 | fs/sysv/namei.c | bh = NULL; |
bh | 206 | fs/sysv/namei.c | *res_buf = bh; |
bh | 215 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 232 | fs/sysv/namei.c | error = sysv_add_entry(dir,name,len, &bh ,&de); |
bh | 241 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 242 | fs/sysv/namei.c | brelse(bh); |
bh | 252 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 257 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
bh | 258 | fs/sysv/namei.c | if (bh) { |
bh | 259 | fs/sysv/namei.c | brelse(bh); |
bh | 292 | fs/sysv/namei.c | error = sysv_add_entry(dir, name, len, &bh, &de); |
bh | 301 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 302 | fs/sysv/namei.c | brelse(bh); |
bh | 312 | fs/sysv/namei.c | struct buffer_head * bh, *dir_block; |
bh | 320 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
bh | 321 | fs/sysv/namei.c | if (bh) { |
bh | 322 | fs/sysv/namei.c | brelse(bh); |
bh | 358 | fs/sysv/namei.c | error = sysv_add_entry(dir, name, len, &bh, &de); |
bh | 366 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 371 | fs/sysv/namei.c | brelse(bh); |
bh | 382 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 389 | fs/sysv/namei.c | bh = NULL; |
bh | 395 | fs/sysv/namei.c | bh = sysv_file_bread(inode,0,0,&bh_data); |
bh | 396 | fs/sysv/namei.c | if (!bh) |
bh | 406 | fs/sysv/namei.c | if (!bh) { |
bh | 407 | fs/sysv/namei.c | bh = sysv_file_bread(inode,block,0,&bh_data); |
bh | 408 | fs/sysv/namei.c | if (!bh) { |
bh | 418 | fs/sysv/namei.c | brelse(bh); |
bh | 423 | fs/sysv/namei.c | brelse(bh); |
bh | 424 | fs/sysv/namei.c | bh = NULL; |
bh | 427 | fs/sysv/namei.c | brelse(bh); |
bh | 430 | fs/sysv/namei.c | brelse(bh); |
bh | 439 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 443 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
bh | 445 | fs/sysv/namei.c | if (!bh) |
bh | 477 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 487 | fs/sysv/namei.c | brelse(bh); |
bh | 495 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 501 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
bh | 502 | fs/sysv/namei.c | if (!bh) |
bh | 511 | fs/sysv/namei.c | brelse(bh); |
bh | 530 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 538 | fs/sysv/namei.c | brelse(bh); |
bh | 553 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 578 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
bh | 579 | fs/sysv/namei.c | if (bh) { |
bh | 583 | fs/sysv/namei.c | brelse(bh); |
bh | 587 | fs/sysv/namei.c | i = sysv_add_entry(dir, name, len, &bh, &de); |
bh | 596 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 597 | fs/sysv/namei.c | brelse(bh); |
bh | 607 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 619 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
bh | 620 | fs/sysv/namei.c | if (bh) { |
bh | 621 | fs/sysv/namei.c | brelse(bh); |
bh | 626 | fs/sysv/namei.c | error = sysv_add_entry(dir, name, len, &bh, &de); |
bh | 633 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 634 | fs/sysv/namei.c | brelse(bh); |
bh | 51 | fs/sysv/symlink.c | struct buffer_head * bh; |
bh | 73 | fs/sysv/symlink.c | if (!(bh = sysv_file_bread(inode, 0, 0, &bh_data))) { /* is reading 1 block enough ?? */ |
bh | 82 | fs/sysv/symlink.c | brelse(bh); |
bh | 88 | fs/sysv/symlink.c | struct buffer_head * bh; |
bh | 99 | fs/sysv/symlink.c | bh = sysv_file_bread(inode, 0, 0, &bh_data); |
bh | 101 | fs/sysv/symlink.c | if (!bh) |
bh | 108 | fs/sysv/symlink.c | brelse(bh); |
bh | 57 | fs/sysv/truncate.c | struct buffer_head * bh; |
bh | 69 | fs/sysv/truncate.c | bh = sysv_bread(sb,inode->i_dev,block,&bh_data); |
bh | 71 | fs/sysv/truncate.c | brelse(bh); |
bh | 74 | fs/sysv/truncate.c | if (!bh) { |
bh | 87 | fs/sysv/truncate.c | mark_buffer_dirty(bh, 1); |
bh | 94 | fs/sysv/truncate.c | brelse(bh); |
bh | 101 | fs/sysv/truncate.c | brelse(bh); |
bh | 112 | fs/sysv/truncate.c | struct buffer_head * bh; |
bh | 125 | fs/sysv/truncate.c | bh = sysv_bread(sb,inode->i_dev,block,&bh_data); |
bh | 127 | fs/sysv/truncate.c | brelse(bh); |
bh | 130 | fs/sysv/truncate.c | if (!bh) { |
bh | 145 | fs/sysv/truncate.c | retry |= coh_trunc_indirect(inode,j,dind,sb->sv_convert,&bh->b_dirt); |
bh | 151 | fs/sysv/truncate.c | brelse(bh); |
bh | 158 | fs/sysv/truncate.c | brelse(bh); |
bh | 169 | fs/sysv/truncate.c | struct buffer_head * bh; |
bh | 180 | fs/sysv/truncate.c | bh = sysv_bread(sb,inode->i_dev,block,&bh_data); |
bh | 182 | fs/sysv/truncate.c | brelse(bh); |
bh | 185 | fs/sysv/truncate.c | if (!bh) { |
bh | 200 | fs/sysv/truncate.c | retry |= coh_trunc_dindirect(inode,j,tind,sb->sv_convert,&bh->b_dirt); |
bh | 206 | fs/sysv/truncate.c | brelse(bh); |
bh | 213 | fs/sysv/truncate.c | brelse(bh); |
bh | 261 | fs/sysv/truncate.c | struct buffer_head * bh; |
bh | 271 | fs/sysv/truncate.c | bh = get_hash_table(inode->i_dev,block+sb->sv_block_base,BLOCK_SIZE); |
bh | 273 | fs/sysv/truncate.c | brelse(bh); |
bh | 276 | fs/sysv/truncate.c | if ((bh && bh->b_count != 1) || (block != *p)) { |
bh | 278 | fs/sysv/truncate.c | brelse(bh); |
bh | 283 | fs/sysv/truncate.c | brelse(bh); |
bh | 299 | fs/sysv/truncate.c | struct buffer_head * bh; |
bh | 330 | fs/sysv/truncate.c | bh = get_hash_table(inode->i_dev,block+sb->sv_block_base,BLOCK_SIZE); |
bh | 332 | fs/sysv/truncate.c | brelse(bh); |
bh | 335 | fs/sysv/truncate.c | if ((bh && bh->b_count != 1) || (tmp != *ind)) { |
bh | 337 | fs/sysv/truncate.c | brelse(bh); |
bh | 342 | fs/sysv/truncate.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 | mark_buffer_dirty(bh, 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 | 248 | fs/xiafs/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 254 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 270 | fs/xiafs/bitmap.c | if (!(bh = getblk(sb->s_dev, tmp, XIAFS_ZSIZE(sb)))) { |
bh | 274 | fs/xiafs/bitmap.c | if (bh->b_count != 1) { |
bh | 278 | fs/xiafs/bitmap.c | clear_buf(bh); |
bh | 279 | fs/xiafs/bitmap.c | bh->b_uptodate = 1; |
bh | 280 | fs/xiafs/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 281 | fs/xiafs/bitmap.c | brelse(bh); |
bh | 287 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 300 | fs/xiafs/bitmap.c | bh = get_imap_zone(sb, ino, NULL); |
bh | 301 | fs/xiafs/bitmap.c | if (!bh) |
bh | 304 | fs/xiafs/bitmap.c | if (clear_bit(ino & (XIAFS_BITS_PER_Z(sb)-1), bh->b_data)) |
bh | 308 | fs/xiafs/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 346 | fs/xiafs/bitmap.c | static u_long count_zone(struct buffer_head * bh) |
bh | 352 | fs/xiafs/bitmap.c | for (i=bh->b_size; i-- > 0; ) { |
bh | 353 | fs/xiafs/bitmap.c | tmp=bh->b_data[i]; |
bh | 361 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 368 | fs/xiafs/bitmap.c | bh=get_imap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), ¬_que); |
bh | 369 | fs/xiafs/bitmap.c | if (bh) { |
bh | 370 | fs/xiafs/bitmap.c | sum += count_zone(bh); |
bh | 380 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 387 | fs/xiafs/bitmap.c | bh=get_zmap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), ¬_que); |
bh | 388 | fs/xiafs/bitmap.c | if (bh) { |
bh | 389 | 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 | 194 | fs/xiafs/file.c | struct buffer_head * bh; |
bh | 215 | fs/xiafs/file.c | bh = xiafs_getblk(inode, pos >> XIAFS_ZSIZE_BITS(inode->i_sb), 1); |
bh | 216 | fs/xiafs/file.c | if (!bh) { |
bh | 224 | fs/xiafs/file.c | if (c != XIAFS_ZSIZE(inode->i_sb) && !bh->b_uptodate) { |
bh | 225 | fs/xiafs/file.c | ll_rw_block(READ, 1, &bh); |
bh | 226 | fs/xiafs/file.c | wait_on_buffer(bh); |
bh | 227 | fs/xiafs/file.c | if (!bh->b_uptodate) { |
bh | 228 | fs/xiafs/file.c | brelse(bh); |
bh | 234 | fs/xiafs/file.c | cp = (pos & (XIAFS_ZSIZE(inode->i_sb)-1)) + bh->b_data; |
bh | 243 | fs/xiafs/file.c | bh->b_uptodate = 1; |
bh | 244 | fs/xiafs/file.c | mark_buffer_dirty(bh, 0); |
bh | 245 | fs/xiafs/file.c | brelse(bh); |
bh | 31 | fs/xiafs/fsync.c | struct buffer_head * bh; |
bh | 37 | fs/xiafs/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
bh | 38 | fs/xiafs/fsync.c | if (!bh) |
bh | 41 | fs/xiafs/fsync.c | brelse (bh); |
bh | 44 | fs/xiafs/fsync.c | if (wait && bh->b_req && !bh->b_uptodate) { |
bh | 45 | fs/xiafs/fsync.c | brelse(bh); |
bh | 48 | fs/xiafs/fsync.c | if (wait || !bh->b_uptodate || !bh->b_dirt) |
bh | 50 | fs/xiafs/fsync.c | brelse(bh); |
bh | 53 | fs/xiafs/fsync.c | ll_rw_block(WRITE, 1, &bh); |
bh | 54 | fs/xiafs/fsync.c | bh->b_count--; |
bh | 59 | fs/xiafs/fsync.c | struct buffer_head **bh, int wait) |
bh | 63 | fs/xiafs/fsync.c | *bh = NULL; |
bh | 70 | fs/xiafs/fsync.c | *bh = bread(inode->i_dev, tmp, blocksize); |
bh | 72 | fs/xiafs/fsync.c | brelse(*bh); |
bh | 73 | fs/xiafs/fsync.c | *bh = NULL; |
bh | 76 | fs/xiafs/fsync.c | if (!*bh) |
bh | 62 | fs/xiafs/inode.c | struct buffer_head *bh; |
bh | 71 | fs/xiafs/inode.c | if (!(bh = bread(dev, 0, BLOCK_SIZE))) { |
bh | 77 | fs/xiafs/inode.c | sp = (struct xiafs_super_block *) bh->b_data; |
bh | 82 | fs/xiafs/inode.c | brelse(bh); |
bh | 93 | fs/xiafs/inode.c | brelse(bh); |
bh | 95 | fs/xiafs/inode.c | bh = bread (dev, 0, s->s_blocksize); |
bh | 96 | fs/xiafs/inode.c | if(!bh) return NULL; |
bh | 97 | fs/xiafs/inode.c | sp = (struct xiafs_super_block *) (((char *)bh->b_data) + BLOCK_SIZE) ; |
bh | 107 | fs/xiafs/inode.c | brelse(bh); |
bh | 174 | fs/xiafs/inode.c | static int zone_bmap(struct buffer_head * bh, int nr) |
bh | 178 | fs/xiafs/inode.c | if (!bh) |
bh | 180 | fs/xiafs/inode.c | tmp = ((u_long *) bh->b_data)[nr]; |
bh | 181 | fs/xiafs/inode.c | brelse(bh); |
bh | 264 | fs/xiafs/inode.c | indt_getblk(struct inode * inode, struct buffer_head * bh, |
bh | 271 | fs/xiafs/inode.c | if (!bh) |
bh | 273 | fs/xiafs/inode.c | if (!bh->b_uptodate) { |
bh | 274 | fs/xiafs/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 275 | fs/xiafs/inode.c | wait_on_buffer(bh); |
bh | 276 | fs/xiafs/inode.c | if (!bh->b_uptodate) { |
bh | 277 | fs/xiafs/inode.c | brelse(bh); |
bh | 281 | fs/xiafs/inode.c | lp = nr + (u_long *) bh->b_data; |
bh | 284 | fs/xiafs/inode.c | result = getblk(bh->b_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 286 | fs/xiafs/inode.c | brelse(bh); |
bh | 293 | fs/xiafs/inode.c | brelse(bh); |
bh | 298 | fs/xiafs/inode.c | brelse(bh); |
bh | 301 | fs/xiafs/inode.c | result = getblk(bh->b_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 309 | fs/xiafs/inode.c | mark_buffer_dirty(bh, 1); |
bh | 310 | fs/xiafs/inode.c | brelse(bh); |
bh | 316 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 334 | fs/xiafs/inode.c | bh = dt_getblk(inode, &(inode->u.xiafs_i.i_ind_zone), create, prev_addr); |
bh | 335 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone, create, prev_addr); |
bh | 336 | fs/xiafs/inode.c | return bh; |
bh | 339 | fs/xiafs/inode.c | bh = dt_getblk(inode, &(inode->u.xiafs_i.i_dind_zone), create, prev_addr); |
bh | 340 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone>>XIAFS_ADDRS_PER_Z_BITS(inode->i_sb), |
bh | 342 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone&(XIAFS_ADDRS_PER_Z(inode->i_sb)-1), |
bh | 344 | fs/xiafs/inode.c | return bh; |
bh | 349 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 351 | fs/xiafs/inode.c | bh = xiafs_getblk(inode, zone, create); |
bh | 352 | fs/xiafs/inode.c | if (!bh || bh->b_uptodate) |
bh | 353 | fs/xiafs/inode.c | return bh; |
bh | 354 | fs/xiafs/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 355 | fs/xiafs/inode.c | wait_on_buffer(bh); |
bh | 356 | fs/xiafs/inode.c | if (bh->b_uptodate) |
bh | 357 | fs/xiafs/inode.c | return bh; |
bh | 358 | fs/xiafs/inode.c | brelse(bh); |
bh | 364 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 379 | fs/xiafs/inode.c | if (!(bh=bread(inode->i_dev, zone, XIAFS_ZSIZE(inode->i_sb)))) { |
bh | 383 | fs/xiafs/inode.c | raw_inode = ((struct xiafs_inode *) bh->b_data) + |
bh | 404 | fs/xiafs/inode.c | brelse(bh); |
bh | 421 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 441 | fs/xiafs/inode.c | if (!(bh=bread(inode->i_dev, zone, XIAFS_ZSIZE(inode->i_sb)))) { |
bh | 446 | fs/xiafs/inode.c | raw_inode = ((struct xiafs_inode *)bh->b_data) + |
bh | 469 | fs/xiafs/inode.c | mark_buffer_dirty(bh, 1); |
bh | 470 | fs/xiafs/inode.c | return bh; |
bh | 476 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 477 | fs/xiafs/inode.c | bh = xiafs_update_inode(inode); |
bh | 478 | fs/xiafs/inode.c | brelse (bh); |
bh | 484 | fs/xiafs/inode.c | struct buffer_head *bh; |
bh | 486 | fs/xiafs/inode.c | bh = xiafs_update_inode(inode); |
bh | 487 | fs/xiafs/inode.c | if (bh && bh->b_dirt) |
bh | 489 | fs/xiafs/inode.c | ll_rw_block(WRITE, 1, &bh); |
bh | 490 | fs/xiafs/inode.c | wait_on_buffer(bh); |
bh | 491 | fs/xiafs/inode.c | if (bh->b_req && !bh->b_uptodate) |
bh | 498 | fs/xiafs/inode.c | else if (!bh) |
bh | 500 | 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 | 224 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 228 | fs/xiafs/namei.c | return bh; |
bh | 232 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
bh | 234 | fs/xiafs/namei.c | brelse(bh); |
bh | 248 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 262 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 263 | fs/xiafs/namei.c | if (!bh) { |
bh | 271 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 272 | fs/xiafs/namei.c | brelse(bh); |
bh | 281 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 286 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
bh | 287 | fs/xiafs/namei.c | if (bh) { |
bh | 288 | fs/xiafs/namei.c | brelse(bh); |
bh | 319 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 320 | fs/xiafs/namei.c | if (!bh) { |
bh | 328 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 329 | fs/xiafs/namei.c | brelse(bh); |
bh | 338 | fs/xiafs/namei.c | struct buffer_head * bh, *dir_block; |
bh | 341 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
bh | 342 | fs/xiafs/namei.c | if (bh) { |
bh | 343 | fs/xiafs/namei.c | brelse(bh); |
bh | 384 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 385 | fs/xiafs/namei.c | if (!bh) { |
bh | 392 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 397 | fs/xiafs/namei.c | brelse(bh); |
bh | 407 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 417 | fs/xiafs/namei.c | bh = xiafs_bread(inode, i, 0); |
bh | 419 | fs/xiafs/namei.c | if (!bh) { |
bh | 423 | fs/xiafs/namei.c | de=(struct xiafs_direct *)bh->b_data; |
bh | 427 | fs/xiafs/namei.c | brelse(bh); |
bh | 430 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(12 + bh->b_data); |
bh | 433 | fs/xiafs/namei.c | brelse(bh); |
bh | 440 | fs/xiafs/namei.c | if (!bh) |
bh | 443 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
bh | 446 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(inode->i_sb) || |
bh | 450 | fs/xiafs/namei.c | brelse(bh); |
bh | 454 | fs/xiafs/namei.c | brelse(bh); |
bh | 459 | fs/xiafs/namei.c | brelse(bh); |
bh | 488 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 492 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
bh | 494 | fs/xiafs/namei.c | if (!bh) |
bh | 522 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 532 | fs/xiafs/namei.c | brelse(bh); |
bh | 540 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 546 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
bh | 547 | fs/xiafs/namei.c | if (!bh) |
bh | 556 | fs/xiafs/namei.c | brelse(bh); |
bh | 570 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 577 | fs/xiafs/namei.c | brelse(bh); |
bh | 588 | fs/xiafs/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 592 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len, &de, NULL); |
bh | 593 | fs/xiafs/namei.c | if (bh) { |
bh | 594 | fs/xiafs/namei.c | brelse(bh); |
bh | 619 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 620 | fs/xiafs/namei.c | if (!bh) { |
bh | 628 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 629 | fs/xiafs/namei.c | brelse(bh); |
bh | 639 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 651 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, NULL); |
bh | 652 | fs/xiafs/namei.c | if (bh) { |
bh | 653 | fs/xiafs/namei.c | brelse(bh); |
bh | 658 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 659 | fs/xiafs/namei.c | if (!bh) { |
bh | 665 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 666 | 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 | 41 | fs/xiafs/truncate.c | struct buffer_head * bh; |
bh | 52 | fs/xiafs/truncate.c | bh = getblk(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 54 | fs/xiafs/truncate.c | brelse(bh); |
bh | 57 | fs/xiafs/truncate.c | if ((bh && bh->b_count != 1) || tmp != *lp) |
bh | 65 | fs/xiafs/truncate.c | brelse(bh); |
bh | 75 | fs/xiafs/truncate.c | struct buffer_head * bh, * ind_bh; |
bh | 98 | fs/xiafs/truncate.c | bh = getblk(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 100 | fs/xiafs/truncate.c | brelse(bh); |
bh | 103 | fs/xiafs/truncate.c | if ((bh && bh->b_count != 1) || tmp != *indp) |
bh | 111 | fs/xiafs/truncate.c | brelse(bh); |
bh | 399 | include/linux/fs.h | extern inline void mark_buffer_clean(struct buffer_head * bh) |
bh | 401 | include/linux/fs.h | if(bh->b_dirt) { |
bh | 402 | include/linux/fs.h | bh->b_dirt = 0; |
bh | 403 | include/linux/fs.h | if(bh->b_list == BUF_DIRTY) refile_buffer(bh); |
bh | 407 | include/linux/fs.h | extern inline void mark_buffer_dirty(struct buffer_head * bh, int flag) |
bh | 409 | include/linux/fs.h | if(!bh->b_dirt) { |
bh | 410 | include/linux/fs.h | bh->b_dirt = 1; |
bh | 411 | include/linux/fs.h | set_writetime(bh, flag); |
bh | 412 | include/linux/fs.h | if(bh->b_list != BUF_DIRTY) refile_buffer(bh); |
bh | 441 | include/linux/fs.h | extern void ll_rw_block(int rw, int nr, struct buffer_head * bh[]); |
bh | 212 | 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,off_t *pos,struct buffer_head **bh, |
bh | 344 | include/linux/sysv_fs.h | struct buffer_head * bh; |
bh | 356 | include/linux/sysv_fs.h | struct buffer_head *bh; |
bh | 358 | include/linux/sysv_fs.h | if (!(bh = bread (dev, (block >> sb->sv_block_size_ratio_bits) + sb->sv_block_base, BLOCK_SIZE))) |
bh | 360 | include/linux/sysv_fs.h | *data = bh->b_data + ((block & sb->sv_block_size_ratio_1) << sb->sv_block_size_bits); |
bh | 361 | include/linux/sysv_fs.h | return bh; |
bh | 95 | kernel/irq.c | struct bh_struct *bh; |
bh | 97 | kernel/irq.c | bh = bh_base; |
bh | 99 | kernel/irq.c | for (mask = 1, left = ~0 ; left & active ; bh++,mask += mask,left += left) { |
bh | 103 | kernel/irq.c | fn = bh->routine; |
bh | 106 | kernel/irq.c | fn(bh->data); |
bh | 318 | mm/mmap.c | struct buffer_head * bh; |
bh | 328 | mm/mmap.c | if (!(bh = bread(inode->i_dev,bmap(inode,0),inode->i_sb->s_blocksize))) |
bh | 334 | mm/mmap.c | brelse(bh); |
bh | 639 | mm/swap.c | struct buffer_head * bh, *tmp; |
bh | 641 | mm/swap.c | bh = buffer_pages[MAP_NR(addr)]; |
bh | 642 | mm/swap.c | if(bh) |
bh | 643 | mm/swap.c | for(j = 0, tmp = bh; tmp && (!j || tmp != bh); |