tag | line | file | source code |
bh | 761 | drivers/block/aztcd.c | if (CURRENT->bh) { |
bh | 762 | drivers/block/aztcd.c | if (!CURRENT->bh->b_lock) |
bh | 265 | drivers/block/blk.h | if (CURRENT->bh) { \ |
bh | 266 | drivers/block/blk.h | if (!CURRENT->bh->b_lock) \ |
bh | 283 | drivers/block/blk.h | struct buffer_head * bh; |
bh | 295 | drivers/block/blk.h | if ((bh = req->bh) != NULL) { |
bh | 296 | drivers/block/blk.h | req->bh = bh->b_reqnext; |
bh | 297 | drivers/block/blk.h | bh->b_reqnext = NULL; |
bh | 298 | drivers/block/blk.h | bh->b_uptodate = uptodate; |
bh | 299 | drivers/block/blk.h | if (!uptodate) bh->b_req = 0; /* So no "Weird" errors */ |
bh | 300 | drivers/block/blk.h | unlock_buffer(bh); |
bh | 301 | drivers/block/blk.h | if ((bh = req->bh) != NULL) { |
bh | 302 | drivers/block/blk.h | req->current_nr_sectors = bh->b_size >> 9; |
bh | 307 | drivers/block/blk.h | req->buffer = bh->b_data; |
bh | 1412 | drivers/block/cdu31a.c | if (CURRENT->bh) |
bh | 1414 | drivers/block/cdu31a.c | if (!CURRENT->bh->b_lock) |
bh | 2052 | drivers/block/floppy.c | struct buffer_head *bh; |
bh | 2058 | drivers/block/floppy.c | bh = CURRENT->bh; |
bh | 2060 | drivers/block/floppy.c | if (bh){ |
bh | 2061 | drivers/block/floppy.c | bh = bh->b_reqnext; |
bh | 2062 | drivers/block/floppy.c | while ( bh && bh->b_data == base + size ){ |
bh | 2063 | drivers/block/floppy.c | size += bh->b_size; |
bh | 2064 | drivers/block/floppy.c | bh = bh->b_reqnext; |
bh | 2091 | drivers/block/floppy.c | struct buffer_head *bh; |
bh | 2126 | drivers/block/floppy.c | bh = CURRENT->bh; |
bh | 2161 | drivers/block/floppy.c | bh = bh->b_reqnext; |
bh | 2163 | drivers/block/floppy.c | if ( !bh){ |
bh | 2168 | drivers/block/floppy.c | size = bh->b_size; |
bh | 2169 | drivers/block/floppy.c | buffer = bh->b_data; |
bh | 2436 | drivers/block/floppy.c | if (CURRENT->bh && !CURRENT->bh->b_lock) |
bh | 2439 | drivers/block/floppy.c | if (!CURRENT->bh->b_count && |
bh | 3098 | drivers/block/floppy.c | struct buffer_head * bh; |
bh | 3122 | drivers/block/floppy.c | if (!(bh = getblk(dev,0,size))){ |
bh | 3126 | drivers/block/floppy.c | if ( bh && ! bh->b_uptodate) |
bh | 3127 | drivers/block/floppy.c | ll_rw_block(READ, 1, &bh); |
bh | 3129 | drivers/block/floppy.c | wait_on_buffer(bh); |
bh | 3130 | drivers/block/floppy.c | brelse(bh); |
bh | 51 | drivers/block/genhd.c | struct buffer_head *bh; |
bh | 62 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) |
bh | 68 | drivers/block/genhd.c | bh->b_dirt = 0; |
bh | 69 | drivers/block/genhd.c | bh->b_uptodate = 0; |
bh | 70 | drivers/block/genhd.c | bh->b_req = 0; |
bh | 71 | drivers/block/genhd.c | if (*(unsigned short *) (bh->b_data+510) == 0xAA55) { |
bh | 72 | drivers/block/genhd.c | p = (struct partition *) (0x1BE + bh->b_data); |
bh | 95 | drivers/block/genhd.c | brelse(bh); |
bh | 100 | drivers/block/genhd.c | brelse(bh); |
bh | 107 | drivers/block/genhd.c | struct buffer_head *bh; |
bh | 126 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) { |
bh | 132 | drivers/block/genhd.c | if (*(unsigned short *) (bh->b_data+510) == 0xAA55) { |
bh | 133 | drivers/block/genhd.c | p = (struct partition *) (0x1BE + bh->b_data); |
bh | 149 | drivers/block/genhd.c | if (*(unsigned short *) (bh->b_data+0xfc) == 0x55AA) { |
bh | 150 | drivers/block/genhd.c | p = (struct partition *) (0x1BE + bh->b_data); |
bh | 163 | drivers/block/genhd.c | brelse(bh); |
bh | 539 | drivers/block/hd.c | WCURRENT.bh = WCURRENT.bh->b_reqnext; |
bh | 540 | drivers/block/hd.c | if (WCURRENT.bh == NULL) |
bh | 542 | drivers/block/hd.c | WCURRENT.current_nr_sectors = WCURRENT.bh->b_size>>9; |
bh | 543 | drivers/block/hd.c | WCURRENT.buffer = WCURRENT.bh->b_data; |
bh | 607 | drivers/block/hd.c | if (!i || (CURRENT->bh && !SUBSECTOR(i))) |
bh | 159 | drivers/block/ide-cd.c | if (!uptodate && rq->bh != 0) |
bh | 471 | drivers/block/ide-cd.c | nskip = MIN ((int)(rq->current_nr_sectors - (rq->bh->b_size >> SECTOR_BITS)), |
bh | 577 | drivers/block/ide-cd.c | if (rq->current_nr_sectors < (rq->bh->b_size >> SECTOR_BITS) && |
bh | 620 | drivers/block/ide-cd.c | if (rq->current_nr_sectors != (rq->bh->b_size >> SECTOR_BITS)) |
bh | 683 | drivers/block/ide-cd.c | if (rq->buffer != rq->bh->b_data) |
bh | 685 | drivers/block/ide-cd.c | int n = (rq->buffer - rq->bh->b_data) / SECTOR_SIZE; |
bh | 686 | drivers/block/ide-cd.c | rq->buffer = rq->bh->b_data; |
bh | 692 | drivers/block/ide-cd.c | if (rq->current_nr_sectors > (rq->bh->b_size >> SECTOR_BITS)) |
bh | 693 | drivers/block/ide-cd.c | rq->current_nr_sectors = rq->bh->b_size; |
bh | 882 | drivers/block/ide-cd.c | req.bh = NULL; |
bh | 737 | drivers/block/ide.c | if ((rq->bh = rq->bh->b_reqnext) != NULL) { |
bh | 738 | drivers/block/ide.c | rq->current_nr_sectors = rq->bh->b_size>>9; |
bh | 739 | drivers/block/ide.c | rq->buffer = rq->bh->b_data; |
bh | 1065 | drivers/block/ide.c | if (rq->bh && !rq->bh->b_lock) { |
bh | 1360 | drivers/block/ide.c | rq.bh = NULL; |
bh | 198 | drivers/block/ll_rw_blk.c | if (req->bh) |
bh | 199 | drivers/block/ll_rw_blk.c | mark_buffer_clean(req->bh); |
bh | 222 | drivers/block/ll_rw_blk.c | static void make_request(int major,int rw, struct buffer_head * bh) |
bh | 232 | drivers/block/ll_rw_blk.c | if (bh->b_lock) |
bh | 243 | drivers/block/ll_rw_blk.c | count = bh->b_size >> 9; |
bh | 244 | drivers/block/ll_rw_blk.c | sector = bh->b_blocknr * count; |
bh | 246 | drivers/block/ll_rw_blk.c | if (blk_size[major][MINOR(bh->b_dev)] < (sector + count)>>1) { |
bh | 247 | drivers/block/ll_rw_blk.c | bh->b_dirt = bh->b_uptodate = 0; |
bh | 248 | drivers/block/ll_rw_blk.c | bh->b_req = 0; |
bh | 252 | drivers/block/ll_rw_blk.c | if (bh->b_lock) |
bh | 255 | drivers/block/ll_rw_blk.c | lock_buffer(bh); |
bh | 256 | drivers/block/ll_rw_blk.c | if ((rw == WRITE && !bh->b_dirt) || (rw == READ && bh->b_uptodate)) { |
bh | 257 | drivers/block/ll_rw_blk.c | unlock_buffer(bh); |
bh | 290 | drivers/block/ll_rw_blk.c | if (req->dev == bh->b_dev && |
bh | 296 | drivers/block/ll_rw_blk.c | req->bhtail->b_reqnext = bh; |
bh | 297 | drivers/block/ll_rw_blk.c | req->bhtail = bh; |
bh | 299 | drivers/block/ll_rw_blk.c | mark_buffer_clean(bh); |
bh | 304 | drivers/block/ll_rw_blk.c | if (req->dev == bh->b_dev && |
bh | 311 | drivers/block/ll_rw_blk.c | bh->b_reqnext = req->bh; |
bh | 312 | drivers/block/ll_rw_blk.c | req->buffer = bh->b_data; |
bh | 315 | drivers/block/ll_rw_blk.c | mark_buffer_clean(bh); |
bh | 316 | drivers/block/ll_rw_blk.c | req->bh = bh; |
bh | 326 | drivers/block/ll_rw_blk.c | req = get_request(max_req, bh->b_dev); |
bh | 332 | drivers/block/ll_rw_blk.c | unlock_buffer(bh); |
bh | 349 | drivers/block/ll_rw_blk.c | req->buffer = bh->b_data; |
bh | 351 | drivers/block/ll_rw_blk.c | req->bh = bh; |
bh | 352 | drivers/block/ll_rw_blk.c | req->bhtail = bh; |
bh | 384 | drivers/block/ll_rw_blk.c | req->bh = NULL; |
bh | 394 | drivers/block/ll_rw_blk.c | void ll_rw_block(int rw, int nr, struct buffer_head * bh[]) |
bh | 404 | drivers/block/ll_rw_blk.c | while (!*bh) { |
bh | 405 | drivers/block/ll_rw_blk.c | bh++; |
bh | 411 | drivers/block/ll_rw_blk.c | if ((major = MAJOR(bh[0]->b_dev)) < MAX_BLKDEV) |
bh | 416 | drivers/block/ll_rw_blk.c | (unsigned long) bh[0]->b_dev, bh[0]->b_blocknr); |
bh | 423 | drivers/block/ll_rw_blk.c | i = blksize_size[major][MINOR(bh[0]->b_dev)]; |
bh | 430 | drivers/block/ll_rw_blk.c | if (bh[i] && bh[i]->b_size != correct_size) { |
bh | 433 | drivers/block/ll_rw_blk.c | correct_size, bh[i]->b_size); |
bh | 438 | drivers/block/ll_rw_blk.c | if ((rw == WRITE || rw == WRITEA) && is_read_only(bh[0]->b_dev)) { |
bh | 439 | drivers/block/ll_rw_blk.c | printk("Can't write to read-only device 0x%X\n",bh[0]->b_dev); |
bh | 458 | drivers/block/ll_rw_blk.c | if (bh[i]) { |
bh | 459 | drivers/block/ll_rw_blk.c | bh[i]->b_req = 1; |
bh | 460 | drivers/block/ll_rw_blk.c | make_request(major, rw, bh[i]); |
bh | 477 | drivers/block/ll_rw_blk.c | if (bh[i]) |
bh | 478 | drivers/block/ll_rw_blk.c | bh[i]->b_dirt = bh[i]->b_uptodate = 0; |
bh | 519 | drivers/block/ll_rw_blk.c | req->bh = NULL; |
bh | 615 | drivers/block/mcd.c | if (CURRENT->bh) { |
bh | 616 | drivers/block/mcd.c | if (!CURRENT->bh->b_lock) |
bh | 102 | drivers/block/ramdisk.c | struct buffer_head *bh; |
bh | 129 | drivers/block/ramdisk.c | bh = breada(ROOT_DEV,block+1,BLOCK_SIZE, 0, PAGE_SIZE); |
bh | 130 | drivers/block/ramdisk.c | if (!bh) { |
bh | 137 | drivers/block/ramdisk.c | *((struct super_block *) bh->b_data); |
bh | 138 | drivers/block/ramdisk.c | brelse(bh); |
bh | 177 | drivers/block/ramdisk.c | bh = breada(ROOT_DEV, block, BLOCK_SIZE, 0, PAGE_SIZE); |
bh | 179 | drivers/block/ramdisk.c | bh = bread(ROOT_DEV, block, BLOCK_SIZE); |
bh | 180 | drivers/block/ramdisk.c | if (!bh) { |
bh | 185 | drivers/block/ramdisk.c | (void) memcpy(cp, bh->b_data, BLOCK_SIZE); |
bh | 186 | drivers/block/ramdisk.c | brelse(bh); |
bh | 692 | drivers/scsi/scsi.c | struct buffer_head * bh, *bhp; |
bh | 715 | drivers/scsi/scsi.c | bhp = bh = req->bh; |
bh | 716 | drivers/scsi/scsi.c | if(!tablesize) bh = NULL; |
bh | 719 | drivers/scsi/scsi.c | while(req->nr_sectors && bh){ |
bh | 721 | drivers/scsi/scsi.c | if(!bhp || !CONTIGUOUS_BUFFERS(bh,bhp)) tablesize--; |
bh | 722 | drivers/scsi/scsi.c | req->nr_sectors -= bh->b_size >> 9; |
bh | 723 | drivers/scsi/scsi.c | req->sector += bh->b_size >> 9; |
bh | 725 | drivers/scsi/scsi.c | bh = bhp; |
bh | 727 | drivers/scsi/scsi.c | if(req->nr_sectors && bh && bh->b_reqnext){ /* Any leftovers? */ |
bh | 728 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
bh | 729 | drivers/scsi/scsi.c | req->bh = bh->b_reqnext; /* Divide request */ |
bh | 730 | drivers/scsi/scsi.c | bh->b_reqnext = NULL; |
bh | 731 | drivers/scsi/scsi.c | bh = req->bh; |
bh | 735 | drivers/scsi/scsi.c | req->current_nr_sectors = bh->b_size >> 9; |
bh | 736 | drivers/scsi/scsi.c | req->buffer = bh->b_data; |
bh | 771 | drivers/scsi/scsi.c | struct buffer_head * bh, *bhp; |
bh | 820 | drivers/scsi/scsi.c | bhp = bh = req->bh; |
bh | 821 | drivers/scsi/scsi.c | if(!tablesize) bh = NULL; |
bh | 824 | drivers/scsi/scsi.c | while(req->nr_sectors && bh){ |
bh | 826 | drivers/scsi/scsi.c | if(!bhp || !CONTIGUOUS_BUFFERS(bh,bhp)) tablesize--; |
bh | 827 | drivers/scsi/scsi.c | req->nr_sectors -= bh->b_size >> 9; |
bh | 828 | drivers/scsi/scsi.c | req->sector += bh->b_size >> 9; |
bh | 830 | drivers/scsi/scsi.c | bh = bhp; |
bh | 832 | drivers/scsi/scsi.c | if(req->nr_sectors && bh && bh->b_reqnext){ /* Any leftovers? */ |
bh | 833 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
bh | 834 | drivers/scsi/scsi.c | req->bh = bh->b_reqnext; /* Divide request */ |
bh | 835 | drivers/scsi/scsi.c | bh->b_reqnext = NULL; |
bh | 836 | drivers/scsi/scsi.c | bh = req->bh; |
bh | 839 | drivers/scsi/scsi.c | req->current_nr_sectors = bh->b_size >> 9; |
bh | 840 | drivers/scsi/scsi.c | req->buffer = bh->b_data; |
bh | 536 | drivers/scsi/scsi.h | struct buffer_head * bh; |
bh | 546 | drivers/scsi/scsi.h | if ((bh = req->bh) != NULL) { |
bh | 547 | drivers/scsi/scsi.h | req->bh = bh->b_reqnext; |
bh | 548 | drivers/scsi/scsi.h | req->nr_sectors -= bh->b_size >> 9; |
bh | 549 | drivers/scsi/scsi.h | req->sector += bh->b_size >> 9; |
bh | 550 | drivers/scsi/scsi.h | bh->b_reqnext = NULL; |
bh | 551 | drivers/scsi/scsi.h | bh->b_uptodate = uptodate; |
bh | 552 | drivers/scsi/scsi.h | unlock_buffer(bh); |
bh | 553 | drivers/scsi/scsi.h | sectors -= bh->b_size >> 9; |
bh | 554 | drivers/scsi/scsi.h | if ((bh = req->bh) != NULL) { |
bh | 555 | drivers/scsi/scsi.h | req->current_nr_sectors = bh->b_size >> 9; |
bh | 562 | drivers/scsi/scsi.h | } while(sectors && bh); |
bh | 563 | drivers/scsi/scsi.h | if (req->bh){ |
bh | 564 | drivers/scsi/scsi.h | req->buffer = bh->b_data; |
bh | 599 | drivers/scsi/scsi.h | if (CURRENT->bh) { \ |
bh | 600 | 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 | 263 | drivers/scsi/scsi_debug.c | bh = SCpnt->request.bh; |
bh | 323 | drivers/scsi/scsi_debug.c | memcpy(buff+128, bh, sizeof(struct buffer_head)); |
bh | 326 | drivers/scsi/scsi_debug.c | bh = bh->b_reqnext; |
bh | 329 | drivers/scsi/scsi_debug.c | if(!bh) panic("Too few blocks for linked request."); |
bh | 341 | drivers/scsi/scsi_debug.c | if(bh) scsi_dump(SCpnt, 0); |
bh | 21 | drivers/scsi/scsicam.c | static int partsize(struct buffer_head *bh, unsigned long capacity, |
bh | 40 | drivers/scsi/scsicam.c | struct buffer_head *bh; |
bh | 44 | drivers/scsi/scsicam.c | if (!(bh = bread(dev & ~0xf,0,1024))) |
bh | 50 | drivers/scsi/scsicam.c | ret_code = partsize (bh, (unsigned long) size, (unsigned int *) ip + 2, |
bh | 52 | drivers/scsi/scsicam.c | brelse (bh); |
bh | 76 | drivers/scsi/scsicam.c | static int partsize(struct buffer_head *bh, unsigned long capacity, |
bh | 84 | drivers/scsi/scsicam.c | if (*(unsigned short *) (bh->b_data+510) == 0xAA55) { |
bh | 86 | drivers/scsi/scsicam.c | (0x1BE + bh->b_data), i = 0; i < 4; ++i, ++p) { |
bh | 238 | drivers/scsi/sd.c | if (!SCpnt->request.bh) |
bh | 431 | drivers/scsi/sd.c | struct buffer_head * bh, *bhp; |
bh | 522 | drivers/scsi/sd.c | if (contiguous && SCpnt->request.bh && |
bh | 523 | drivers/scsi/sd.c | ((long) SCpnt->request.bh->b_data) + (SCpnt->request.nr_sectors << 9) - 1 > |
bh | 525 | drivers/scsi/sd.c | if(((long) SCpnt->request.bh->b_data) > ISA_DMA_THRESHOLD) |
bh | 530 | drivers/scsi/sd.c | if(contiguous && SCpnt->request.bh && SCpnt->request.bh->b_reqnext) |
bh | 531 | drivers/scsi/sd.c | for(bh = SCpnt->request.bh, bhp = bh->b_reqnext; bhp; bh = bhp, |
bh | 533 | drivers/scsi/sd.c | if(!CONTIGUOUS_BUFFERS(bh,bhp)) { |
bh | 539 | drivers/scsi/sd.c | if (!SCpnt->request.bh || contiguous) { |
bh | 573 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
bh | 578 | drivers/scsi/sd.c | while(bh) { |
bh | 579 | drivers/scsi/sd.c | if ((this_count + (bh->b_size >> 9)) > this_count_max) break; |
bh | 580 | drivers/scsi/sd.c | if(!bhp || !CONTIGUOUS_BUFFERS(bhp,bh) || |
bh | 583 | drivers/scsi/sd.c | ((unsigned long) bh->b_data-1) == ISA_DMA_THRESHOLD)) { |
bh | 587 | drivers/scsi/sd.c | this_count += (bh->b_size >> 9); |
bh | 588 | drivers/scsi/sd.c | bhp = bh; |
bh | 589 | drivers/scsi/sd.c | bh = bh->b_reqnext; |
bh | 593 | drivers/scsi/sd.c | ((unsigned int) SCpnt->request.bh->b_data-1) == ISA_DMA_THRESHOLD) count--; |
bh | 612 | drivers/scsi/sd.c | for(count = 0, bh = SCpnt->request.bh, bhp = bh->b_reqnext; |
bh | 613 | drivers/scsi/sd.c | count < SCpnt->use_sg && bh; |
bh | 614 | drivers/scsi/sd.c | count++, bh = bhp) { |
bh | 616 | drivers/scsi/sd.c | bhp = bh->b_reqnext; |
bh | 618 | drivers/scsi/sd.c | if(!sgpnt[count].address) sgpnt[count].address = bh->b_data; |
bh | 619 | drivers/scsi/sd.c | sgpnt[count].length += bh->b_size; |
bh | 620 | drivers/scsi/sd.c | counted += bh->b_size >> 9; |
bh | 652 | drivers/scsi/sd.c | this_count = counted -= bh->b_size >> 9; |
bh | 662 | drivers/scsi/sd.c | if(bhp && CONTIGUOUS_BUFFERS(bh,bhp) && CLUSTERABLE_DEVICE(SCpnt)) { |
bh | 694 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
bh | 697 | drivers/scsi/sd.c | while(bh){ |
bh | 698 | drivers/scsi/sd.c | printk("[%p %lx] ", bh->b_data, bh->b_size); |
bh | 699 | drivers/scsi/sd.c | bh = bh->b_reqnext; |
bh | 146 | drivers/scsi/sr.c | printk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data); |
bh | 164 | drivers/scsi/sr.c | SCpnt->request.bh && |
bh | 165 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext && |
bh | 166 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext->b_size == 1024) { |
bh | 167 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.bh->b_reqnext->b_data, |
bh | 195 | drivers/scsi/sr.c | printk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, |
bh | 201 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
bh | 626 | drivers/scsi/sr.c | struct buffer_head * bh; |
bh | 629 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
bh | 637 | drivers/scsi/sr.c | while(bh && count < SCpnt->host->sg_tablesize) { |
bh | 638 | drivers/scsi/sr.c | if ((this_count + (bh->b_size >> 9)) > this_count_max) break; |
bh | 639 | drivers/scsi/sr.c | this_count += (bh->b_size >> 9); |
bh | 641 | drivers/scsi/sr.c | bh = bh->b_reqnext; |
bh | 667 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
bh | 676 | drivers/scsi/sr.c | for(bh = SCpnt->request.bh; count < SCpnt->use_sg; |
bh | 677 | drivers/scsi/sr.c | count++, bh = bh->b_reqnext) { |
bh | 678 | drivers/scsi/sr.c | if (bh) { /* Need a placeholder at the end of the record? */ |
bh | 679 | drivers/scsi/sr.c | sgpnt[count].address = bh->b_data; |
bh | 680 | drivers/scsi/sr.c | sgpnt[count].length = bh->b_size; |
bh | 734 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
bh | 737 | drivers/scsi/sr.c | this_count = (SCpnt->request.bh->b_size >> 9); |
bh | 35 | fs/block_dev.c | struct buffer_head * bh, *bufferlist[NBUF]; |
bh | 72 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
bh | 74 | fs/block_dev.c | bh = breada(dev,block,block+1,block+2,-1); |
bh | 80 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
bh | 82 | fs/block_dev.c | if (chars != blocksize && !bh->b_uptodate) { |
bh | 86 | fs/block_dev.c | brelse(bh); |
bh | 87 | fs/block_dev.c | bh = bread(dev,block,blocksize); |
bh | 96 | fs/block_dev.c | bhlist[0] = bh; |
bh | 110 | fs/block_dev.c | wait_on_buffer(bh); |
bh | 116 | fs/block_dev.c | if (!bh) |
bh | 118 | fs/block_dev.c | p = offset + bh->b_data; |
bh | 126 | fs/block_dev.c | bh->b_uptodate = 1; |
bh | 127 | fs/block_dev.c | mark_buffer_dirty(bh, 0); |
bh | 129 | fs/block_dev.c | bufferlist[buffercount++] = bh; |
bh | 131 | fs/block_dev.c | brelse(bh); |
bh | 110 | fs/buffer.c | void __wait_on_buffer(struct buffer_head * bh) |
bh | 114 | fs/buffer.c | bh->b_count++; |
bh | 115 | fs/buffer.c | add_wait_queue(&bh->b_wait, &wait); |
bh | 118 | fs/buffer.c | if (bh->b_lock) { |
bh | 122 | fs/buffer.c | remove_wait_queue(&bh->b_wait, &wait); |
bh | 123 | fs/buffer.c | bh->b_count--; |
bh | 141 | 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 | 177 | fs/buffer.c | if (wait && bh->b_req && !bh->b_lock && |
bh | 178 | fs/buffer.c | !bh->b_dirt && !bh->b_uptodate) { |
bh | 180 | 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 | 185 | fs/buffer.c | if (!bh->b_dirt || pass>=2) |
bh | 188 | fs/buffer.c | if (bh->b_lock) |
bh | 190 | fs/buffer.c | bh->b_count++; |
bh | 191 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 192 | fs/buffer.c | ll_rw_block(WRITE, 1, &bh); |
bh | 195 | fs/buffer.c | printk("[%d %x %ld] ", nlist, bh->b_dev, bh->b_blocknr); |
bh | 198 | fs/buffer.c | bh->b_count--; |
bh | 258 | fs/buffer.c | struct buffer_head * bh; |
bh | 261 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 262 | fs/buffer.c | for (i = nr_buffers_type[nlist]*2 ; --i > 0 ; bh = bh->b_next_free) { |
bh | 263 | fs/buffer.c | if (bh->b_dev != dev) |
bh | 265 | fs/buffer.c | wait_on_buffer(bh); |
bh | 266 | fs/buffer.c | if (bh->b_dev != dev) |
bh | 268 | fs/buffer.c | if (bh->b_count) |
bh | 270 | fs/buffer.c | bh->b_flushtime = bh->b_uptodate = |
bh | 271 | fs/buffer.c | bh->b_dirt = bh->b_req = 0; |
bh | 279 | fs/buffer.c | static inline void remove_from_hash_queue(struct buffer_head * bh) |
bh | 281 | fs/buffer.c | if (bh->b_next) |
bh | 282 | fs/buffer.c | bh->b_next->b_prev = bh->b_prev; |
bh | 283 | fs/buffer.c | if (bh->b_prev) |
bh | 284 | fs/buffer.c | bh->b_prev->b_next = bh->b_next; |
bh | 285 | fs/buffer.c | if (hash(bh->b_dev,bh->b_blocknr) == bh) |
bh | 286 | fs/buffer.c | hash(bh->b_dev,bh->b_blocknr) = bh->b_next; |
bh | 287 | fs/buffer.c | bh->b_next = bh->b_prev = NULL; |
bh | 290 | fs/buffer.c | static inline void remove_from_lru_list(struct buffer_head * bh) |
bh | 292 | fs/buffer.c | if (!(bh->b_prev_free) || !(bh->b_next_free)) |
bh | 294 | fs/buffer.c | if (bh->b_dev == 0xffff) panic("LRU list corrupted"); |
bh | 295 | fs/buffer.c | bh->b_prev_free->b_next_free = bh->b_next_free; |
bh | 296 | fs/buffer.c | bh->b_next_free->b_prev_free = bh->b_prev_free; |
bh | 298 | fs/buffer.c | if (lru_list[bh->b_list] == bh) |
bh | 299 | fs/buffer.c | lru_list[bh->b_list] = bh->b_next_free; |
bh | 300 | fs/buffer.c | if(lru_list[bh->b_list] == bh) |
bh | 301 | fs/buffer.c | lru_list[bh->b_list] = NULL; |
bh | 302 | fs/buffer.c | bh->b_next_free = bh->b_prev_free = NULL; |
bh | 305 | fs/buffer.c | static inline void remove_from_free_list(struct buffer_head * bh) |
bh | 307 | fs/buffer.c | int isize = BUFSIZE_INDEX(bh->b_size); |
bh | 308 | fs/buffer.c | if (!(bh->b_prev_free) || !(bh->b_next_free)) |
bh | 310 | fs/buffer.c | if(bh->b_dev != 0xffff) panic("Free list corrupted"); |
bh | 314 | fs/buffer.c | if(bh->b_next_free == bh) |
bh | 317 | fs/buffer.c | bh->b_prev_free->b_next_free = bh->b_next_free; |
bh | 318 | fs/buffer.c | bh->b_next_free->b_prev_free = bh->b_prev_free; |
bh | 319 | fs/buffer.c | if (free_list[isize] == bh) |
bh | 320 | fs/buffer.c | free_list[isize] = bh->b_next_free; |
bh | 322 | fs/buffer.c | bh->b_next_free = bh->b_prev_free = NULL; |
bh | 325 | fs/buffer.c | static inline void remove_from_queues(struct buffer_head * bh) |
bh | 327 | fs/buffer.c | if(bh->b_dev == 0xffff) { |
bh | 328 | fs/buffer.c | remove_from_free_list(bh); /* Free list entries should not be |
bh | 332 | fs/buffer.c | nr_buffers_type[bh->b_list]--; |
bh | 333 | fs/buffer.c | nr_buffers_st[BUFSIZE_INDEX(bh->b_size)][bh->b_list]--; |
bh | 334 | fs/buffer.c | remove_from_hash_queue(bh); |
bh | 335 | fs/buffer.c | remove_from_lru_list(bh); |
bh | 338 | fs/buffer.c | static inline void put_last_lru(struct buffer_head * bh) |
bh | 340 | fs/buffer.c | if (!bh) |
bh | 342 | fs/buffer.c | if (bh == lru_list[bh->b_list]) { |
bh | 343 | fs/buffer.c | lru_list[bh->b_list] = bh->b_next_free; |
bh | 346 | fs/buffer.c | if(bh->b_dev == 0xffff) panic("Wrong block for lru list"); |
bh | 347 | fs/buffer.c | remove_from_lru_list(bh); |
bh | 350 | fs/buffer.c | if(!lru_list[bh->b_list]) { |
bh | 351 | fs/buffer.c | lru_list[bh->b_list] = bh; |
bh | 352 | fs/buffer.c | lru_list[bh->b_list]->b_prev_free = bh; |
bh | 355 | fs/buffer.c | bh->b_next_free = lru_list[bh->b_list]; |
bh | 356 | fs/buffer.c | bh->b_prev_free = lru_list[bh->b_list]->b_prev_free; |
bh | 357 | fs/buffer.c | lru_list[bh->b_list]->b_prev_free->b_next_free = bh; |
bh | 358 | fs/buffer.c | lru_list[bh->b_list]->b_prev_free = bh; |
bh | 361 | fs/buffer.c | static inline void put_last_free(struct buffer_head * bh) |
bh | 364 | fs/buffer.c | if (!bh) |
bh | 367 | fs/buffer.c | isize = BUFSIZE_INDEX(bh->b_size); |
bh | 368 | fs/buffer.c | bh->b_dev = 0xffff; /* So it is obvious we are on the free list */ |
bh | 372 | fs/buffer.c | free_list[isize] = bh; |
bh | 373 | fs/buffer.c | bh->b_prev_free = bh; |
bh | 377 | fs/buffer.c | bh->b_next_free = free_list[isize]; |
bh | 378 | fs/buffer.c | bh->b_prev_free = free_list[isize]->b_prev_free; |
bh | 379 | fs/buffer.c | free_list[isize]->b_prev_free->b_next_free = bh; |
bh | 380 | fs/buffer.c | free_list[isize]->b_prev_free = bh; |
bh | 383 | fs/buffer.c | static inline void insert_into_queues(struct buffer_head * bh) |
bh | 387 | fs/buffer.c | if(bh->b_dev == 0xffff) { |
bh | 388 | fs/buffer.c | put_last_free(bh); |
bh | 391 | fs/buffer.c | if(!lru_list[bh->b_list]) { |
bh | 392 | fs/buffer.c | lru_list[bh->b_list] = bh; |
bh | 393 | fs/buffer.c | bh->b_prev_free = bh; |
bh | 395 | fs/buffer.c | if (bh->b_next_free) panic("VFS: buffer LRU pointers corrupted"); |
bh | 396 | fs/buffer.c | bh->b_next_free = lru_list[bh->b_list]; |
bh | 397 | fs/buffer.c | bh->b_prev_free = lru_list[bh->b_list]->b_prev_free; |
bh | 398 | fs/buffer.c | lru_list[bh->b_list]->b_prev_free->b_next_free = bh; |
bh | 399 | fs/buffer.c | lru_list[bh->b_list]->b_prev_free = bh; |
bh | 400 | fs/buffer.c | nr_buffers_type[bh->b_list]++; |
bh | 401 | fs/buffer.c | nr_buffers_st[BUFSIZE_INDEX(bh->b_size)][bh->b_list]++; |
bh | 403 | fs/buffer.c | bh->b_prev = NULL; |
bh | 404 | fs/buffer.c | bh->b_next = NULL; |
bh | 405 | fs/buffer.c | if (!bh->b_dev) |
bh | 407 | fs/buffer.c | bh->b_next = hash(bh->b_dev,bh->b_blocknr); |
bh | 408 | fs/buffer.c | hash(bh->b_dev,bh->b_blocknr) = bh; |
bh | 409 | fs/buffer.c | if (bh->b_next) |
bh | 410 | fs/buffer.c | bh->b_next->b_prev = bh; |
bh | 438 | fs/buffer.c | struct buffer_head * bh; |
bh | 441 | fs/buffer.c | if (!(bh=find_buffer(dev,block,size))) |
bh | 443 | fs/buffer.c | bh->b_count++; |
bh | 444 | fs/buffer.c | wait_on_buffer(bh); |
bh | 445 | fs/buffer.c | if (bh->b_dev == dev && bh->b_blocknr == block && bh->b_size == size) |
bh | 446 | fs/buffer.c | return bh; |
bh | 447 | fs/buffer.c | bh->b_count--; |
bh | 454 | fs/buffer.c | struct buffer_head * bh, *bhnext; |
bh | 477 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 478 | fs/buffer.c | for (i = nr_buffers_type[nlist]*2 ; --i > 0 ; bh = bhnext) { |
bh | 479 | fs/buffer.c | if(!bh) break; |
bh | 480 | fs/buffer.c | bhnext = bh->b_next_free; |
bh | 481 | fs/buffer.c | if (bh->b_dev != dev) |
bh | 483 | fs/buffer.c | if (bh->b_size == size) |
bh | 486 | fs/buffer.c | wait_on_buffer(bh); |
bh | 487 | fs/buffer.c | if (bh->b_dev == dev && bh->b_size != size) { |
bh | 488 | fs/buffer.c | bh->b_uptodate = bh->b_dirt = bh->b_req = |
bh | 489 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 491 | fs/buffer.c | remove_from_hash_queue(bh); |
bh | 496 | fs/buffer.c | #define BADNESS(bh) (((bh)->b_dirt<<1)+(bh)->b_lock) |
bh | 500 | fs/buffer.c | struct buffer_head * bh, * tmp; |
bh | 554 | fs/buffer.c | for (bh = lru_list[i]; buffers[i] > 0; bh = tmp, buffers[i]--) |
bh | 557 | fs/buffer.c | tmp = bh->b_next_free; |
bh | 558 | fs/buffer.c | if (!bh) break; |
bh | 560 | fs/buffer.c | if (mem_map[MAP_NR((unsigned long) bh->b_data)] != 1 || |
bh | 561 | fs/buffer.c | bh->b_dirt) { |
bh | 562 | fs/buffer.c | refile_buffer(bh); |
bh | 566 | fs/buffer.c | if (bh->b_count || bh->b_size != size) |
bh | 573 | fs/buffer.c | if(bh->b_lock && (i == BUF_LOCKED || i == BUF_LOCKED1)) { |
bh | 578 | fs/buffer.c | if (BADNESS(bh)) continue; |
bh | 582 | fs/buffer.c | else candidate[i] = bh; |
bh | 603 | fs/buffer.c | bh = candidate[i]; |
bh | 604 | fs/buffer.c | candidate[i] = bh->b_next_free; |
bh | 605 | fs/buffer.c | if(candidate[i] == bh) candidate[i] = NULL; /* Got last one */ |
bh | 606 | fs/buffer.c | if (bh->b_count || bh->b_size != size) |
bh | 608 | fs/buffer.c | if (mem_map[MAP_NR((unsigned long) bh->b_data)] != 1) |
bh | 610 | fs/buffer.c | if (BADNESS(bh)) panic("Buffer in candidate list with BADNESS != 0\n"); |
bh | 612 | fs/buffer.c | if(bh->b_dev == 0xffff) panic("Wrong list"); |
bh | 613 | fs/buffer.c | remove_from_queues(bh); |
bh | 614 | fs/buffer.c | bh->b_dev = 0xffff; |
bh | 615 | fs/buffer.c | put_last_free(bh); |
bh | 616 | fs/buffer.c | needed -= bh->b_size; |
bh | 626 | fs/buffer.c | for (bh = candidate[i]; buffers[i] > 0; bh = tmp, buffers[i]--) { |
bh | 628 | fs/buffer.c | tmp = bh->b_next_free; |
bh | 629 | fs/buffer.c | if (!bh) break; |
bh | 631 | fs/buffer.c | if (mem_map[MAP_NR((unsigned long) bh->b_data)] != 1 || |
bh | 632 | fs/buffer.c | bh->b_dirt) { |
bh | 633 | fs/buffer.c | refile_buffer(bh); |
bh | 637 | fs/buffer.c | if (bh->b_count || bh->b_size != size) |
bh | 644 | fs/buffer.c | if(bh->b_lock && (i == BUF_LOCKED || i == BUF_LOCKED1)) { |
bh | 649 | fs/buffer.c | if (BADNESS(bh)) continue; |
bh | 653 | fs/buffer.c | else candidate[i] = bh; |
bh | 691 | fs/buffer.c | struct buffer_head * bh; |
bh | 701 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
bh | 702 | fs/buffer.c | if (bh) { |
bh | 703 | fs/buffer.c | if (bh->b_uptodate && !bh->b_dirt) |
bh | 704 | fs/buffer.c | put_last_lru(bh); |
bh | 705 | fs/buffer.c | if(!bh->b_dirt) bh->b_flushtime = 0; |
bh | 706 | fs/buffer.c | return bh; |
bh | 714 | fs/buffer.c | bh = free_list[isize]; |
bh | 715 | fs/buffer.c | remove_from_free_list(bh); |
bh | 719 | fs/buffer.c | bh->b_count=1; |
bh | 720 | fs/buffer.c | bh->b_dirt=0; |
bh | 721 | fs/buffer.c | bh->b_lock=0; |
bh | 722 | fs/buffer.c | bh->b_uptodate=0; |
bh | 723 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 724 | fs/buffer.c | bh->b_req=0; |
bh | 725 | fs/buffer.c | bh->b_dev=dev; |
bh | 726 | fs/buffer.c | bh->b_blocknr=block; |
bh | 727 | fs/buffer.c | insert_into_queues(bh); |
bh | 728 | fs/buffer.c | return bh; |
bh | 802 | fs/buffer.c | struct buffer_head * bh; |
bh | 804 | fs/buffer.c | if (!(bh = getblk(dev, block, size))) { |
bh | 809 | fs/buffer.c | if (bh->b_uptodate) |
bh | 810 | fs/buffer.c | return bh; |
bh | 811 | fs/buffer.c | ll_rw_block(READ, 1, &bh); |
bh | 812 | fs/buffer.c | wait_on_buffer(bh); |
bh | 813 | fs/buffer.c | if (bh->b_uptodate) |
bh | 814 | fs/buffer.c | return bh; |
bh | 815 | fs/buffer.c | brelse(bh); |
bh | 832 | fs/buffer.c | struct buffer_head * bh; |
bh | 839 | fs/buffer.c | if (block < 0 || !(bh = getblk(dev,block,bufsize))) |
bh | 842 | fs/buffer.c | index = BUFSIZE_INDEX(bh->b_size); |
bh | 844 | fs/buffer.c | if (bh->b_uptodate) |
bh | 845 | fs/buffer.c | return bh; |
bh | 854 | fs/buffer.c | bhlist[0] = bh; |
bh | 857 | fs/buffer.c | bh = getblk(dev,block+i,bufsize); |
bh | 858 | fs/buffer.c | if (bh->b_uptodate) { |
bh | 859 | fs/buffer.c | brelse(bh); |
bh | 862 | fs/buffer.c | bhlist[j++] = bh; |
bh | 872 | fs/buffer.c | bh = bhlist[0]; |
bh | 873 | fs/buffer.c | wait_on_buffer(bh); |
bh | 874 | fs/buffer.c | if (bh->b_uptodate) |
bh | 875 | fs/buffer.c | return bh; |
bh | 876 | fs/buffer.c | brelse(bh); |
bh | 883 | fs/buffer.c | static void put_unused_buffer_head(struct buffer_head * bh) |
bh | 887 | fs/buffer.c | wait = ((volatile struct buffer_head *) bh)->b_wait; |
bh | 888 | fs/buffer.c | memset(bh,0,sizeof(*bh)); |
bh | 889 | fs/buffer.c | ((volatile struct buffer_head *) bh)->b_wait = wait; |
bh | 890 | fs/buffer.c | bh->b_next_free = unused_list; |
bh | 891 | fs/buffer.c | unused_list = bh; |
bh | 897 | fs/buffer.c | struct buffer_head * bh; |
bh | 902 | fs/buffer.c | if (!(bh = (struct buffer_head*) get_free_page(GFP_BUFFER))) |
bh | 905 | fs/buffer.c | for (nr_buffer_heads+=i=PAGE_SIZE/sizeof*bh ; i>0; i--) { |
bh | 906 | fs/buffer.c | bh->b_next_free = unused_list; /* only make link */ |
bh | 907 | fs/buffer.c | unused_list = bh++; |
bh | 913 | fs/buffer.c | struct buffer_head * bh; |
bh | 918 | fs/buffer.c | bh = unused_list; |
bh | 919 | fs/buffer.c | unused_list = bh->b_next_free; |
bh | 920 | fs/buffer.c | bh->b_next_free = NULL; |
bh | 921 | fs/buffer.c | bh->b_data = NULL; |
bh | 922 | fs/buffer.c | bh->b_size = 0; |
bh | 923 | fs/buffer.c | bh->b_req = 0; |
bh | 924 | fs/buffer.c | return bh; |
bh | 935 | fs/buffer.c | struct buffer_head *bh, *head; |
bh | 941 | fs/buffer.c | bh = get_unused_buffer_head(); |
bh | 942 | fs/buffer.c | if (!bh) |
bh | 944 | fs/buffer.c | bh->b_this_page = head; |
bh | 945 | fs/buffer.c | head = bh; |
bh | 946 | fs/buffer.c | bh->b_data = (char *) (page+offset); |
bh | 947 | fs/buffer.c | bh->b_size = size; |
bh | 948 | fs/buffer.c | bh->b_dev = 0xffff; /* Flag as unused */ |
bh | 955 | fs/buffer.c | bh = head; |
bh | 956 | fs/buffer.c | while (bh) { |
bh | 957 | fs/buffer.c | head = bh; |
bh | 958 | fs/buffer.c | bh = bh->b_this_page; |
bh | 964 | fs/buffer.c | static void read_buffers(struct buffer_head * bh[], int nrbuf) |
bh | 971 | fs/buffer.c | if (bh[i] && !bh[i]->b_uptodate) |
bh | 972 | fs/buffer.c | bhr[bhnum++] = bh[i]; |
bh | 977 | fs/buffer.c | if (bh[i]) { |
bh | 978 | fs/buffer.c | wait_on_buffer(bh[i]); |
bh | 991 | fs/buffer.c | static unsigned long try_to_align(struct buffer_head ** bh, int nrbuf, |
bh | 995 | fs/buffer.c | brelse(bh[nrbuf]); |
bh | 1002 | fs/buffer.c | struct buffer_head * bh[MAX_BUF_PER_PAGE]; |
bh | 1009 | fs/buffer.c | bh[0] = first; |
bh | 1021 | fs/buffer.c | bh[nrbuf++] = first; |
bh | 1026 | fs/buffer.c | return try_to_align(bh, nrbuf, address); |
bh | 1028 | fs/buffer.c | read_buffers(bh,nrbuf); /* make sure they are actually read correctly */ |
bh | 1030 | fs/buffer.c | brelse(bh[nrbuf]); |
bh | 1036 | fs/buffer.c | brelse(bh[nrbuf]); |
bh | 1043 | fs/buffer.c | struct buffer_head * bh, * tmp, * arr[MAX_BUF_PER_PAGE]; |
bh | 1049 | fs/buffer.c | bh = create_buffers(address, size); |
bh | 1050 | fs/buffer.c | if (!bh) |
bh | 1061 | fs/buffer.c | tmp = bh; |
bh | 1065 | fs/buffer.c | arr[block++] = bh; |
bh | 1066 | fs/buffer.c | bh->b_count = 1; |
bh | 1067 | fs/buffer.c | bh->b_dirt = 0; |
bh | 1068 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 1069 | fs/buffer.c | bh->b_uptodate = 0; |
bh | 1070 | fs/buffer.c | bh->b_req = 0; |
bh | 1071 | fs/buffer.c | bh->b_dev = dev; |
bh | 1072 | fs/buffer.c | bh->b_blocknr = *(p++); |
bh | 1073 | fs/buffer.c | bh->b_list = BUF_CLEAN; |
bh | 1076 | fs/buffer.c | insert_into_queues(bh); |
bh | 1077 | fs/buffer.c | if (bh->b_this_page) |
bh | 1078 | fs/buffer.c | bh = bh->b_this_page; |
bh | 1083 | fs/buffer.c | bh->b_this_page = tmp; |
bh | 1085 | fs/buffer.c | buffer_pages[MAP_NR(address)] = bh; |
bh | 1092 | fs/buffer.c | while ((tmp = bh) != NULL) { |
bh | 1093 | fs/buffer.c | bh = bh->b_this_page; |
bh | 1113 | fs/buffer.c | struct buffer_head * bh; |
bh | 1119 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
bh | 1120 | fs/buffer.c | if (bh) |
bh | 1121 | fs/buffer.c | return check_aligned(bh, address, dev, b, size); |
bh | 1134 | fs/buffer.c | struct buffer_head * bh[MAX_BUF_PER_PAGE]; |
bh | 1145 | fs/buffer.c | bh[i] = NULL; |
bh | 1147 | fs/buffer.c | bh[i] = getblk(dev, b[i], size); |
bh | 1149 | fs/buffer.c | read_buffers(bh,i); |
bh | 1152 | fs/buffer.c | if (bh[i]) { |
bh | 1153 | fs/buffer.c | if (bh[i]->b_uptodate) |
bh | 1154 | fs/buffer.c | memcpy((void *) where, bh[i]->b_data, size); |
bh | 1155 | fs/buffer.c | brelse(bh[i]); |
bh | 1168 | fs/buffer.c | struct buffer_head *bh, *tmp; |
bh | 1181 | fs/buffer.c | bh = create_buffers(page, size); |
bh | 1182 | fs/buffer.c | if (!bh) { |
bh | 1189 | fs/buffer.c | tmp = bh; |
bh | 1208 | fs/buffer.c | free_list[isize] = bh; |
bh | 1209 | fs/buffer.c | buffer_pages[MAP_NR(page)] = bh; |
bh | 1210 | fs/buffer.c | tmp->b_this_page = bh; |
bh | 1223 | fs/buffer.c | static int try_to_free(struct buffer_head * bh, struct buffer_head ** bhp) |
bh | 1227 | fs/buffer.c | int isize = BUFSIZE_INDEX(bh->b_size); |
bh | 1229 | fs/buffer.c | *bhp = bh; |
bh | 1230 | fs/buffer.c | page = (unsigned long) bh->b_data; |
bh | 1232 | fs/buffer.c | tmp = bh; |
bh | 1239 | fs/buffer.c | } while (tmp != bh); |
bh | 1240 | fs/buffer.c | tmp = bh; |
bh | 1254 | fs/buffer.c | } while (tmp != bh); |
bh | 1334 | fs/buffer.c | struct buffer_head *bh; |
bh | 1347 | fs/buffer.c | bh = free_list[isize]; |
bh | 1348 | fs/buffer.c | if(!bh) continue; |
bh | 1349 | fs/buffer.c | for (i=0 ; !i || bh != free_list[isize]; bh = bh->b_next_free, i++) { |
bh | 1350 | fs/buffer.c | if (bh->b_count || !bh->b_this_page) |
bh | 1352 | fs/buffer.c | if (try_to_free(bh, &bh)) |
bh | 1354 | fs/buffer.c | if(!bh) break; /* Some interrupt must have used it after we |
bh | 1364 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 1365 | fs/buffer.c | if(!bh) continue; |
bh | 1367 | fs/buffer.c | for ( ; i-- > 0 ; bh = bh->b_next_free) { |
bh | 1369 | fs/buffer.c | if(bh->b_list != nlist) goto repeat1; |
bh | 1370 | fs/buffer.c | if (bh->b_count || !bh->b_this_page) |
bh | 1372 | fs/buffer.c | if(size && bh->b_size != size) continue; |
bh | 1373 | fs/buffer.c | if (bh->b_lock) |
bh | 1377 | fs/buffer.c | wait_on_buffer(bh); |
bh | 1378 | fs/buffer.c | if (bh->b_dirt) { |
bh | 1379 | fs/buffer.c | bh->b_count++; |
bh | 1380 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 1381 | fs/buffer.c | ll_rw_block(WRITEA, 1, &bh); |
bh | 1382 | fs/buffer.c | bh->b_count--; |
bh | 1385 | fs/buffer.c | if (try_to_free(bh, &bh)) |
bh | 1387 | fs/buffer.c | if(!bh) break; |
bh | 1398 | fs/buffer.c | struct buffer_head * bh; |
bh | 1409 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 1410 | fs/buffer.c | if(!bh) continue; |
bh | 1413 | fs/buffer.c | if (bh->b_lock) |
bh | 1415 | fs/buffer.c | if (bh->b_dirt) |
bh | 1417 | fs/buffer.c | if(mem_map[MAP_NR(((unsigned long) bh->b_data))] !=1) shared++; |
bh | 1418 | fs/buffer.c | if (bh->b_count) |
bh | 1420 | fs/buffer.c | bh = bh->b_next_free; |
bh | 1421 | fs/buffer.c | } while (bh != lru_list[nlist]); |
bh | 1442 | fs/buffer.c | static inline int try_to_reassign(struct buffer_head * bh, struct buffer_head ** bhp, |
bh | 1448 | fs/buffer.c | *bhp = bh; |
bh | 1449 | fs/buffer.c | page = (unsigned long) bh->b_data; |
bh | 1452 | fs/buffer.c | tmp = bh; |
bh | 1460 | fs/buffer.c | } while (tmp != bh); |
bh | 1461 | fs/buffer.c | tmp = bh; |
bh | 1467 | fs/buffer.c | bh = tmp; |
bh | 1477 | fs/buffer.c | } while (tmp != bh); |
bh | 1498 | fs/buffer.c | struct buffer_head *bh; |
bh | 1508 | fs/buffer.c | bh = free_list[isize]; |
bh | 1509 | fs/buffer.c | if(bh) |
bh | 1510 | fs/buffer.c | for (i=0 ; !i || bh != free_list[isize] ; bh = bh->b_next_free, i++) { |
bh | 1511 | fs/buffer.c | if (!bh->b_this_page) continue; |
bh | 1512 | fs/buffer.c | if (try_to_reassign(bh, &bh, dev, starting_block)) |
bh | 1524 | fs/buffer.c | struct buffer_head * bh, * tmp, * arr[MAX_BUF_PER_PAGE]; |
bh | 1533 | fs/buffer.c | bh = create_buffers(page, size); |
bh | 1534 | fs/buffer.c | if (!bh) { |
bh | 1543 | fs/buffer.c | tmp = bh; |
bh | 1546 | fs/buffer.c | arr[nblock++] = bh; |
bh | 1547 | fs/buffer.c | bh->b_count = 1; |
bh | 1548 | fs/buffer.c | bh->b_dirt = 0; |
bh | 1549 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 1550 | fs/buffer.c | bh->b_lock = 0; |
bh | 1551 | fs/buffer.c | bh->b_uptodate = 0; |
bh | 1552 | fs/buffer.c | bh->b_req = 0; |
bh | 1553 | fs/buffer.c | bh->b_dev = dev; |
bh | 1554 | fs/buffer.c | bh->b_list = BUF_CLEAN; |
bh | 1555 | fs/buffer.c | bh->b_blocknr = block++; |
bh | 1558 | fs/buffer.c | insert_into_queues(bh); |
bh | 1559 | fs/buffer.c | if (bh->b_this_page) |
bh | 1560 | fs/buffer.c | bh = bh->b_this_page; |
bh | 1565 | fs/buffer.c | buffer_pages[MAP_NR(page)] = bh; |
bh | 1566 | fs/buffer.c | bh->b_this_page = tmp; |
bh | 1571 | fs/buffer.c | while ((tmp = bh) != NULL) { |
bh | 1572 | fs/buffer.c | bh = bh->b_this_page; |
bh | 1689 | fs/buffer.c | struct buffer_head * bh, *next; |
bh | 1704 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 1705 | fs/buffer.c | if(bh) |
bh | 1706 | fs/buffer.c | for (i = nr_buffers_type[nlist]; i-- > 0; bh = next) { |
bh | 1708 | fs/buffer.c | if(bh->b_list != nlist) goto repeat; |
bh | 1709 | fs/buffer.c | next = bh->b_next_free; |
bh | 1716 | fs/buffer.c | if (nlist == BUF_DIRTY && !bh->b_dirt && !bh->b_lock) |
bh | 1718 | fs/buffer.c | refile_buffer(bh); |
bh | 1722 | fs/buffer.c | if (bh->b_lock || !bh->b_dirt) |
bh | 1725 | fs/buffer.c | if(bh->b_flushtime > jiffies) continue; |
bh | 1727 | fs/buffer.c | bh->b_count++; |
bh | 1728 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 1732 | fs/buffer.c | ll_rw_block(WRITE, 1, &bh); |
bh | 1733 | fs/buffer.c | bh->b_count--; |
bh | 1764 | fs/buffer.c | struct buffer_head * bh, *next; |
bh | 1810 | fs/buffer.c | bh = lru_list[nlist]; |
bh | 1811 | fs/buffer.c | if(bh) |
bh | 1813 | fs/buffer.c | bh = next) { |
bh | 1815 | fs/buffer.c | if(bh->b_list != nlist) goto repeat; |
bh | 1816 | fs/buffer.c | next = bh->b_next_free; |
bh | 1823 | fs/buffer.c | if (nlist == BUF_DIRTY && !bh->b_dirt && !bh->b_lock) |
bh | 1825 | fs/buffer.c | refile_buffer(bh); |
bh | 1829 | fs/buffer.c | if (bh->b_lock || !bh->b_dirt) |
bh | 1833 | fs/buffer.c | bh->b_count++; |
bh | 1835 | fs/buffer.c | bh->b_flushtime = 0; |
bh | 1836 | fs/buffer.c | ll_rw_block(WRITE, 1, &bh); |
bh | 1840 | fs/buffer.c | bh->b_count--; |
bh | 74 | fs/ext/dir.c | struct buffer_head * bh; |
bh | 84 | fs/ext/dir.c | bh = ext_bread(inode,(filp->f_pos)>>BLOCK_SIZE_BITS,0); |
bh | 85 | fs/ext/dir.c | if (!bh) { |
bh | 90 | fs/ext/dir.c | de = (struct ext_dir_entry *) (bh->b_data + i); |
bh | 96 | fs/ext/dir.c | de = (struct ext_dir_entry *) (offset + bh->b_data); |
bh | 128 | 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 | 42 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 55 | fs/ext/freelists.c | bh = get_hash_table(sb->s_dev, block, sb->s_blocksize); |
bh | 56 | fs/ext/freelists.c | if (bh) |
bh | 57 | fs/ext/freelists.c | bh->b_dirt=0; |
bh | 58 | fs/ext/freelists.c | brelse(bh); |
bh | 86 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 125 | fs/ext/freelists.c | if (!(bh=getblk(sb->s_dev, j, sb->s_blocksize))) { |
bh | 129 | fs/ext/freelists.c | memset(bh->b_data, 0, BLOCK_SIZE); |
bh | 130 | fs/ext/freelists.c | bh->b_uptodate = 1; |
bh | 131 | fs/ext/freelists.c | mark_buffer_dirty(bh, 1); |
bh | 132 | fs/ext/freelists.c | brelse(bh); |
bh | 143 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 155 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
bh | 159 | fs/ext/freelists.c | efb = (struct ext_free_block *) bh->b_data; |
bh | 162 | fs/ext/freelists.c | brelse (bh); |
bh | 177 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 222 | fs/ext/freelists.c | if (!(bh = bread(dev, block, sb->s_blocksize))) |
bh | 224 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) bh->b_data) + |
bh | 229 | fs/ext/freelists.c | sb->u.ext_sb.s_firstfreeinodeblock = bh; |
bh | 303 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 322 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
bh | 326 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) bh->b_data) + |
bh | 330 | 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 | 84 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 97 | fs/ext/namei.c | bh = ext_bread(dir,0,0); |
bh | 98 | fs/ext/namei.c | if (!bh) |
bh | 105 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 107 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data) { |
bh | 108 | fs/ext/namei.c | brelse(bh); |
bh | 109 | fs/ext/namei.c | bh = NULL; |
bh | 110 | fs/ext/namei.c | bh = ext_bread(dir,offset>>BLOCK_SIZE_BITS,0); |
bh | 111 | fs/ext/namei.c | if (!bh) |
bh | 113 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 119 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
bh | 123 | fs/ext/namei.c | de = (struct ext_dir_entry *) (bh->b_data+BLOCK_SIZE); |
bh | 133 | fs/ext/namei.c | ((char *)de) + de->rec_len < BLOCK_SIZE+bh->b_data) |
bh | 138 | fs/ext/namei.c | return bh; |
bh | 145 | fs/ext/namei.c | brelse(bh); |
bh | 154 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 163 | fs/ext/namei.c | if (!(bh = ext_find_entry(dir,name,len,&de,NULL,NULL))) { |
bh | 168 | fs/ext/namei.c | brelse(bh); |
bh | 193 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 208 | fs/ext/namei.c | bh = ext_bread(dir,0,0); |
bh | 209 | fs/ext/namei.c | if (!bh) |
bh | 213 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 215 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data && offset < dir->i_size) { |
bh | 219 | fs/ext/namei.c | brelse(bh); |
bh | 220 | fs/ext/namei.c | bh = NULL; |
bh | 221 | fs/ext/namei.c | bh = ext_bread(dir,offset>>BLOCK_SIZE_BITS,0); |
bh | 222 | fs/ext/namei.c | if (!bh) |
bh | 224 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 244 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 246 | fs/ext/namei.c | brelse (bh); |
bh | 247 | fs/ext/namei.c | bh = NULL; |
bh | 251 | fs/ext/namei.c | bh = ext_bread(dir,offset>>BLOCK_SIZE_BITS,1); |
bh | 252 | fs/ext/namei.c | if (!bh) |
bh | 254 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 267 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
bh | 271 | fs/ext/namei.c | brelse (bh); |
bh | 292 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 294 | fs/ext/namei.c | return bh; |
bh | 299 | fs/ext/namei.c | brelse(bh); |
bh | 307 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 321 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 322 | fs/ext/namei.c | if (!bh) { |
bh | 330 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 331 | fs/ext/namei.c | brelse(bh); |
bh | 340 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 345 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 346 | fs/ext/namei.c | if (bh) { |
bh | 347 | fs/ext/namei.c | brelse(bh); |
bh | 380 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 381 | fs/ext/namei.c | if (!bh) { |
bh | 389 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 390 | fs/ext/namei.c | brelse(bh); |
bh | 399 | fs/ext/namei.c | struct buffer_head * bh, *dir_block; |
bh | 402 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 403 | fs/ext/namei.c | if (bh) { |
bh | 404 | fs/ext/namei.c | brelse(bh); |
bh | 447 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 448 | fs/ext/namei.c | if (!bh) { |
bh | 455 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 460 | fs/ext/namei.c | brelse(bh); |
bh | 470 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 473 | fs/ext/namei.c | if (inode->i_size < 2 * 12 || !(bh = ext_bread(inode,0,0))) { |
bh | 477 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 487 | fs/ext/namei.c | if ((void *) de >= (void *) (bh->b_data+BLOCK_SIZE)) { |
bh | 488 | fs/ext/namei.c | brelse(bh); |
bh | 489 | fs/ext/namei.c | bh = ext_bread(inode, offset >> BLOCK_SIZE_BITS,1); |
bh | 490 | fs/ext/namei.c | if (!bh) { |
bh | 494 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 501 | fs/ext/namei.c | brelse (bh); |
bh | 505 | fs/ext/namei.c | brelse(bh); |
bh | 511 | fs/ext/namei.c | brelse(bh); |
bh | 528 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 532 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
bh | 534 | fs/ext/namei.c | if (!bh) |
bh | 564 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 574 | fs/ext/namei.c | brelse(bh); |
bh | 582 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 587 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
bh | 588 | fs/ext/namei.c | if (!bh) |
bh | 607 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 615 | fs/ext/namei.c | brelse(bh); |
bh | 625 | fs/ext/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 651 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 652 | fs/ext/namei.c | if (bh) { |
bh | 656 | fs/ext/namei.c | brelse(bh); |
bh | 660 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 661 | fs/ext/namei.c | if (!bh) { |
bh | 669 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 670 | fs/ext/namei.c | brelse(bh); |
bh | 679 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 691 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 692 | fs/ext/namei.c | if (bh) { |
bh | 693 | fs/ext/namei.c | brelse(bh); |
bh | 698 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 699 | fs/ext/namei.c | if (!bh) { |
bh | 705 | fs/ext/namei.c | mark_buffer_dirty(bh, 1); |
bh | 706 | 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 | 39 | fs/ext2/balloc.c | struct buffer_head ** bh) |
bh | 60 | fs/ext2/balloc.c | if (bh) |
bh | 61 | fs/ext2/balloc.c | *bh = sb->u.ext2_sb.s_group_desc[group_desc]; |
bh | 70 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 73 | fs/ext2/balloc.c | bh = bread (sb->s_dev, gdp->bg_block_bitmap, sb->s_blocksize); |
bh | 74 | fs/ext2/balloc.c | if (!bh) |
bh | 80 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[bitmap_nr] = bh; |
bh | 170 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 205 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 221 | fs/ext2/balloc.c | if (!clear_bit (bit + i, bh->b_data)) |
bh | 234 | fs/ext2/balloc.c | mark_buffer_dirty(bh, 1); |
bh | 236 | fs/ext2/balloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 237 | fs/ext2/balloc.c | wait_on_buffer (bh); |
bh | 255 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 298 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 302 | fs/ext2/balloc.c | if (!test_bit(j, bh->b_data)) { |
bh | 314 | fs/ext2/balloc.c | lmap = ((((unsigned long *) bh->b_data)[j >> 5]) >> |
bh | 317 | fs/ext2/balloc.c | lmap |= (((unsigned long *) bh->b_data)[(j >> 5) + 1]) << |
bh | 341 | fs/ext2/balloc.c | p = ((char *) bh->b_data) + (j >> 3); |
bh | 343 | fs/ext2/balloc.c | k = (r - ((char *) bh->b_data)) << 3; |
bh | 348 | fs/ext2/balloc.c | k = find_next_zero_bit ((unsigned long *) bh->b_data, |
bh | 376 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 377 | fs/ext2/balloc.c | r = memscan(bh->b_data, 0, EXT2_BLOCKS_PER_GROUP(sb) >> 3); |
bh | 378 | fs/ext2/balloc.c | j = (r - bh->b_data) << 3; |
bh | 382 | fs/ext2/balloc.c | j = find_first_zero_bit ((unsigned long *) bh->b_data, |
bh | 397 | fs/ext2/balloc.c | for (k = 0; k < 7 && j > 0 && !test_bit (j - 1, bh->b_data); k++, j--); |
bh | 413 | fs/ext2/balloc.c | if (set_bit (j, bh->b_data)) { |
bh | 430 | fs/ext2/balloc.c | if (set_bit (j + k, bh->b_data)) |
bh | 443 | fs/ext2/balloc.c | mark_buffer_dirty(bh, 1); |
bh | 445 | fs/ext2/balloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 446 | fs/ext2/balloc.c | wait_on_buffer (bh); |
bh | 456 | fs/ext2/balloc.c | if (!(bh = getblk (sb->s_dev, j, sb->s_blocksize))) { |
bh | 461 | fs/ext2/balloc.c | memset(bh->b_data, 0, sb->s_blocksize); |
bh | 462 | fs/ext2/balloc.c | bh->b_uptodate = 1; |
bh | 463 | fs/ext2/balloc.c | mark_buffer_dirty(bh, 1); |
bh | 464 | fs/ext2/balloc.c | brelse (bh); |
bh | 521 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 540 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 542 | fs/ext2/balloc.c | if (!test_bit (0, bh->b_data)) |
bh | 547 | fs/ext2/balloc.c | if (!test_bit (j + 1, bh->b_data)) |
bh | 552 | fs/ext2/balloc.c | if (!block_in_use (gdp->bg_block_bitmap, sb, bh->b_data)) |
bh | 557 | fs/ext2/balloc.c | if (!block_in_use (gdp->bg_inode_bitmap, sb, bh->b_data)) |
bh | 563 | fs/ext2/balloc.c | if (!block_in_use (gdp->bg_inode_table + j, sb, bh->b_data)) |
bh | 568 | fs/ext2/balloc.c | x = ext2_count_free (bh, sb->s_blocksize); |
bh | 75 | fs/ext2/dir.c | struct ext2_dir_entry * de, struct buffer_head * bh, |
bh | 86 | fs/ext2/dir.c | else if (dir && ((char *) de - bh->b_data) + de->rec_len > |
bh | 105 | fs/ext2/dir.c | struct buffer_head * bh, * tmp, * bha[16]; |
bh | 115 | fs/ext2/dir.c | bh = NULL; |
bh | 120 | fs/ext2/dir.c | bh = ext2_bread (inode, blk, 0, &err); |
bh | 121 | fs/ext2/dir.c | if (!bh) { |
bh | 153 | fs/ext2/dir.c | (bh->b_data + i); |
bh | 172 | fs/ext2/dir.c | de = (struct ext2_dir_entry *) (bh->b_data + offset); |
bh | 174 | fs/ext2/dir.c | bh, offset)) { |
bh | 179 | fs/ext2/dir.c | brelse (bh); |
bh | 220 | fs/ext2/dir.c | brelse (bh); |
bh | 237 | fs/ext2/file.c | struct buffer_head * bh, *bufferlist[NBUF]; |
bh | 281 | fs/ext2/file.c | bh = ext2_getblk (inode, pos2 / sb->s_blocksize, 1, &err); |
bh | 282 | fs/ext2/file.c | if (!bh) { |
bh | 290 | fs/ext2/file.c | if (c != sb->s_blocksize && !bh->b_uptodate) { |
bh | 291 | fs/ext2/file.c | ll_rw_block (READ, 1, &bh); |
bh | 292 | fs/ext2/file.c | wait_on_buffer (bh); |
bh | 293 | fs/ext2/file.c | if (!bh->b_uptodate) { |
bh | 294 | fs/ext2/file.c | brelse (bh); |
bh | 300 | fs/ext2/file.c | p = (pos2 % sb->s_blocksize) + bh->b_data; |
bh | 306 | fs/ext2/file.c | bh->b_uptodate = 1; |
bh | 307 | fs/ext2/file.c | mark_buffer_dirty(bh, 0); |
bh | 309 | fs/ext2/file.c | bufferlist[buffercount++] = bh; |
bh | 311 | 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 | 38 | fs/ext2/ialloc.c | struct buffer_head ** bh) |
bh | 59 | fs/ext2/ialloc.c | if (bh) |
bh | 60 | fs/ext2/ialloc.c | *bh = sb->u.ext2_sb.s_group_desc[group_desc]; |
bh | 69 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 72 | fs/ext2/ialloc.c | bh = bread (sb->s_dev, gdp->bg_inode_bitmap, sb->s_blocksize); |
bh | 73 | fs/ext2/ialloc.c | if (!bh) |
bh | 79 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[bitmap_nr] = bh; |
bh | 162 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 168 | fs/ext2/ialloc.c | bh = bread (inode->i_sb->s_dev, inode_block, inode->i_sb->s_blocksize); |
bh | 169 | fs/ext2/ialloc.c | if (!bh) |
bh | 174 | fs/ext2/ialloc.c | raw_inode = ((struct ext2_inode *) bh->b_data) + |
bh | 180 | fs/ext2/ialloc.c | mark_buffer_dirty(bh, 1); |
bh | 182 | fs/ext2/ialloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 183 | fs/ext2/ialloc.c | wait_on_buffer (bh); |
bh | 185 | fs/ext2/ialloc.c | brelse (bh); |
bh | 191 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 235 | fs/ext2/ialloc.c | bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; |
bh | 236 | fs/ext2/ialloc.c | if (!clear_bit (bit, bh->b_data)) |
bh | 249 | fs/ext2/ialloc.c | mark_buffer_dirty(bh, 1); |
bh | 251 | fs/ext2/ialloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 252 | fs/ext2/ialloc.c | wait_on_buffer (bh); |
bh | 270 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 276 | fs/ext2/ialloc.c | bh = bread (inode->i_sb->s_dev, inode_block, inode->i_sb->s_blocksize); |
bh | 277 | fs/ext2/ialloc.c | if (!bh) { |
bh | 285 | fs/ext2/ialloc.c | raw_inode = ((struct ext2_inode *) bh->b_data) + |
bh | 291 | fs/ext2/ialloc.c | mark_buffer_dirty(bh, 1); |
bh | 292 | fs/ext2/ialloc.c | brelse (bh); |
bh | 308 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 407 | fs/ext2/ialloc.c | bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; |
bh | 408 | fs/ext2/ialloc.c | if ((j = find_first_zero_bit ((unsigned long *) bh->b_data, |
bh | 411 | fs/ext2/ialloc.c | if (set_bit (j, bh->b_data)) { |
bh | 416 | fs/ext2/ialloc.c | mark_buffer_dirty(bh, 1); |
bh | 418 | fs/ext2/ialloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 419 | fs/ext2/ialloc.c | wait_on_buffer (bh); |
bh | 43 | fs/ext2/inode.c | static int block_bmap (struct buffer_head * bh, int nr) |
bh | 47 | fs/ext2/inode.c | if (!bh) |
bh | 49 | fs/ext2/inode.c | tmp = ((unsigned long *) bh->b_data)[nr]; |
bh | 50 | fs/ext2/inode.c | brelse (bh); |
bh | 80 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 97 | fs/ext2/inode.c | if (!(bh = getblk (inode->i_sb->s_dev, result, |
bh | 103 | fs/ext2/inode.c | memset(bh->b_data, 0, inode->i_sb->s_blocksize); |
bh | 104 | fs/ext2/inode.c | bh->b_uptodate = 1; |
bh | 105 | fs/ext2/inode.c | mark_buffer_dirty(bh, 1); |
bh | 106 | fs/ext2/inode.c | brelse (bh); |
bh | 248 | fs/ext2/inode.c | struct buffer_head * bh, int nr, |
bh | 257 | fs/ext2/inode.c | if (!bh) |
bh | 259 | fs/ext2/inode.c | if (!bh->b_uptodate) { |
bh | 260 | fs/ext2/inode.c | ll_rw_block (READ, 1, &bh); |
bh | 261 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 262 | fs/ext2/inode.c | if (!bh->b_uptodate) { |
bh | 263 | fs/ext2/inode.c | brelse (bh); |
bh | 267 | fs/ext2/inode.c | p = (unsigned long *) bh->b_data + nr; |
bh | 271 | fs/ext2/inode.c | result = getblk (bh->b_dev, tmp, blocksize); |
bh | 273 | fs/ext2/inode.c | brelse (bh); |
bh | 282 | fs/ext2/inode.c | brelse (bh); |
bh | 290 | fs/ext2/inode.c | if (((unsigned long *) bh->b_data)[tmp]) { |
bh | 291 | fs/ext2/inode.c | goal = ((unsigned long *)bh->b_data)[tmp]; |
bh | 296 | fs/ext2/inode.c | goal = bh->b_blocknr; |
bh | 300 | fs/ext2/inode.c | brelse (bh); |
bh | 303 | fs/ext2/inode.c | result = getblk (bh->b_dev, tmp, blocksize); |
bh | 310 | fs/ext2/inode.c | mark_buffer_dirty(bh, 1); |
bh | 312 | fs/ext2/inode.c | ll_rw_block (WRITE, 1, &bh); |
bh | 313 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 320 | fs/ext2/inode.c | brelse (bh); |
bh | 324 | fs/ext2/inode.c | static int block_getcluster (struct inode * inode, struct buffer_head * bh, |
bh | 335 | fs/ext2/inode.c | if(!bh) return 0; |
bh | 341 | fs/ext2/inode.c | p = (unsigned long *) bh->b_data + nr + i; |
bh | 351 | fs/ext2/inode.c | p = (unsigned long *) bh->b_data + nr; |
bh | 352 | fs/ext2/inode.c | result = generate_cluster(bh->b_dev, (int *) p, blocksize); |
bh | 355 | fs/ext2/inode.c | brelse(bh); |
bh | 362 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 398 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_IND_BLOCK, create, b, err); |
bh | 399 | fs/ext2/inode.c | return block_getblk (inode, bh, block, create, |
bh | 404 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_DIND_BLOCK, create, b, err); |
bh | 405 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block / addr_per_block, create, |
bh | 407 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), |
bh | 411 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_TIND_BLOCK, create, b, err); |
bh | 412 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block/(addr_per_block * addr_per_block), |
bh | 414 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block/addr_per_block) & (addr_per_block - 1), |
bh | 416 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), create, |
bh | 422 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 447 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_IND_BLOCK, create, b, &err); |
bh | 448 | fs/ext2/inode.c | return block_getcluster (inode, bh, block, |
bh | 453 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_DIND_BLOCK, create, b, &err); |
bh | 454 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block / addr_per_block, create, |
bh | 456 | fs/ext2/inode.c | return block_getcluster (inode, bh, block & (addr_per_block - 1), |
bh | 460 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_TIND_BLOCK, create, b, &err); |
bh | 461 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block/(addr_per_block * addr_per_block), |
bh | 463 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block/addr_per_block) & (addr_per_block - 1), |
bh | 465 | fs/ext2/inode.c | return block_getcluster (inode, bh, block & (addr_per_block - 1), |
bh | 472 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 474 | fs/ext2/inode.c | bh = ext2_getblk (inode, block, create, err); |
bh | 475 | fs/ext2/inode.c | if (!bh || bh->b_uptodate) |
bh | 476 | fs/ext2/inode.c | return bh; |
bh | 477 | fs/ext2/inode.c | ll_rw_block (READ, 1, &bh); |
bh | 478 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 479 | fs/ext2/inode.c | if (bh->b_uptodate) |
bh | 480 | fs/ext2/inode.c | return bh; |
bh | 481 | fs/ext2/inode.c | brelse (bh); |
bh | 488 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 509 | fs/ext2/inode.c | bh = inode->i_sb->u.ext2_sb.s_group_desc[group_desc]; |
bh | 510 | fs/ext2/inode.c | if (!bh) |
bh | 513 | fs/ext2/inode.c | gdp = (struct ext2_group_desc *) bh->b_data; |
bh | 517 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
bh | 521 | fs/ext2/inode.c | raw_inode = ((struct ext2_inode *) bh->b_data) + |
bh | 553 | fs/ext2/inode.c | brelse (bh); |
bh | 580 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 600 | fs/ext2/inode.c | bh = inode->i_sb->u.ext2_sb.s_group_desc[group_desc]; |
bh | 601 | fs/ext2/inode.c | if (!bh) |
bh | 604 | fs/ext2/inode.c | gdp = (struct ext2_group_desc *) bh->b_data; |
bh | 608 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
bh | 612 | fs/ext2/inode.c | raw_inode = ((struct ext2_inode *)bh->b_data) + |
bh | 635 | fs/ext2/inode.c | mark_buffer_dirty(bh, 1); |
bh | 637 | fs/ext2/inode.c | return bh; |
bh | 642 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 643 | fs/ext2/inode.c | bh = ext2_update_inode (inode); |
bh | 644 | fs/ext2/inode.c | brelse (bh); |
bh | 650 | fs/ext2/inode.c | struct buffer_head *bh; |
bh | 652 | fs/ext2/inode.c | bh = ext2_update_inode (inode); |
bh | 653 | fs/ext2/inode.c | if (bh && bh->b_dirt) |
bh | 655 | fs/ext2/inode.c | ll_rw_block (WRITE, 1, &bh); |
bh | 656 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 657 | fs/ext2/inode.c | if (bh->b_req && !bh->b_uptodate) |
bh | 664 | fs/ext2/inode.c | else if (!bh) |
bh | 666 | fs/ext2/inode.c | brelse (bh); |
bh | 93 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 97 | fs/ext2/namei.c | bh = ext2_getblk (dir, block, 0, &err); |
bh | 98 | fs/ext2/namei.c | bh_use[block] = bh; |
bh | 99 | fs/ext2/namei.c | if (bh && !bh->b_uptodate) |
bh | 100 | fs/ext2/namei.c | bh_read[toread++] = bh; |
bh | 106 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 114 | fs/ext2/namei.c | bh = bh_use[block % NAMEI_RA_SIZE]; |
bh | 115 | fs/ext2/namei.c | if (!bh) |
bh | 118 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 119 | fs/ext2/namei.c | if (!bh->b_uptodate) { |
bh | 126 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 127 | fs/ext2/namei.c | dlimit = bh->b_data + sb->s_blocksize; |
bh | 130 | fs/ext2/namei.c | de, bh, offset)) |
bh | 134 | fs/ext2/namei.c | if (bh_use[i] != bh) |
bh | 138 | fs/ext2/namei.c | return bh; |
bh | 145 | fs/ext2/namei.c | brelse (bh); |
bh | 148 | fs/ext2/namei.c | bh = NULL; |
bh | 150 | fs/ext2/namei.c | bh = ext2_getblk (dir, block + NAMEI_RA_SIZE, 0, &err); |
bh | 151 | fs/ext2/namei.c | bh_use[block++ % NAMEI_RA_SIZE] = bh; |
bh | 152 | fs/ext2/namei.c | if (bh && !bh->b_uptodate) |
bh | 153 | fs/ext2/namei.c | bh_read[toread++] = bh; |
bh | 167 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 189 | fs/ext2/namei.c | if (!(bh = ext2_find_entry (dir, name, len, &de))) { |
bh | 197 | fs/ext2/namei.c | brelse (bh); |
bh | 223 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 249 | fs/ext2/namei.c | bh = ext2_bread (dir, 0, 0, err); |
bh | 250 | fs/ext2/namei.c | if (!bh) |
bh | 254 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 257 | fs/ext2/namei.c | if ((char *)de >= sb->s_blocksize + bh->b_data) { |
bh | 258 | fs/ext2/namei.c | brelse (bh); |
bh | 259 | fs/ext2/namei.c | bh = NULL; |
bh | 260 | fs/ext2/namei.c | bh = ext2_bread (dir, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, err); |
bh | 261 | fs/ext2/namei.c | if (!bh) |
bh | 271 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 280 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 283 | fs/ext2/namei.c | if (!ext2_check_dir_entry ("ext2_add_entry", dir, de, bh, |
bh | 286 | fs/ext2/namei.c | brelse (bh); |
bh | 291 | fs/ext2/namei.c | brelse (bh); |
bh | 322 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 325 | fs/ext2/namei.c | return bh; |
bh | 330 | fs/ext2/namei.c | brelse (bh); |
bh | 339 | fs/ext2/namei.c | struct buffer_head * bh) |
bh | 346 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 347 | fs/ext2/namei.c | while (i < bh->b_size) { |
bh | 349 | fs/ext2/namei.c | de, bh, i)) |
bh | 368 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 383 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 384 | fs/ext2/namei.c | if (!bh) { |
bh | 394 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 396 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 397 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 399 | fs/ext2/namei.c | brelse (bh); |
bh | 409 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 415 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 416 | fs/ext2/namei.c | if (bh) { |
bh | 417 | fs/ext2/namei.c | brelse (bh); |
bh | 447 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 448 | fs/ext2/namei.c | if (!bh) { |
bh | 458 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 460 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 461 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 463 | fs/ext2/namei.c | brelse (bh); |
bh | 472 | fs/ext2/namei.c | struct buffer_head * bh, * dir_block; |
bh | 478 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 479 | fs/ext2/namei.c | if (bh) { |
bh | 480 | fs/ext2/namei.c | brelse (bh); |
bh | 521 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 522 | fs/ext2/namei.c | if (!bh) { |
bh | 532 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 534 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 535 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 541 | fs/ext2/namei.c | brelse (bh); |
bh | 551 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 558 | fs/ext2/namei.c | !(bh = ext2_bread (inode, 0, 0, &err))) { |
bh | 563 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 574 | fs/ext2/namei.c | if ((void *) de >= (void *) (bh->b_data + sb->s_blocksize)) { |
bh | 575 | fs/ext2/namei.c | brelse (bh); |
bh | 576 | fs/ext2/namei.c | bh = ext2_bread (inode, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, &err); |
bh | 577 | fs/ext2/namei.c | if (!bh) { |
bh | 581 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 583 | fs/ext2/namei.c | if (!ext2_check_dir_entry ("empty_dir", inode, de, bh, |
bh | 585 | fs/ext2/namei.c | brelse (bh); |
bh | 589 | fs/ext2/namei.c | brelse (bh); |
bh | 595 | fs/ext2/namei.c | brelse (bh); |
bh | 603 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 610 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 612 | fs/ext2/namei.c | if (!bh) |
bh | 621 | fs/ext2/namei.c | brelse(bh); |
bh | 652 | fs/ext2/namei.c | retval = ext2_delete_entry (de, bh); |
bh | 658 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 660 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 661 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 676 | fs/ext2/namei.c | brelse (bh); |
bh | 684 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 692 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 693 | fs/ext2/namei.c | if (!bh) |
bh | 704 | fs/ext2/namei.c | brelse(bh); |
bh | 719 | fs/ext2/namei.c | retval = ext2_delete_entry (de, bh); |
bh | 723 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 725 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 726 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 735 | fs/ext2/namei.c | brelse (bh); |
bh | 746 | fs/ext2/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 790 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 791 | fs/ext2/namei.c | if (bh) { |
bh | 795 | fs/ext2/namei.c | brelse (bh); |
bh | 799 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 800 | fs/ext2/namei.c | if (!bh) { |
bh | 810 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 812 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 813 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 815 | fs/ext2/namei.c | brelse (bh); |
bh | 825 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 843 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 844 | fs/ext2/namei.c | if (bh) { |
bh | 845 | fs/ext2/namei.c | brelse (bh); |
bh | 850 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 851 | fs/ext2/namei.c | if (!bh) { |
bh | 859 | fs/ext2/namei.c | mark_buffer_dirty(bh, 1); |
bh | 861 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 862 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 864 | 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 | 394 | fs/ext2/super.c | struct buffer_head * bh; |
bh | 416 | fs/ext2/super.c | if (!(bh = bread (dev, sb_block, BLOCK_SIZE))) { |
bh | 426 | fs/ext2/super.c | es = (struct ext2_super_block *) bh->b_data; |
bh | 436 | fs/ext2/super.c | brelse (bh); |
bh | 449 | fs/ext2/super.c | brelse (bh); |
bh | 453 | fs/ext2/super.c | bh = bread (dev, logic_sb_block, sb->s_blocksize); |
bh | 454 | fs/ext2/super.c | if(!bh) |
bh | 456 | fs/ext2/super.c | es = (struct ext2_super_block *) (((char *)bh->b_data) + offset); |
bh | 461 | fs/ext2/super.c | brelse (bh); |
bh | 482 | fs/ext2/super.c | sb->u.ext2_sb.s_sbh = bh; |
bh | 503 | fs/ext2/super.c | brelse (bh); |
bh | 513 | fs/ext2/super.c | brelse (bh); |
bh | 517 | fs/ext2/super.c | if (!convert_pre_02b_fs (sb, bh)) { |
bh | 520 | fs/ext2/super.c | brelse (bh); |
bh | 531 | fs/ext2/super.c | brelse (bh); |
bh | 537 | fs/ext2/super.c | if (sb->s_blocksize != bh->b_size) { |
bh | 540 | fs/ext2/super.c | brelse (bh); |
bh | 550 | fs/ext2/super.c | brelse (bh); |
bh | 566 | fs/ext2/super.c | brelse (bh); |
bh | 580 | fs/ext2/super.c | brelse (bh); |
bh | 592 | fs/ext2/super.c | brelse (bh); |
bh | 618 | fs/ext2/super.c | brelse (bh); |
bh | 55 | fs/ext2/symlink.c | struct buffer_head * bh = NULL; |
bh | 78 | fs/ext2/symlink.c | if (!(bh = ext2_bread (inode, 0, 0, &error))) { |
bh | 83 | fs/ext2/symlink.c | link = bh->b_data; |
bh | 90 | fs/ext2/symlink.c | if (bh) |
bh | 91 | fs/ext2/symlink.c | brelse (bh); |
bh | 97 | fs/ext2/symlink.c | struct buffer_head * bh = NULL; |
bh | 109 | fs/ext2/symlink.c | bh = ext2_bread (inode, 0, 0, &err); |
bh | 110 | fs/ext2/symlink.c | if (!bh) { |
bh | 114 | fs/ext2/symlink.c | link = bh->b_data; |
bh | 124 | fs/ext2/symlink.c | if (bh) |
bh | 125 | fs/ext2/symlink.c | brelse (bh); |
bh | 50 | fs/ext2/truncate.c | struct buffer_head * bh; |
bh | 66 | fs/ext2/truncate.c | bh = getblk (inode->i_dev, tmp, |
bh | 69 | fs/ext2/truncate.c | bh = get_hash_table (inode->i_dev, tmp, |
bh | 72 | fs/ext2/truncate.c | brelse (bh); |
bh | 75 | fs/ext2/truncate.c | if ((bh && bh->b_count != 1) || tmp != *p) { |
bh | 77 | fs/ext2/truncate.c | brelse (bh); |
bh | 84 | fs/ext2/truncate.c | memset(bh->b_data, RANDOM_INT, inode->i_sb->s_blocksize); |
bh | 85 | fs/ext2/truncate.c | mark_buffer_dirty(bh, 1); |
bh | 87 | fs/ext2/truncate.c | brelse (bh); |
bh | 108 | fs/ext2/truncate.c | struct buffer_head * bh; |
bh | 142 | fs/ext2/truncate.c | bh = getblk (inode->i_dev, tmp, |
bh | 145 | fs/ext2/truncate.c | bh = get_hash_table (inode->i_dev, tmp, |
bh | 148 | fs/ext2/truncate.c | brelse (bh); |
bh | 151 | fs/ext2/truncate.c | if ((bh && bh->b_count != 1) || tmp != *ind) { |
bh | 153 | fs/ext2/truncate.c | brelse (bh); |
bh | 159 | fs/ext2/truncate.c | memset(bh->b_data, RANDOM_INT, inode->i_sb->s_blocksize); |
bh | 160 | fs/ext2/truncate.c | mark_buffer_dirty(bh, 1); |
bh | 162 | fs/ext2/truncate.c | brelse (bh); |
bh | 229 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh[4]; |
bh | 871 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh; |
bh | 903 | fs/hpfs/hpfs_fs.c | block = map_sector(inode->i_dev, hpfs_bmap(inode, q), &bh); |
bh | 931 | fs/hpfs/hpfs_fs.c | brelse(bh); |
bh | 1002 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh; |
bh | 1018 | fs/hpfs/hpfs_fs.c | fnode = map_fnode(inode->i_dev, inode->i_ino, &bh); |
bh | 1022 | fs/hpfs/hpfs_fs.c | file_secno, &bh); |
bh | 1023 | fs/hpfs/hpfs_fs.c | brelse(bh); |
bh | 1570 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh; |
bh | 1574 | fs/hpfs/hpfs_fs.c | fnode = map_fnode(dev, ino, &bh); |
bh | 1579 | fs/hpfs/hpfs_fs.c | brelse(bh); |
bh | 1652 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh; |
bh | 1654 | fs/hpfs/hpfs_fs.c | if ((*bhp = bh = bread(dev, secno, 512)) != 0) |
bh | 1655 | fs/hpfs/hpfs_fs.c | return bh->b_data; |
bh | 1667 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh; |
bh | 1679 | fs/hpfs/hpfs_fs.c | qbh->bh[0] = bh = breada(dev, secno, 512, 0, UINT_MAX); |
bh | 1680 | fs/hpfs/hpfs_fs.c | if (!bh) |
bh | 1682 | fs/hpfs/hpfs_fs.c | memcpy(data, bh->b_data, 512); |
bh | 1684 | fs/hpfs/hpfs_fs.c | qbh->bh[1] = bh = bread(dev, secno + 1, 512); |
bh | 1685 | fs/hpfs/hpfs_fs.c | if (!bh) |
bh | 1687 | fs/hpfs/hpfs_fs.c | memcpy(data + 512, bh->b_data, 512); |
bh | 1689 | fs/hpfs/hpfs_fs.c | qbh->bh[2] = bh = bread(dev, secno + 2, 512); |
bh | 1690 | fs/hpfs/hpfs_fs.c | if (!bh) |
bh | 1692 | fs/hpfs/hpfs_fs.c | memcpy(data + 2 * 512, bh->b_data, 512); |
bh | 1694 | fs/hpfs/hpfs_fs.c | qbh->bh[3] = bh = bread(dev, secno + 3, 512); |
bh | 1695 | fs/hpfs/hpfs_fs.c | if (!bh) |
bh | 1697 | fs/hpfs/hpfs_fs.c | memcpy(data + 3 * 512, bh->b_data, 512); |
bh | 1702 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[2]); |
bh | 1704 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[1]); |
bh | 1706 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[0]); |
bh | 1718 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[3]); |
bh | 1719 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[2]); |
bh | 1720 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[1]); |
bh | 1721 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[0]); |
bh | 75 | fs/isofs/dir.c | struct buffer_head * bh; |
bh | 92 | fs/isofs/dir.c | if(!(bh = breada(inode->i_dev, block, bufsize, filp->f_pos, inode->i_size))) |
bh | 100 | fs/isofs/dir.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
bh | 108 | fs/isofs/dir.c | brelse(bh); |
bh | 114 | fs/isofs/dir.c | || !(bh = breada(inode->i_dev, block, bufsize, filp->f_pos, |
bh | 134 | fs/isofs/dir.c | memcpy(cpnt, bh->b_data + old_offset, frag1); |
bh | 136 | fs/isofs/dir.c | brelse(bh); |
bh | 140 | fs/isofs/dir.c | || !(bh = breada(inode->i_dev, block, bufsize, |
bh | 145 | fs/isofs/dir.c | memcpy((char *)cpnt+frag1, bh->b_data, offset); |
bh | 248 | fs/isofs/dir.c | brelse(bh); |
bh | 257 | fs/isofs/dir.c | brelse(bh); |
bh | 102 | fs/isofs/file.c | struct buffer_head * bh; |
bh | 106 | fs/isofs/file.c | if (block && (bh = bread(inode->i_dev,block, ISOFS_BUFFER_SIZE(inode)))) { |
bh | 107 | fs/isofs/file.c | pnt = (unsigned char *) bh->b_data; |
bh | 118 | fs/isofs/file.c | brelse(bh); |
bh | 188 | fs/isofs/inode.c | struct buffer_head *bh=NULL; |
bh | 243 | fs/isofs/inode.c | if (!(bh = bread(dev, iso_blknum << (ISOFS_BLOCK_BITS-blocksize_bits), opt.blocksize))) { |
bh | 252 | fs/isofs/inode.c | vdp = (struct iso_volume_descriptor *)bh->b_data; |
bh | 253 | fs/isofs/inode.c | hdp = (struct hs_volume_descriptor *)bh->b_data; |
bh | 279 | fs/isofs/inode.c | brelse(bh); |
bh | 338 | fs/isofs/inode.c | brelse(bh); |
bh | 379 | fs/isofs/inode.c | brelse(bh); |
bh | 412 | fs/isofs/inode.c | struct buffer_head * bh; |
bh | 421 | fs/isofs/inode.c | if (!(bh=bread(inode->i_dev,block, bufsize))) { |
bh | 426 | fs/isofs/inode.c | pnt = ((unsigned char *) bh->b_data |
bh | 439 | fs/isofs/inode.c | brelse(bh); |
bh | 442 | fs/isofs/inode.c | memcpy(cpnt, bh->b_data + offset, frag1); |
bh | 443 | fs/isofs/inode.c | brelse(bh); |
bh | 444 | fs/isofs/inode.c | if (!(bh = bread(inode->i_dev,++block, bufsize))) { |
bh | 450 | fs/isofs/inode.c | memcpy((char *)cpnt+frag1, bh->b_data, offset); |
bh | 552 | fs/isofs/inode.c | brelse(bh); |
bh | 628 | fs/isofs/inode.c | struct buffer_head * bh; |
bh | 633 | fs/isofs/inode.c | if (!(bh = bread(parent->i_dev, block, bufsize))) return -1; |
bh | 636 | fs/isofs/inode.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
bh | 639 | fs/isofs/inode.c | brelse(bh); |
bh | 649 | fs/isofs/inode.c | brelse(bh); |
bh | 657 | fs/isofs/inode.c | brelse(bh); |
bh | 670 | fs/isofs/inode.c | if (!block || !(bh = bread(parent->i_dev,block, bufsize))) |
bh | 675 | fs/isofs/inode.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
bh | 684 | fs/isofs/inode.c | brelse(bh); |
bh | 692 | fs/isofs/inode.c | || !(bh = bread(parent->i_dev,block, bufsize))) |
bh | 710 | fs/isofs/inode.c | memcpy(cpnt, bh->b_data + old_offset, frag1); |
bh | 712 | fs/isofs/inode.c | brelse(bh); |
bh | 717 | fs/isofs/inode.c | if(!(bh = bread(parent->i_dev,block,bufsize))) { |
bh | 721 | fs/isofs/inode.c | memcpy((char *)cpnt+frag1, bh->b_data, offset); |
bh | 743 | fs/isofs/inode.c | brelse(bh); |
bh | 773 | fs/isofs/inode.c | void leak_check_brelse(struct buffer_head * bh){ |
bh | 775 | fs/isofs/inode.c | return brelse(bh); |
bh | 71 | 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 | 123 | fs/isofs/namei.c | memcpy(cpnt, bh->b_data + old_offset, frag1); |
bh | 126 | fs/isofs/namei.c | brelse(bh); |
bh | 129 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,bufsize))) { |
bh | 133 | fs/isofs/namei.c | memcpy((char *)cpnt+frag1, bh->b_data, offset); |
bh | 213 | fs/isofs/namei.c | return bh; |
bh | 219 | fs/isofs/namei.c | brelse(bh); |
bh | 227 | fs/isofs/namei.c | struct buffer_head * bh; |
bh | 246 | fs/isofs/namei.c | if (!(bh = isofs_find_entry(dir,name,len, &ino, &ino_back))) { |
bh | 252 | fs/isofs/namei.c | brelse(bh); |
bh | 60 | fs/isofs/rock.c | struct buffer_head * bh; \ |
bh | 71 | fs/isofs/rock.c | bh = bread(DEV->i_dev, block++, ISOFS_BUFFER_SIZE(DEV)); \ |
bh | 72 | fs/isofs/rock.c | if(!bh) {printk("Unable to read continuation Rock Ridge record\n"); \ |
bh | 75 | fs/isofs/rock.c | memcpy(buffer, bh->b_data + offset, 1024 - offset); \ |
bh | 76 | fs/isofs/rock.c | brelse(bh); \ |
bh | 82 | fs/isofs/rock.c | bh = bread(DEV->i_dev, block, ISOFS_BUFFER_SIZE(DEV)); \ |
bh | 83 | fs/isofs/rock.c | if(bh){ \ |
bh | 84 | fs/isofs/rock.c | memcpy(buffer + offset1, bh->b_data + offset, cont_size - offset1); \ |
bh | 85 | fs/isofs/rock.c | brelse(bh); \ |
bh | 398 | fs/isofs/rock.c | struct buffer_head * bh; |
bh | 417 | fs/isofs/rock.c | if (!(bh=bread(inode->i_dev,block, bufsize))) { |
bh | 422 | fs/isofs/rock.c | pnt = ((unsigned char *) bh->b_data) + (inode->i_ino & (bufsize - 1)); |
bh | 433 | fs/isofs/rock.c | memcpy(cpnt, bh->b_data + offset, frag1); |
bh | 434 | fs/isofs/rock.c | brelse(bh); |
bh | 435 | fs/isofs/rock.c | if (!(bh = bread(inode->i_dev,++block, bufsize))) { |
bh | 441 | fs/isofs/rock.c | memcpy((char *)cpnt+frag1, bh->b_data, offset); |
bh | 509 | fs/isofs/rock.c | brelse(bh); |
bh | 27 | fs/minix/bitmap.c | struct buffer_head *bh; |
bh | 30 | fs/minix/bitmap.c | if (!(bh=map[i])) |
bh | 39 | fs/minix/bitmap.c | tmp = bh->b_data[end] & ((1<<numbits)-1); |
bh | 44 | fs/minix/bitmap.c | sum += nibblemap[bh->b_data[j] & 0xf] |
bh | 45 | fs/minix/bitmap.c | + nibblemap[(bh->b_data[j]>>4)&0xf]; |
bh | 52 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 64 | fs/minix/bitmap.c | bh = get_hash_table(sb->s_dev,block,BLOCK_SIZE); |
bh | 65 | fs/minix/bitmap.c | if (bh) |
bh | 66 | fs/minix/bitmap.c | bh->b_dirt=0; |
bh | 67 | fs/minix/bitmap.c | brelse(bh); |
bh | 71 | fs/minix/bitmap.c | bh = sb->u.minix_sb.s_zmap[zone]; |
bh | 72 | fs/minix/bitmap.c | if (!bh) { |
bh | 76 | fs/minix/bitmap.c | if (!clear_bit(bit,bh->b_data)) |
bh | 78 | fs/minix/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 84 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 94 | fs/minix/bitmap.c | if ((bh=sb->u.minix_sb.s_zmap[i]) != NULL) |
bh | 95 | fs/minix/bitmap.c | if ((j=find_first_zero_bit(bh->b_data, 8192)) < 8192) |
bh | 97 | fs/minix/bitmap.c | if (i>=8 || !bh || j>=8192) |
bh | 99 | fs/minix/bitmap.c | if (set_bit(j,bh->b_data)) { |
bh | 103 | fs/minix/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 108 | fs/minix/bitmap.c | if (!(bh = getblk(sb->s_dev,j,BLOCK_SIZE))) { |
bh | 112 | fs/minix/bitmap.c | memset(bh->b_data, 0, BLOCK_SIZE); |
bh | 113 | fs/minix/bitmap.c | bh->b_uptodate = 1; |
bh | 114 | fs/minix/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 115 | fs/minix/bitmap.c | brelse(bh); |
bh | 127 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 153 | fs/minix/bitmap.c | if (!(bh=inode->i_sb->u.minix_sb.s_imap[ino >> 13])) { |
bh | 158 | fs/minix/bitmap.c | if (!clear_bit(ino & 8191, bh->b_data)) |
bh | 160 | fs/minix/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 167 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 177 | fs/minix/bitmap.c | if ((bh = inode->i_sb->u.minix_sb.s_imap[i]) != NULL) |
bh | 178 | fs/minix/bitmap.c | if ((j=find_first_zero_bit(bh->b_data, 8192)) < 8192) |
bh | 180 | fs/minix/bitmap.c | if (!bh || j >= 8192) { |
bh | 184 | fs/minix/bitmap.c | if (set_bit(j,bh->b_data)) { /* shouldn't happen */ |
bh | 189 | fs/minix/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 70 | fs/minix/dir.c | struct buffer_head * bh; |
bh | 82 | fs/minix/dir.c | bh = minix_bread(inode,(filp->f_pos)>>BLOCK_SIZE_BITS,0); |
bh | 83 | fs/minix/dir.c | if (!bh) { |
bh | 88 | fs/minix/dir.c | de = (struct minix_dir_entry *) (offset + bh->b_data); |
bh | 109 | fs/minix/dir.c | brelse(bh); |
bh | 197 | fs/minix/file.c | struct buffer_head * bh; |
bh | 215 | fs/minix/file.c | bh = minix_getblk(inode,pos/BLOCK_SIZE,1); |
bh | 216 | fs/minix/file.c | if (!bh) { |
bh | 224 | fs/minix/file.c | if (c != BLOCK_SIZE && !bh->b_uptodate) { |
bh | 225 | fs/minix/file.c | ll_rw_block(READ, 1, &bh); |
bh | 226 | fs/minix/file.c | wait_on_buffer(bh); |
bh | 227 | fs/minix/file.c | if (!bh->b_uptodate) { |
bh | 228 | fs/minix/file.c | brelse(bh); |
bh | 234 | fs/minix/file.c | p = (pos % BLOCK_SIZE) + bh->b_data; |
bh | 239 | fs/minix/file.c | bh->b_uptodate = 1; |
bh | 240 | fs/minix/file.c | mark_buffer_dirty(bh, 0); |
bh | 241 | fs/minix/file.c | brelse(bh); |
bh | 33 | fs/minix/fsync.c | struct buffer_head * bh; |
bh | 39 | fs/minix/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
bh | 40 | fs/minix/fsync.c | if (!bh) |
bh | 43 | fs/minix/fsync.c | brelse (bh); |
bh | 46 | fs/minix/fsync.c | if (wait && bh->b_req && !bh->b_uptodate) { |
bh | 47 | fs/minix/fsync.c | brelse(bh); |
bh | 50 | fs/minix/fsync.c | if (wait || !bh->b_uptodate || !bh->b_dirt) |
bh | 52 | fs/minix/fsync.c | brelse(bh); |
bh | 55 | fs/minix/fsync.c | ll_rw_block(WRITE, 1, &bh); |
bh | 56 | fs/minix/fsync.c | bh->b_count--; |
bh | 61 | fs/minix/fsync.c | struct buffer_head **bh, int wait) |
bh | 66 | fs/minix/fsync.c | *bh = NULL; |
bh | 73 | fs/minix/fsync.c | *bh = bread(inode->i_dev, tmp, blocksize); |
bh | 75 | fs/minix/fsync.c | brelse(*bh); |
bh | 76 | fs/minix/fsync.c | *bh = NULL; |
bh | 79 | fs/minix/fsync.c | if (!*bh) |
bh | 127 | fs/minix/inode.c | struct buffer_head *bh; |
bh | 136 | fs/minix/inode.c | if (!(bh = bread(dev,1,BLOCK_SIZE))) { |
bh | 143 | fs/minix/inode.c | ms = (struct minix_super_block *) bh->b_data; |
bh | 145 | fs/minix/inode.c | s->u.minix_sb.s_sbh = bh; |
bh | 166 | fs/minix/inode.c | brelse(bh); |
bh | 194 | fs/minix/inode.c | brelse(bh); |
bh | 208 | fs/minix/inode.c | brelse(bh); |
bh | 215 | fs/minix/inode.c | mark_buffer_dirty(bh, 1); |
bh | 247 | fs/minix/inode.c | static int block_bmap(struct buffer_head * bh, int nr) |
bh | 251 | fs/minix/inode.c | if (!bh) |
bh | 253 | fs/minix/inode.c | tmp = ((unsigned short *) bh->b_data)[nr]; |
bh | 254 | fs/minix/inode.c | brelse(bh); |
bh | 323 | fs/minix/inode.c | struct buffer_head * bh, int nr, int create) |
bh | 329 | fs/minix/inode.c | if (!bh) |
bh | 331 | fs/minix/inode.c | if (!bh->b_uptodate) { |
bh | 332 | fs/minix/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 333 | fs/minix/inode.c | wait_on_buffer(bh); |
bh | 334 | fs/minix/inode.c | if (!bh->b_uptodate) { |
bh | 335 | fs/minix/inode.c | brelse(bh); |
bh | 339 | fs/minix/inode.c | p = nr + (unsigned short *) bh->b_data; |
bh | 343 | fs/minix/inode.c | result = getblk(bh->b_dev, tmp, BLOCK_SIZE); |
bh | 345 | fs/minix/inode.c | brelse(bh); |
bh | 352 | fs/minix/inode.c | brelse(bh); |
bh | 357 | fs/minix/inode.c | brelse(bh); |
bh | 360 | fs/minix/inode.c | result = getblk(bh->b_dev, tmp, BLOCK_SIZE); |
bh | 367 | fs/minix/inode.c | mark_buffer_dirty(bh, 1); |
bh | 368 | fs/minix/inode.c | brelse(bh); |
bh | 374 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 388 | fs/minix/inode.c | bh = inode_getblk(inode,7,create); |
bh | 389 | fs/minix/inode.c | return block_getblk(inode, bh, block, create); |
bh | 392 | fs/minix/inode.c | bh = inode_getblk(inode,8,create); |
bh | 393 | fs/minix/inode.c | bh = block_getblk(inode, bh, block>>9, create); |
bh | 394 | fs/minix/inode.c | return block_getblk(inode, bh, block & 511, create); |
bh | 399 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 401 | fs/minix/inode.c | bh = minix_getblk(inode,block,create); |
bh | 402 | fs/minix/inode.c | if (!bh || bh->b_uptodate) |
bh | 403 | fs/minix/inode.c | return bh; |
bh | 404 | fs/minix/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 405 | fs/minix/inode.c | wait_on_buffer(bh); |
bh | 406 | fs/minix/inode.c | if (bh->b_uptodate) |
bh | 407 | fs/minix/inode.c | return bh; |
bh | 408 | fs/minix/inode.c | brelse(bh); |
bh | 414 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 429 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,block, BLOCK_SIZE))) { |
bh | 434 | fs/minix/inode.c | raw_inode = ((struct minix_inode *) bh->b_data) + |
bh | 447 | fs/minix/inode.c | brelse(bh); |
bh | 464 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 477 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) { |
bh | 482 | fs/minix/inode.c | raw_inode = ((struct minix_inode *)bh->b_data) + |
bh | 495 | fs/minix/inode.c | mark_buffer_dirty(bh, 1); |
bh | 496 | fs/minix/inode.c | return bh; |
bh | 501 | fs/minix/inode.c | struct buffer_head *bh; |
bh | 502 | fs/minix/inode.c | bh = minix_update_inode(inode); |
bh | 503 | fs/minix/inode.c | brelse(bh); |
bh | 509 | fs/minix/inode.c | struct buffer_head *bh; |
bh | 511 | fs/minix/inode.c | bh = minix_update_inode(inode); |
bh | 512 | fs/minix/inode.c | if (bh && bh->b_dirt) |
bh | 514 | fs/minix/inode.c | ll_rw_block(WRITE, 1, &bh); |
bh | 515 | fs/minix/inode.c | wait_on_buffer(bh); |
bh | 516 | fs/minix/inode.c | if (bh->b_req && !bh->b_uptodate) |
bh | 523 | fs/minix/inode.c | else if (!bh) |
bh | 525 | 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 | 200 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 204 | fs/minix/namei.c | if (offset < bh->b_size) |
bh | 206 | fs/minix/namei.c | brelse(bh); |
bh | 207 | fs/minix/namei.c | bh = NULL; |
bh | 211 | fs/minix/namei.c | *res_buf = bh; |
bh | 220 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 234 | fs/minix/namei.c | error = minix_add_entry(dir,name,len, &bh ,&de); |
bh | 243 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 244 | fs/minix/namei.c | brelse(bh); |
bh | 254 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 259 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 260 | fs/minix/namei.c | if (bh) { |
bh | 261 | fs/minix/namei.c | brelse(bh); |
bh | 291 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
bh | 300 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 301 | fs/minix/namei.c | brelse(bh); |
bh | 311 | fs/minix/namei.c | struct buffer_head * bh, *dir_block; |
bh | 320 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 321 | fs/minix/namei.c | if (bh) { |
bh | 322 | fs/minix/namei.c | brelse(bh); |
bh | 358 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
bh | 366 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 371 | fs/minix/namei.c | brelse(bh); |
bh | 381 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 389 | fs/minix/namei.c | bh = NULL; |
bh | 395 | fs/minix/namei.c | bh = minix_bread(inode,0,0); |
bh | 396 | fs/minix/namei.c | if (!bh) |
bh | 398 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
bh | 401 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + info->s_dirsize); |
bh | 405 | fs/minix/namei.c | if (!bh) { |
bh | 406 | fs/minix/namei.c | bh = minix_bread(inode,block,0); |
bh | 407 | fs/minix/namei.c | if (!bh) { |
bh | 412 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + offset); |
bh | 415 | fs/minix/namei.c | brelse(bh); |
bh | 418 | fs/minix/namei.c | if (offset < bh->b_size) |
bh | 420 | fs/minix/namei.c | brelse(bh); |
bh | 421 | fs/minix/namei.c | bh = NULL; |
bh | 425 | fs/minix/namei.c | brelse(bh); |
bh | 428 | fs/minix/namei.c | brelse(bh); |
bh | 437 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 441 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 443 | fs/minix/namei.c | if (!bh) |
bh | 476 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 486 | fs/minix/namei.c | brelse(bh); |
bh | 494 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 500 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 501 | fs/minix/namei.c | if (!bh) |
bh | 510 | fs/minix/namei.c | brelse(bh); |
bh | 530 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 538 | fs/minix/namei.c | brelse(bh); |
bh | 548 | fs/minix/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 574 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 575 | fs/minix/namei.c | if (bh) { |
bh | 579 | fs/minix/namei.c | brelse(bh); |
bh | 583 | fs/minix/namei.c | i = minix_add_entry(dir, name, len, &bh, &de); |
bh | 592 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 593 | fs/minix/namei.c | brelse(bh); |
bh | 603 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 615 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 616 | fs/minix/namei.c | if (bh) { |
bh | 617 | fs/minix/namei.c | brelse(bh); |
bh | 622 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
bh | 629 | fs/minix/namei.c | mark_buffer_dirty(bh, 1); |
bh | 630 | fs/minix/namei.c | brelse(bh); |
bh | 49 | fs/minix/symlink.c | struct buffer_head * bh; |
bh | 70 | fs/minix/symlink.c | if (!(bh = minix_bread(inode, 0, 0))) { |
bh | 77 | fs/minix/symlink.c | error = open_namei(bh->b_data,flag,mode,res_inode,dir); |
bh | 79 | fs/minix/symlink.c | brelse(bh); |
bh | 85 | fs/minix/symlink.c | struct buffer_head * bh; |
bh | 95 | fs/minix/symlink.c | bh = minix_bread(inode, 0, 0); |
bh | 97 | fs/minix/symlink.c | if (!bh) |
bh | 100 | fs/minix/symlink.c | while (i<buflen && (c = bh->b_data[i])) { |
bh | 104 | fs/minix/symlink.c | brelse(bh); |
bh | 33 | fs/minix/truncate.c | struct buffer_head * bh; |
bh | 43 | fs/minix/truncate.c | bh = get_hash_table(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 45 | fs/minix/truncate.c | brelse(bh); |
bh | 48 | fs/minix/truncate.c | if ((bh && bh->b_count != 1) || tmp != *p) { |
bh | 50 | fs/minix/truncate.c | brelse(bh); |
bh | 55 | fs/minix/truncate.c | brelse(bh); |
bh | 63 | fs/minix/truncate.c | struct buffer_head * bh; |
bh | 92 | fs/minix/truncate.c | bh = get_hash_table(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 94 | fs/minix/truncate.c | brelse(bh); |
bh | 97 | fs/minix/truncate.c | if ((bh && bh->b_count != 1) || tmp != *ind) { |
bh | 99 | fs/minix/truncate.c | brelse(bh); |
bh | 104 | fs/minix/truncate.c | brelse(bh); |
bh | 85 | fs/msdos/buffer.c | struct buffer_head *bh) |
bh | 87 | fs/msdos/buffer.c | if (bh != NULL){ |
bh | 89 | fs/msdos/buffer.c | brelse (bh); |
bh | 91 | fs/msdos/buffer.c | brelse (bh->b_next); |
bh | 95 | fs/msdos/buffer.c | kfree (bh); |
bh | 102 | fs/msdos/buffer.c | struct buffer_head *bh, |
bh | 106 | fs/msdos/buffer.c | bh = bh->b_next; |
bh | 108 | fs/msdos/buffer.c | mark_buffer_dirty (bh,dirty_val); |
bh | 113 | fs/msdos/buffer.c | struct buffer_head *bh, |
bh | 117 | fs/msdos/buffer.c | bh = bh->b_next; |
bh | 119 | fs/msdos/buffer.c | bh->b_uptodate = val; |
bh | 123 | fs/msdos/buffer.c | struct buffer_head *bh) |
bh | 126 | fs/msdos/buffer.c | bh = bh->b_next; |
bh | 128 | fs/msdos/buffer.c | return bh->b_uptodate; |
bh | 135 | fs/msdos/buffer.c | struct buffer_head *bh[32]) |
bh | 138 | fs/msdos/buffer.c | ll_rw_block(opr,nbreq,bh); |
bh | 143 | fs/msdos/buffer.c | tmp[i] = bh[i]->b_next; |
bh | 74 | fs/msdos/dir.c | struct buffer_head *bh; |
bh | 92 | fs/msdos/dir.c | bh = NULL; |
bh | 93 | fs/msdos/dir.c | while ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) { |
bh | 125 | fs/msdos/dir.c | brelse(bh); |
bh | 131 | fs/msdos/dir.c | if (bh) brelse(bh); |
bh | 26 | fs/msdos/fat.c | struct buffer_head *bh,*bh2,*c_bh,*c_bh2; |
bh | 36 | fs/msdos/fat.c | if (!(bh = bread(sb->s_dev,MSDOS_SB(sb)->fat_start+(first >> |
bh | 42 | fs/msdos/fat.c | bh2 = bh; |
bh | 46 | fs/msdos/fat.c | brelse(bh); |
bh | 53 | fs/msdos/fat.c | next = CF_LE_W(((unsigned short *) bh->b_data)[(first & |
bh | 58 | fs/msdos/fat.c | p_first = &((unsigned char *) bh->b_data)[first & (SECTOR_SIZE-1)]; |
bh | 67 | fs/msdos/fat.c | ((unsigned short *) bh->b_data)[(first & (SECTOR_SIZE-1)) >> |
bh | 80 | fs/msdos/fat.c | mark_buffer_dirty(bh, 1); |
bh | 85 | fs/msdos/fat.c | memcpy(c_bh->b_data,bh->b_data,SECTOR_SIZE); |
bh | 87 | fs/msdos/fat.c | if (bh != bh2) { |
bh | 101 | fs/msdos/fat.c | brelse(bh); |
bh | 102 | fs/msdos/fat.c | if (bh != bh2) brelse(bh2); |
bh | 135 | fs/msdos/file.c | struct buffer_head *bh; |
bh | 138 | fs/msdos/file.c | bh = getblk(inode->i_dev,sector,SECTOR_SIZE); |
bh | 139 | fs/msdos/file.c | if (bh == NULL) break; |
bh | 140 | fs/msdos/file.c | pre->bhlist[pre->nblist++] = bh; |
bh | 141 | fs/msdos/file.c | if (!msdos_is_uptodate(sb,bh)) bhreq[nbreq++] = bh; |
bh | 214 | fs/msdos/file.c | struct buffer_head *bh = pre.bhlist[pre.nolist]; |
bh | 217 | fs/msdos/file.c | if (bh == NULL) break; |
bh | 228 | fs/msdos/file.c | wait_on_buffer(bh); |
bh | 229 | fs/msdos/file.c | if (!msdos_is_uptodate(sb,bh)){ |
bh | 231 | fs/msdos/file.c | brelse (bh); |
bh | 235 | fs/msdos/file.c | data = bh->b_data + offset; |
bh | 254 | fs/msdos/file.c | brelse(bh); |
bh | 277 | fs/msdos/file.c | struct buffer_head *bh; |
bh | 312 | fs/msdos/file.c | if (!(bh = getblk(inode->i_dev,sector,SECTOR_SIZE))){ |
bh | 316 | fs/msdos/file.c | }else if (!(bh = bread(inode->i_dev,sector,SECTOR_SIZE))) { |
bh | 321 | fs/msdos/file.c | memcpy_fromfs(bh->b_data+offset,buf,written = size); |
bh | 326 | fs/msdos/file.c | to = (char *) bh->b_data+(filp->f_pos & (SECTOR_SIZE-1)); |
bh | 350 | fs/msdos/file.c | msdos_set_uptodate(sb,bh,1); |
bh | 351 | fs/msdos/file.c | mark_buffer_dirty(bh, 0); |
bh | 352 | fs/msdos/file.c | brelse(bh); |
bh | 171 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 200 | fs/msdos/inode.c | bh = bread(sb->s_dev, 0, 1024); |
bh | 202 | fs/msdos/inode.c | if (bh == NULL || !msdos_is_uptodate(sb,bh)) { |
bh | 203 | fs/msdos/inode.c | brelse (bh); |
bh | 209 | fs/msdos/inode.c | b = (struct msdos_boot_sector *) bh->b_data; |
bh | 257 | fs/msdos/inode.c | brelse(bh); |
bh | 356 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 383 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, |
bh | 388 | fs/msdos/inode.c | raw_entry = &((struct msdos_dir_entry *) (bh->b_data)) |
bh | 435 | fs/msdos/inode.c | brelse(bh); |
bh | 442 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 447 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, |
bh | 452 | fs/msdos/inode.c | raw_entry = &((struct msdos_dir_entry *) (bh->b_data)) |
bh | 468 | fs/msdos/inode.c | mark_buffer_dirty(bh, 1); |
bh | 469 | fs/msdos/inode.c | brelse(bh); |
bh | 121 | fs/msdos/misc.c | struct buffer_head *bh; |
bh | 178 | fs/msdos/misc.c | if (!(bh = getblk(inode->i_dev,sector,SECTOR_SIZE))) |
bh | 181 | fs/msdos/misc.c | memset(bh->b_data,0,SECTOR_SIZE); |
bh | 182 | fs/msdos/misc.c | msdos_set_uptodate(sb,bh,1); |
bh | 183 | fs/msdos/misc.c | mark_buffer_dirty(bh, 1); |
bh | 184 | fs/msdos/misc.c | brelse(bh); |
bh | 261 | fs/msdos/misc.c | int msdos_get_entry(struct inode *dir, loff_t *pos,struct buffer_head **bh, |
bh | 272 | fs/msdos/misc.c | PRINTK (("get_entry sector %d %p\n",sector,*bh)); |
bh | 276 | fs/msdos/misc.c | if (*bh) |
bh | 277 | fs/msdos/misc.c | brelse(*bh); |
bh | 279 | fs/msdos/misc.c | if (!(*bh = bread(dir->i_dev,sector,SECTOR_SIZE))) { |
bh | 284 | fs/msdos/misc.c | *de = (struct msdos_dir_entry *) ((*bh)->b_data+(offset & |
bh | 348 | fs/msdos/misc.c | struct buffer_head *bh; |
bh | 353 | fs/msdos/misc.c | if (!(bh = bread(sb->s_dev,sector,SECTOR_SIZE))) return -EIO; |
bh | 354 | fs/msdos/misc.c | data = (struct msdos_dir_entry *) bh->b_data; |
bh | 367 | fs/msdos/misc.c | if (!res_bh) brelse(bh); |
bh | 369 | fs/msdos/misc.c | *res_bh = bh; |
bh | 375 | fs/msdos/misc.c | brelse(bh); |
bh | 4 | fs/msdos/msbuffer.h | void msdos_brelse (struct super_block *sb, struct buffer_head *bh); |
bh | 6 | fs/msdos/msbuffer.h | struct buffer_head *bh, |
bh | 9 | fs/msdos/msbuffer.h | struct buffer_head *bh, |
bh | 11 | fs/msdos/msbuffer.h | int msdos_is_uptodate (struct super_block *sb, struct buffer_head *bh); |
bh | 13 | fs/msdos/msbuffer.h | int nbreq, struct buffer_head *bh[32]); |
bh | 102 | fs/msdos/namei.c | struct buffer_head **bh,struct msdos_dir_entry **de,int *ino) |
bh | 109 | fs/msdos/namei.c | return msdos_scan(dir,msdos_name,bh,de,ino); |
bh | 119 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 143 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) { |
bh | 148 | fs/msdos/namei.c | if (bh) brelse(bh); |
bh | 184 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 188 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) { |
bh | 192 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) return res; |
bh | 205 | fs/msdos/namei.c | mark_buffer_dirty(bh, 1); |
bh | 208 | fs/msdos/namei.c | brelse(bh); |
bh | 221 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 233 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
bh | 235 | fs/msdos/namei.c | brelse(bh); |
bh | 269 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 281 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
bh | 283 | fs/msdos/namei.c | brelse(bh); |
bh | 328 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 335 | fs/msdos/namei.c | bh = NULL; |
bh | 336 | fs/msdos/namei.c | while (msdos_get_entry(dir,&pos,&bh,&de) > -1) |
bh | 340 | fs/msdos/namei.c | brelse(bh); |
bh | 343 | fs/msdos/namei.c | if (bh) |
bh | 344 | fs/msdos/namei.c | brelse(bh); |
bh | 354 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 358 | fs/msdos/namei.c | bh = NULL; |
bh | 363 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) goto rmdir_done; |
bh | 378 | fs/msdos/namei.c | mark_buffer_dirty(bh, 1); |
bh | 381 | fs/msdos/namei.c | brelse(bh); |
bh | 396 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 400 | fs/msdos/namei.c | bh = NULL; |
bh | 402 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) |
bh | 417 | fs/msdos/namei.c | mark_buffer_dirty(bh, 1); |
bh | 419 | fs/msdos/namei.c | brelse(bh); |
bh | 38 | fs/sysv/balloc.c | struct buffer_head * bh; |
bh | 62 | fs/sysv/balloc.c | bh = sv_getblk(sb, sb->s_dev, block); |
bh | 63 | fs/sysv/balloc.c | if (!bh) { |
bh | 68 | fs/sysv/balloc.c | bh_data = bh->b_data; |
bh | 90 | fs/sysv/balloc.c | mark_buffer_dirty(bh, 1); |
bh | 91 | fs/sysv/balloc.c | bh->b_uptodate = 1; |
bh | 92 | fs/sysv/balloc.c | brelse(bh); |
bh | 99 | fs/sysv/balloc.c | bh = sv_getblk(sb, sb->s_dev, block); |
bh | 100 | fs/sysv/balloc.c | if (!bh) { |
bh | 105 | fs/sysv/balloc.c | memset(bh->b_data, 0, sb->sv_block_size); |
bh | 107 | fs/sysv/balloc.c | mark_buffer_dirty(bh, 1); |
bh | 108 | fs/sysv/balloc.c | bh->b_uptodate = 1; |
bh | 109 | fs/sysv/balloc.c | brelse(bh); |
bh | 113 | fs/sysv/balloc.c | bh = sv_get_hash_table(sb, sb->s_dev, block); |
bh | 114 | fs/sysv/balloc.c | if (bh) |
bh | 115 | fs/sysv/balloc.c | bh->b_dirt = 0; |
bh | 116 | fs/sysv/balloc.c | brelse(bh); |
bh | 135 | fs/sysv/balloc.c | struct buffer_head * bh; |
bh | 164 | fs/sysv/balloc.c | if (!(bh = sv_bread(sb, sb->s_dev, block))) { |
bh | 171 | fs/sysv/balloc.c | bh_data = bh->b_data; |
bh | 193 | fs/sysv/balloc.c | brelse(bh); |
bh | 199 | fs/sysv/balloc.c | brelse(bh); |
bh | 202 | fs/sysv/balloc.c | bh = sv_getblk(sb, sb->s_dev, block); |
bh | 203 | fs/sysv/balloc.c | if (!bh) { |
bh | 208 | fs/sysv/balloc.c | if (bh->b_count != 1) { |
bh | 213 | fs/sysv/balloc.c | memset(bh->b_data, 0, sb->sv_block_size); |
bh | 214 | fs/sysv/balloc.c | mark_buffer_dirty(bh, 1); |
bh | 215 | fs/sysv/balloc.c | bh->b_uptodate = 1; |
bh | 216 | fs/sysv/balloc.c | brelse(bh); |
bh | 234 | fs/sysv/balloc.c | struct buffer_head * bh; |
bh | 261 | fs/sysv/balloc.c | if (!(bh = sv_bread(sb, sb->s_dev, block))) { |
bh | 265 | fs/sysv/balloc.c | bh_data = bh->b_data; |
bh | 287 | fs/sysv/balloc.c | brelse(bh); |
bh | 291 | fs/sysv/balloc.c | brelse(bh); |
bh | 305 | fs/sysv/balloc.c | brelse(bh); |
bh | 77 | fs/sysv/dir.c | struct buffer_head * bh; |
bh | 87 | fs/sysv/dir.c | bh = sysv_file_bread(inode, filp->f_pos >> sb->sv_block_size_bits, 0); |
bh | 88 | fs/sysv/dir.c | if (!bh) { |
bh | 92 | fs/sysv/dir.c | bh_data = bh->b_data; |
bh | 117 | fs/sysv/dir.c | brelse(bh); |
bh | 122 | fs/sysv/dir.c | brelse(bh); |
bh | 208 | fs/sysv/file.c | struct buffer_head * bh; |
bh | 232 | fs/sysv/file.c | bh = sysv_getblk (inode, pos >> sb->sv_block_size_bits, 1); |
bh | 233 | fs/sysv/file.c | if (!bh) { |
bh | 241 | fs/sysv/file.c | if (c != sb->sv_block_size && !bh->b_uptodate) { |
bh | 242 | fs/sysv/file.c | ll_rw_block(READ, 1, &bh); |
bh | 243 | fs/sysv/file.c | wait_on_buffer(bh); |
bh | 244 | fs/sysv/file.c | if (!bh->b_uptodate) { |
bh | 245 | fs/sysv/file.c | brelse(bh); |
bh | 252 | fs/sysv/file.c | p = (pos & sb->sv_block_size_1) + bh->b_data; |
bh | 261 | fs/sysv/file.c | bh->b_uptodate = 1; |
bh | 262 | fs/sysv/file.c | mark_buffer_dirty(bh, 0); |
bh | 263 | fs/sysv/file.c | brelse(bh); |
bh | 35 | fs/sysv/fsync.c | struct buffer_head * bh; |
bh | 45 | fs/sysv/fsync.c | bh = sv_get_hash_table(sb, inode->i_dev, block); |
bh | 46 | fs/sysv/fsync.c | if (!bh) |
bh | 49 | fs/sysv/fsync.c | brelse (bh); |
bh | 52 | fs/sysv/fsync.c | if (wait && bh->b_req && !bh->b_uptodate) { |
bh | 53 | fs/sysv/fsync.c | brelse(bh); |
bh | 56 | fs/sysv/fsync.c | if (wait || !bh->b_uptodate || !bh->b_dirt) { |
bh | 57 | fs/sysv/fsync.c | brelse(bh); |
bh | 60 | fs/sysv/fsync.c | ll_rw_block(WRITE, 1, &bh); |
bh | 61 | fs/sysv/fsync.c | bh->b_count--; |
bh | 67 | fs/sysv/fsync.c | struct buffer_head * *bh, int wait) |
bh | 72 | fs/sysv/fsync.c | *bh = NULL; |
bh | 81 | fs/sysv/fsync.c | *bh = sv_bread(inode->i_sb, inode->i_dev, block); |
bh | 83 | fs/sysv/fsync.c | brelse(*bh); |
bh | 84 | fs/sysv/fsync.c | *bh = NULL; |
bh | 87 | fs/sysv/fsync.c | if (!*bh) |
bh | 60 | fs/sysv/ialloc.c | struct buffer_head * bh; |
bh | 86 | fs/sysv/ialloc.c | if (!(bh = sv_bread(sb, inode->i_dev, sb->sv_firstinodezone + ((ino-1) >> sb->sv_inodes_per_block_bits)))) { |
bh | 91 | fs/sysv/ialloc.c | raw_inode = (struct sysv_inode *) bh->b_data + ((ino-1) & sb->sv_inodes_per_block_1); |
bh | 100 | fs/sysv/ialloc.c | mark_buffer_dirty(bh, 1); |
bh | 102 | fs/sysv/ialloc.c | brelse(bh); |
bh | 110 | fs/sysv/ialloc.c | struct buffer_head * bh; |
bh | 131 | fs/sysv/ialloc.c | if (!(bh = sv_bread(sb, sb->s_dev, block))) { |
bh | 136 | fs/sysv/ialloc.c | raw_inode = (struct sysv_inode *) bh->b_data + j; |
bh | 141 | fs/sysv/ialloc.c | brelse(bh); |
bh | 183 | fs/sysv/ialloc.c | struct buffer_head * bh; |
bh | 197 | fs/sysv/ialloc.c | if (!(bh = sv_bread(sb, sb->s_dev, block))) { |
bh | 202 | fs/sysv/ialloc.c | raw_inode = (struct sysv_inode *) bh->b_data + j; |
bh | 206 | fs/sysv/ialloc.c | brelse(bh); |
bh | 125 | fs/sysv/inode.c | static const char* detect_xenix (struct super_block *sb, struct buffer_head *bh) |
bh | 129 | fs/sysv/inode.c | sbd = (struct xenix_super_block *) bh->b_data; |
bh | 182 | fs/sysv/inode.c | static const char* detect_sysv4 (struct super_block *sb, struct buffer_head *bh) |
bh | 186 | fs/sysv/inode.c | sbd = (struct sysv4_super_block *) (bh->b_data + BLOCK_SIZE/2); |
bh | 199 | fs/sysv/inode.c | static struct super_block * detected_sysv4 (struct super_block *sb, struct buffer_head *bh) |
bh | 204 | fs/sysv/inode.c | sbd = (struct sysv4_super_block *) (bh->b_data + BLOCK_SIZE/2); |
bh | 206 | fs/sysv/inode.c | sbd = (struct sysv4_super_block *) bh->b_data; |
bh | 220 | fs/sysv/inode.c | sb->sv_bh1 = bh; |
bh | 221 | fs/sysv/inode.c | sb->sv_bh2 = bh; |
bh | 240 | fs/sysv/inode.c | static const char* detect_sysv2 (struct super_block *sb, struct buffer_head *bh) |
bh | 244 | fs/sysv/inode.c | sbd = (struct sysv2_super_block *) (bh->b_data + BLOCK_SIZE/2); |
bh | 257 | fs/sysv/inode.c | static struct super_block * detected_sysv2 (struct super_block *sb, struct buffer_head *bh) |
bh | 262 | fs/sysv/inode.c | sbd = (struct sysv2_super_block *) (bh->b_data + BLOCK_SIZE/2); |
bh | 264 | fs/sysv/inode.c | sbd = (struct sysv2_super_block *) bh->b_data; |
bh | 278 | fs/sysv/inode.c | sb->sv_bh1 = bh; |
bh | 279 | fs/sysv/inode.c | sb->sv_bh2 = bh; |
bh | 298 | fs/sysv/inode.c | static const char* detect_coherent (struct super_block *sb, struct buffer_head *bh) |
bh | 302 | fs/sysv/inode.c | sbd = (struct coh_super_block *) (bh->b_data + BLOCK_SIZE/2); |
bh | 310 | fs/sysv/inode.c | static struct super_block * detected_coherent (struct super_block *sb, struct buffer_head *bh) |
bh | 314 | fs/sysv/inode.c | sbd = (struct coh_super_block *) bh->b_data; |
bh | 326 | fs/sysv/inode.c | sb->sv_bh1 = bh; |
bh | 327 | fs/sysv/inode.c | sb->sv_bh2 = bh; |
bh | 348 | fs/sysv/inode.c | struct buffer_head *bh; |
bh | 366 | fs/sysv/inode.c | if ((bh = bread(dev, 1, BLOCK_SIZE)) != NULL) { |
bh | 367 | fs/sysv/inode.c | if ((found = detect_xenix(sb,bh)) != NULL) |
bh | 369 | fs/sysv/inode.c | brelse(bh); |
bh | 371 | fs/sysv/inode.c | if ((bh = bread(dev, 0, BLOCK_SIZE)) != NULL) { |
bh | 373 | fs/sysv/inode.c | if ((found = detect_sysv4(sb,bh)) != NULL) |
bh | 375 | fs/sysv/inode.c | if ((found = detect_sysv2(sb,bh)) != NULL) |
bh | 378 | fs/sysv/inode.c | if ((found = detect_coherent(sb,bh)) != NULL) |
bh | 380 | fs/sysv/inode.c | brelse(bh); |
bh | 387 | fs/sysv/inode.c | if ((bh = bread(dev, offsets[i], BLOCK_SIZE)) != NULL) { |
bh | 389 | fs/sysv/inode.c | if ((found = detect_sysv4(sb,bh)) != NULL) { |
bh | 393 | fs/sysv/inode.c | if ((found = detect_sysv2(sb,bh)) != NULL) { |
bh | 397 | fs/sysv/inode.c | brelse(bh); |
bh | 412 | fs/sysv/inode.c | if (!detected_xenix(sb,bh,bh)) |
bh | 416 | fs/sysv/inode.c | if (!detected_sysv4(sb,bh)) |
bh | 420 | fs/sysv/inode.c | if (!detected_sysv2(sb,bh)) |
bh | 425 | fs/sysv/inode.c | brelse(bh); |
bh | 435 | fs/sysv/inode.c | unsigned long blocknr = bh->b_blocknr << sb->sv_block_size_ratio_bits; |
bh | 437 | fs/sysv/inode.c | brelse(bh); |
bh | 566 | fs/sysv/inode.c | static int block_bmap(struct super_block * sb, struct buffer_head * bh, int nr, int convert) |
bh | 570 | fs/sysv/inode.c | if (!bh) |
bh | 572 | fs/sysv/inode.c | tmp = ((sysv_zone_t *) bh->b_data) [nr]; |
bh | 575 | fs/sysv/inode.c | brelse(bh); |
bh | 587 | fs/sysv/inode.c | struct buffer_head * bh; |
bh | 597 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
bh | 598 | fs/sysv/inode.c | return block_bmap(sb, bh, block, convert); |
bh | 605 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
bh | 606 | fs/sysv/inode.c | i = block_bmap(sb, bh, block >> sb->sv_ind_per_block_bits, convert); |
bh | 609 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
bh | 610 | fs/sysv/inode.c | return block_bmap(sb, bh, block & sb->sv_ind_per_block_1, convert); |
bh | 617 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
bh | 618 | fs/sysv/inode.c | i = block_bmap(sb, bh, block >> sb->sv_ind_per_block_2_bits, convert); |
bh | 621 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
bh | 622 | fs/sysv/inode.c | i = block_bmap(sb, bh, (block >> sb->sv_ind_per_block_bits) & sb->sv_ind_per_block_1,convert); |
bh | 625 | fs/sysv/inode.c | bh = bread(inode->i_dev,i,sb->sv_block_size); |
bh | 626 | fs/sysv/inode.c | return block_bmap(sb, bh, block & sb->sv_ind_per_block_1, convert); |
bh | 677 | fs/sysv/inode.c | struct buffer_head * bh, int nr, int create) |
bh | 684 | fs/sysv/inode.c | if (!bh) |
bh | 686 | fs/sysv/inode.c | if (!bh->b_uptodate) { |
bh | 687 | fs/sysv/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 688 | fs/sysv/inode.c | wait_on_buffer(bh); |
bh | 689 | fs/sysv/inode.c | if (!bh->b_uptodate) { |
bh | 690 | fs/sysv/inode.c | brelse(bh); |
bh | 695 | fs/sysv/inode.c | p = nr + (sysv_zone_t *) bh->b_data; |
bh | 701 | fs/sysv/inode.c | result = sv_getblk(sb, bh->b_dev, block); |
bh | 703 | fs/sysv/inode.c | brelse(bh); |
bh | 710 | fs/sysv/inode.c | brelse(bh); |
bh | 715 | fs/sysv/inode.c | brelse(bh); |
bh | 718 | fs/sysv/inode.c | result = sv_getblk(sb, bh->b_dev, block); |
bh | 725 | fs/sysv/inode.c | mark_buffer_dirty(bh, 1); |
bh | 726 | fs/sysv/inode.c | brelse(bh); |
bh | 733 | fs/sysv/inode.c | struct buffer_head * bh; |
bh | 739 | fs/sysv/inode.c | bh = inode_getblk(inode,10,create); |
bh | 740 | fs/sysv/inode.c | return block_getblk(inode, bh, block, create); |
bh | 744 | fs/sysv/inode.c | bh = inode_getblk(inode,11,create); |
bh | 745 | fs/sysv/inode.c | bh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_bits, create); |
bh | 746 | fs/sysv/inode.c | return block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create); |
bh | 750 | fs/sysv/inode.c | bh = inode_getblk(inode,12,create); |
bh | 751 | fs/sysv/inode.c | bh = block_getblk(inode, bh, block >> sb->sv_ind_per_block_2_bits, create); |
bh | 752 | fs/sysv/inode.c | bh = block_getblk(inode, bh, (block >> sb->sv_ind_per_block_bits) & sb->sv_ind_per_block_1, create); |
bh | 753 | fs/sysv/inode.c | return block_getblk(inode, bh, block & sb->sv_ind_per_block_1, create); |
bh | 765 | fs/sysv/inode.c | struct buffer_head * bh; |
bh | 767 | fs/sysv/inode.c | bh = sysv_getblk(inode,block,create); |
bh | 768 | fs/sysv/inode.c | if (!bh || bh->b_uptodate) |
bh | 769 | fs/sysv/inode.c | return bh; |
bh | 770 | fs/sysv/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 771 | fs/sysv/inode.c | wait_on_buffer(bh); |
bh | 772 | fs/sysv/inode.c | if (bh->b_uptodate) |
bh | 773 | fs/sysv/inode.c | return bh; |
bh | 774 | fs/sysv/inode.c | brelse(bh); |
bh | 806 | fs/sysv/inode.c | struct buffer_head * bh; |
bh | 820 | fs/sysv/inode.c | if (!(bh = sv_bread(sb,inode->i_dev,block))) { |
bh | 825 | fs/sysv/inode.c | raw_inode = (struct sysv_inode *) bh->b_data + ((ino-1) & sb->sv_inodes_per_block_1); |
bh | 857 | fs/sysv/inode.c | brelse(bh); |
bh | 893 | fs/sysv/inode.c | struct buffer_head * bh; |
bh | 906 | fs/sysv/inode.c | if (!(bh = sv_bread(sb,inode->i_dev,block))) { |
bh | 911 | fs/sysv/inode.c | raw_inode = (struct sysv_inode *) bh->b_data + ((ino-1) & sb->sv_inodes_per_block_1); |
bh | 940 | fs/sysv/inode.c | mark_buffer_dirty(bh, 1); |
bh | 941 | fs/sysv/inode.c | return bh; |
bh | 946 | fs/sysv/inode.c | struct buffer_head *bh; |
bh | 947 | fs/sysv/inode.c | bh = sysv_update_inode(inode); |
bh | 948 | fs/sysv/inode.c | brelse(bh); |
bh | 954 | fs/sysv/inode.c | struct buffer_head *bh; |
bh | 956 | fs/sysv/inode.c | bh = sysv_update_inode(inode); |
bh | 957 | fs/sysv/inode.c | if (bh && bh->b_dirt) { |
bh | 958 | fs/sysv/inode.c | ll_rw_block(WRITE, 1, &bh); |
bh | 959 | fs/sysv/inode.c | wait_on_buffer(bh); |
bh | 960 | fs/sysv/inode.c | if (bh->b_req && !bh->b_uptodate) |
bh | 967 | fs/sysv/inode.c | else if (!bh) |
bh | 969 | fs/sysv/inode.c | brelse (bh); |
bh | 69 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 80 | fs/sysv/namei.c | bh = NULL; |
bh | 83 | fs/sysv/namei.c | if (!bh) { |
bh | 84 | fs/sysv/namei.c | bh = sysv_file_bread(dir,block,0); |
bh | 85 | fs/sysv/namei.c | if (!bh) { |
bh | 92 | fs/sysv/namei.c | *res_dir = (struct sysv_dir_entry *) (bh->b_data + offset) )) |
bh | 93 | fs/sysv/namei.c | return bh; |
bh | 98 | fs/sysv/namei.c | brelse(bh); |
bh | 99 | fs/sysv/namei.c | bh = NULL; |
bh | 102 | fs/sysv/namei.c | brelse(bh); |
bh | 112 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 121 | fs/sysv/namei.c | if (!(bh = sysv_find_entry(dir,name,len,&de))) { |
bh | 126 | fs/sysv/namei.c | brelse(bh); |
bh | 153 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 168 | fs/sysv/namei.c | bh = NULL; |
bh | 171 | fs/sysv/namei.c | if (!bh) { |
bh | 172 | fs/sysv/namei.c | bh = sysv_file_bread(dir,block,1); |
bh | 173 | fs/sysv/namei.c | if (!bh) |
bh | 176 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (bh->b_data + offset); |
bh | 186 | fs/sysv/namei.c | brelse(bh); |
bh | 194 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 200 | fs/sysv/namei.c | brelse(bh); |
bh | 201 | fs/sysv/namei.c | bh = NULL; |
bh | 204 | fs/sysv/namei.c | *res_buf = bh; |
bh | 213 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 227 | fs/sysv/namei.c | error = sysv_add_entry(dir,name,len, &bh ,&de); |
bh | 236 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 237 | fs/sysv/namei.c | brelse(bh); |
bh | 247 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 252 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
bh | 253 | fs/sysv/namei.c | if (bh) { |
bh | 254 | fs/sysv/namei.c | brelse(bh); |
bh | 284 | fs/sysv/namei.c | error = sysv_add_entry(dir, name, len, &bh, &de); |
bh | 293 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 294 | fs/sysv/namei.c | brelse(bh); |
bh | 304 | fs/sysv/namei.c | struct buffer_head * bh, *dir_block; |
bh | 311 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
bh | 312 | fs/sysv/namei.c | if (bh) { |
bh | 313 | fs/sysv/namei.c | brelse(bh); |
bh | 349 | fs/sysv/namei.c | error = sysv_add_entry(dir, name, len, &bh, &de); |
bh | 357 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 362 | fs/sysv/namei.c | brelse(bh); |
bh | 373 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 379 | fs/sysv/namei.c | bh = NULL; |
bh | 385 | fs/sysv/namei.c | bh = sysv_file_bread(inode,0,0); |
bh | 386 | fs/sysv/namei.c | if (!bh) |
bh | 388 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (bh->b_data + 0*SYSV_DIRSIZE); |
bh | 391 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (bh->b_data + 1*SYSV_DIRSIZE); |
bh | 396 | fs/sysv/namei.c | if (!bh) { |
bh | 397 | fs/sysv/namei.c | bh = sysv_file_bread(inode,block,0); |
bh | 398 | fs/sysv/namei.c | if (!bh) { |
bh | 404 | fs/sysv/namei.c | de = (struct sysv_dir_entry *) (bh->b_data + offset); |
bh | 408 | fs/sysv/namei.c | brelse(bh); |
bh | 413 | fs/sysv/namei.c | brelse(bh); |
bh | 414 | fs/sysv/namei.c | bh = NULL; |
bh | 417 | fs/sysv/namei.c | brelse(bh); |
bh | 420 | fs/sysv/namei.c | brelse(bh); |
bh | 429 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 433 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
bh | 435 | fs/sysv/namei.c | if (!bh) |
bh | 467 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 477 | fs/sysv/namei.c | brelse(bh); |
bh | 485 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 491 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
bh | 492 | fs/sysv/namei.c | if (!bh) |
bh | 501 | fs/sysv/namei.c | brelse(bh); |
bh | 520 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 528 | fs/sysv/namei.c | brelse(bh); |
bh | 543 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 569 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
bh | 570 | fs/sysv/namei.c | if (bh) { |
bh | 574 | fs/sysv/namei.c | brelse(bh); |
bh | 578 | fs/sysv/namei.c | i = sysv_add_entry(dir, name, len, &bh, &de); |
bh | 587 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 588 | fs/sysv/namei.c | brelse(bh); |
bh | 598 | fs/sysv/namei.c | struct buffer_head * bh; |
bh | 610 | fs/sysv/namei.c | bh = sysv_find_entry(dir,name,len,&de); |
bh | 611 | fs/sysv/namei.c | if (bh) { |
bh | 612 | fs/sysv/namei.c | brelse(bh); |
bh | 617 | fs/sysv/namei.c | error = sysv_add_entry(dir, name, len, &bh, &de); |
bh | 624 | fs/sysv/namei.c | mark_buffer_dirty(bh, 1); |
bh | 625 | fs/sysv/namei.c | brelse(bh); |
bh | 55 | fs/sysv/symlink.c | struct buffer_head * bh; |
bh | 76 | fs/sysv/symlink.c | if (!(bh = sysv_file_bread(inode, 0, 0))) { /* is reading 1 block enough ?? */ |
bh | 83 | fs/sysv/symlink.c | error = open_namei(bh->b_data,flag,mode,res_inode,dir); |
bh | 85 | fs/sysv/symlink.c | brelse(bh); |
bh | 91 | fs/sysv/symlink.c | struct buffer_head * bh; |
bh | 102 | fs/sysv/symlink.c | bh = sysv_file_bread(inode, 0, 0); |
bh | 104 | fs/sysv/symlink.c | if (!bh) |
bh | 106 | fs/sysv/symlink.c | bh_data = bh->b_data; |
bh | 112 | fs/sysv/symlink.c | brelse(bh); |
bh | 50 | fs/sysv/truncate.c | struct buffer_head * bh; |
bh | 60 | fs/sysv/truncate.c | bh = sv_get_hash_table(sb, inode->i_dev, block); |
bh | 62 | fs/sysv/truncate.c | brelse(bh); |
bh | 65 | fs/sysv/truncate.c | if ((bh && bh->b_count != 1) || (block != *p)) { |
bh | 67 | fs/sysv/truncate.c | brelse(bh); |
bh | 72 | fs/sysv/truncate.c | brelse(bh); |
bh | 86 | fs/sysv/truncate.c | struct buffer_head * bh; |
bh | 117 | fs/sysv/truncate.c | bh = sv_get_hash_table(sb, inode->i_dev, block); |
bh | 119 | fs/sysv/truncate.c | brelse(bh); |
bh | 122 | fs/sysv/truncate.c | if ((bh && bh->b_count != 1) || (tmp != *ind)) { |
bh | 124 | fs/sysv/truncate.c | brelse(bh); |
bh | 129 | 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 | 43 | fs/xiafs/bitmap.c | bmap=(u_long *)bh->b_data; |
bh | 65 | fs/xiafs/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 69 | fs/xiafs/bitmap.c | static void clear_buf(struct buffer_head * bh) |
bh | 74 | fs/xiafs/bitmap.c | lp=(long *)bh->b_data; |
bh | 75 | fs/xiafs/bitmap.c | for (i= bh->b_size >> 2; i-- > 0; ) |
bh | 176 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 199 | fs/xiafs/bitmap.c | bh = get__map_zone(sb, bmap_buf, bznr, cache, first_zone, |
bh | 201 | fs/xiafs/bitmap.c | if (!bh) |
bh | 203 | fs/xiafs/bitmap.c | tmp=find_first_zero(bh, start_bit, end_bit); |
bh | 220 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 232 | fs/xiafs/bitmap.c | bh = get_hash_table(sb->s_dev, d_addr, XIAFS_ZSIZE(sb)); |
bh | 233 | fs/xiafs/bitmap.c | if (bh) |
bh | 234 | fs/xiafs/bitmap.c | bh->b_dirt=0; |
bh | 235 | fs/xiafs/bitmap.c | brelse(bh); |
bh | 237 | fs/xiafs/bitmap.c | bh = get_zmap_zone(sb, bit, NULL); |
bh | 238 | fs/xiafs/bitmap.c | if (!bh) |
bh | 241 | fs/xiafs/bitmap.c | if (!clear_bit(offset, bh->b_data)) |
bh | 245 | fs/xiafs/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 251 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 267 | fs/xiafs/bitmap.c | if (!(bh = getblk(sb->s_dev, tmp, XIAFS_ZSIZE(sb)))) { |
bh | 271 | fs/xiafs/bitmap.c | if (bh->b_count != 1) { |
bh | 275 | fs/xiafs/bitmap.c | clear_buf(bh); |
bh | 276 | fs/xiafs/bitmap.c | bh->b_uptodate = 1; |
bh | 277 | fs/xiafs/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 278 | fs/xiafs/bitmap.c | brelse(bh); |
bh | 284 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 297 | fs/xiafs/bitmap.c | bh = get_imap_zone(sb, ino, NULL); |
bh | 298 | fs/xiafs/bitmap.c | if (!bh) |
bh | 301 | fs/xiafs/bitmap.c | if (!clear_bit(ino & (XIAFS_BITS_PER_Z(sb)-1), bh->b_data)) |
bh | 305 | fs/xiafs/bitmap.c | mark_buffer_dirty(bh, 1); |
bh | 343 | fs/xiafs/bitmap.c | static u_long count_zone(struct buffer_head * bh) |
bh | 349 | fs/xiafs/bitmap.c | for (i=bh->b_size; i-- > 0; ) { |
bh | 350 | fs/xiafs/bitmap.c | tmp=bh->b_data[i]; |
bh | 358 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 365 | fs/xiafs/bitmap.c | bh=get_imap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), ¬_que); |
bh | 366 | fs/xiafs/bitmap.c | if (bh) { |
bh | 367 | fs/xiafs/bitmap.c | sum += count_zone(bh); |
bh | 377 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 384 | fs/xiafs/bitmap.c | bh=get_zmap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), ¬_que); |
bh | 385 | fs/xiafs/bitmap.c | if (bh) { |
bh | 386 | fs/xiafs/bitmap.c | sum += count_zone(bh); |
bh | 76 | fs/xiafs/dir.c | struct buffer_head * bh; |
bh | 86 | fs/xiafs/dir.c | bh = xiafs_bread(inode, filp->f_pos >> XIAFS_ZSIZE_BITS(inode->i_sb),0); |
bh | 87 | fs/xiafs/dir.c | if (!bh) { |
bh | 92 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (bh->b_data + i); |
bh | 98 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (offset + bh->b_data); |
bh | 103 | fs/xiafs/dir.c | (char *)de+de->d_rec_len > XIAFS_ZSIZE(inode->i_sb)+bh->b_data || |
bh | 108 | fs/xiafs/dir.c | brelse(bh); |
bh | 126 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (offset + bh->b_data); |
bh | 128 | fs/xiafs/dir.c | brelse(bh); |
bh | 198 | fs/xiafs/file.c | struct buffer_head * bh; |
bh | 219 | fs/xiafs/file.c | bh = xiafs_getblk(inode, pos >> XIAFS_ZSIZE_BITS(inode->i_sb), 1); |
bh | 220 | fs/xiafs/file.c | if (!bh) { |
bh | 228 | fs/xiafs/file.c | if (c != XIAFS_ZSIZE(inode->i_sb) && !bh->b_uptodate) { |
bh | 229 | fs/xiafs/file.c | ll_rw_block(READ, 1, &bh); |
bh | 230 | fs/xiafs/file.c | wait_on_buffer(bh); |
bh | 231 | fs/xiafs/file.c | if (!bh->b_uptodate) { |
bh | 232 | fs/xiafs/file.c | brelse(bh); |
bh | 238 | fs/xiafs/file.c | cp = (pos & (XIAFS_ZSIZE(inode->i_sb)-1)) + bh->b_data; |
bh | 247 | fs/xiafs/file.c | bh->b_uptodate = 1; |
bh | 248 | fs/xiafs/file.c | mark_buffer_dirty(bh, 0); |
bh | 249 | fs/xiafs/file.c | brelse(bh); |
bh | 35 | fs/xiafs/fsync.c | struct buffer_head * bh; |
bh | 41 | fs/xiafs/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
bh | 42 | fs/xiafs/fsync.c | if (!bh) |
bh | 45 | fs/xiafs/fsync.c | brelse (bh); |
bh | 48 | fs/xiafs/fsync.c | if (wait && bh->b_req && !bh->b_uptodate) { |
bh | 49 | fs/xiafs/fsync.c | brelse(bh); |
bh | 52 | fs/xiafs/fsync.c | if (wait || !bh->b_uptodate || !bh->b_dirt) |
bh | 54 | fs/xiafs/fsync.c | brelse(bh); |
bh | 57 | fs/xiafs/fsync.c | ll_rw_block(WRITE, 1, &bh); |
bh | 58 | fs/xiafs/fsync.c | bh->b_count--; |
bh | 63 | fs/xiafs/fsync.c | struct buffer_head **bh, int wait) |
bh | 67 | fs/xiafs/fsync.c | *bh = NULL; |
bh | 74 | fs/xiafs/fsync.c | *bh = bread(inode->i_dev, tmp, blocksize); |
bh | 76 | fs/xiafs/fsync.c | brelse(*bh); |
bh | 77 | fs/xiafs/fsync.c | *bh = NULL; |
bh | 80 | fs/xiafs/fsync.c | if (!*bh) |
bh | 71 | fs/xiafs/inode.c | struct buffer_head *bh; |
bh | 81 | fs/xiafs/inode.c | if (!(bh = bread(dev, 0, BLOCK_SIZE))) { |
bh | 88 | fs/xiafs/inode.c | sp = (struct xiafs_super_block *) bh->b_data; |
bh | 93 | fs/xiafs/inode.c | brelse(bh); |
bh | 105 | fs/xiafs/inode.c | brelse(bh); |
bh | 107 | fs/xiafs/inode.c | bh = bread (dev, 0, s->s_blocksize); |
bh | 108 | fs/xiafs/inode.c | if(!bh) { |
bh | 112 | fs/xiafs/inode.c | sp = (struct xiafs_super_block *) (((char *)bh->b_data) + BLOCK_SIZE) ; |
bh | 122 | fs/xiafs/inode.c | brelse(bh); |
bh | 190 | fs/xiafs/inode.c | static int zone_bmap(struct buffer_head * bh, int nr) |
bh | 194 | fs/xiafs/inode.c | if (!bh) |
bh | 196 | fs/xiafs/inode.c | tmp = ((u_long *) bh->b_data)[nr]; |
bh | 197 | fs/xiafs/inode.c | brelse(bh); |
bh | 280 | fs/xiafs/inode.c | indt_getblk(struct inode * inode, struct buffer_head * bh, |
bh | 287 | fs/xiafs/inode.c | if (!bh) |
bh | 289 | fs/xiafs/inode.c | if (!bh->b_uptodate) { |
bh | 290 | fs/xiafs/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 291 | fs/xiafs/inode.c | wait_on_buffer(bh); |
bh | 292 | fs/xiafs/inode.c | if (!bh->b_uptodate) { |
bh | 293 | fs/xiafs/inode.c | brelse(bh); |
bh | 297 | fs/xiafs/inode.c | lp = nr + (u_long *) bh->b_data; |
bh | 300 | fs/xiafs/inode.c | result = getblk(bh->b_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 302 | fs/xiafs/inode.c | brelse(bh); |
bh | 309 | fs/xiafs/inode.c | brelse(bh); |
bh | 314 | fs/xiafs/inode.c | brelse(bh); |
bh | 317 | fs/xiafs/inode.c | result = getblk(bh->b_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 325 | fs/xiafs/inode.c | mark_buffer_dirty(bh, 1); |
bh | 326 | fs/xiafs/inode.c | brelse(bh); |
bh | 332 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 350 | fs/xiafs/inode.c | bh = dt_getblk(inode, &(inode->u.xiafs_i.i_ind_zone), create, prev_addr); |
bh | 351 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone, create, prev_addr); |
bh | 352 | fs/xiafs/inode.c | return bh; |
bh | 355 | fs/xiafs/inode.c | bh = dt_getblk(inode, &(inode->u.xiafs_i.i_dind_zone), create, prev_addr); |
bh | 356 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone>>XIAFS_ADDRS_PER_Z_BITS(inode->i_sb), |
bh | 358 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone&(XIAFS_ADDRS_PER_Z(inode->i_sb)-1), |
bh | 360 | fs/xiafs/inode.c | return bh; |
bh | 365 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 367 | fs/xiafs/inode.c | bh = xiafs_getblk(inode, zone, create); |
bh | 368 | fs/xiafs/inode.c | if (!bh || bh->b_uptodate) |
bh | 369 | fs/xiafs/inode.c | return bh; |
bh | 370 | fs/xiafs/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 371 | fs/xiafs/inode.c | wait_on_buffer(bh); |
bh | 372 | fs/xiafs/inode.c | if (bh->b_uptodate) |
bh | 373 | fs/xiafs/inode.c | return bh; |
bh | 374 | fs/xiafs/inode.c | brelse(bh); |
bh | 380 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 395 | fs/xiafs/inode.c | if (!(bh=bread(inode->i_dev, zone, XIAFS_ZSIZE(inode->i_sb)))) { |
bh | 399 | fs/xiafs/inode.c | raw_inode = ((struct xiafs_inode *) bh->b_data) + |
bh | 420 | fs/xiafs/inode.c | brelse(bh); |
bh | 437 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 457 | fs/xiafs/inode.c | if (!(bh=bread(inode->i_dev, zone, XIAFS_ZSIZE(inode->i_sb)))) { |
bh | 462 | fs/xiafs/inode.c | raw_inode = ((struct xiafs_inode *)bh->b_data) + |
bh | 485 | fs/xiafs/inode.c | mark_buffer_dirty(bh, 1); |
bh | 486 | fs/xiafs/inode.c | return bh; |
bh | 492 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 493 | fs/xiafs/inode.c | bh = xiafs_update_inode(inode); |
bh | 494 | fs/xiafs/inode.c | brelse (bh); |
bh | 500 | fs/xiafs/inode.c | struct buffer_head *bh; |
bh | 502 | fs/xiafs/inode.c | bh = xiafs_update_inode(inode); |
bh | 503 | fs/xiafs/inode.c | if (bh && bh->b_dirt) |
bh | 505 | fs/xiafs/inode.c | ll_rw_block(WRITE, 1, &bh); |
bh | 506 | fs/xiafs/inode.c | wait_on_buffer(bh); |
bh | 507 | fs/xiafs/inode.c | if (bh->b_req && !bh->b_uptodate) |
bh | 514 | fs/xiafs/inode.c | else if (!bh) |
bh | 516 | fs/xiafs/inode.c | brelse (bh); |
bh | 65 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 80 | fs/xiafs/namei.c | bh = xiafs_bread(inode, i, 0); |
bh | 81 | fs/xiafs/namei.c | if (!bh) |
bh | 83 | fs/xiafs/namei.c | dep_pre=dep=(struct xiafs_direct *)bh->b_data; |
bh | 87 | fs/xiafs/namei.c | brelse(bh); |
bh | 94 | fs/xiafs/namei.c | dep->d_rec_len+(char *)dep > bh->b_data+XIAFS_ZSIZE(inode->i_sb) || |
bh | 97 | fs/xiafs/namei.c | brelse(bh); |
bh | 104 | fs/xiafs/namei.c | return bh; |
bh | 108 | fs/xiafs/namei.c | dep=(struct xiafs_direct *)(bh->b_data + pos); |
bh | 110 | fs/xiafs/namei.c | brelse(bh); |
bh | 124 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 133 | fs/xiafs/namei.c | if (!(bh = xiafs_find_entry(dir, name, len, &dep, NULL))) { |
bh | 138 | fs/xiafs/namei.c | brelse(bh); |
bh | 162 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 175 | fs/xiafs/namei.c | bh = xiafs_bread(dir, pos >> XIAFS_ZSIZE_BITS(dir->i_sb), pos ? 1:0); |
bh | 176 | fs/xiafs/namei.c | if (!bh) |
bh | 178 | fs/xiafs/namei.c | de_pre=de=(struct xiafs_direct *)bh->b_data; |
bh | 183 | fs/xiafs/namei.c | brelse(bh); |
bh | 187 | fs/xiafs/namei.c | de_pre=de=(struct xiafs_direct *)(bh->b_data+12); |
bh | 201 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(dir->i_sb) || |
bh | 205 | fs/xiafs/namei.c | brelse(bh); |
bh | 228 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 232 | fs/xiafs/namei.c | return bh; |
bh | 236 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
bh | 238 | fs/xiafs/namei.c | brelse(bh); |
bh | 252 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 266 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 267 | fs/xiafs/namei.c | if (!bh) { |
bh | 275 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 276 | fs/xiafs/namei.c | brelse(bh); |
bh | 285 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 290 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
bh | 291 | fs/xiafs/namei.c | if (bh) { |
bh | 292 | fs/xiafs/namei.c | brelse(bh); |
bh | 323 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 324 | fs/xiafs/namei.c | if (!bh) { |
bh | 332 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 333 | fs/xiafs/namei.c | brelse(bh); |
bh | 342 | fs/xiafs/namei.c | struct buffer_head * bh, *dir_block; |
bh | 345 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
bh | 346 | fs/xiafs/namei.c | if (bh) { |
bh | 347 | fs/xiafs/namei.c | brelse(bh); |
bh | 389 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 390 | fs/xiafs/namei.c | if (!bh) { |
bh | 397 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 402 | fs/xiafs/namei.c | brelse(bh); |
bh | 412 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 422 | fs/xiafs/namei.c | bh = xiafs_bread(inode, i, 0); |
bh | 424 | fs/xiafs/namei.c | if (!bh) { |
bh | 428 | fs/xiafs/namei.c | de=(struct xiafs_direct *)bh->b_data; |
bh | 432 | fs/xiafs/namei.c | brelse(bh); |
bh | 435 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(12 + bh->b_data); |
bh | 438 | fs/xiafs/namei.c | brelse(bh); |
bh | 445 | fs/xiafs/namei.c | if (!bh) |
bh | 448 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
bh | 451 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(inode->i_sb) || |
bh | 455 | fs/xiafs/namei.c | brelse(bh); |
bh | 459 | fs/xiafs/namei.c | brelse(bh); |
bh | 464 | fs/xiafs/namei.c | brelse(bh); |
bh | 493 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 497 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
bh | 499 | fs/xiafs/namei.c | if (!bh) |
bh | 527 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 537 | fs/xiafs/namei.c | brelse(bh); |
bh | 545 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 551 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
bh | 552 | fs/xiafs/namei.c | if (!bh) |
bh | 561 | fs/xiafs/namei.c | brelse(bh); |
bh | 575 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 582 | fs/xiafs/namei.c | brelse(bh); |
bh | 593 | fs/xiafs/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 597 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len, &de, NULL); |
bh | 598 | fs/xiafs/namei.c | if (bh) { |
bh | 599 | fs/xiafs/namei.c | brelse(bh); |
bh | 624 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 625 | fs/xiafs/namei.c | if (!bh) { |
bh | 633 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 634 | fs/xiafs/namei.c | brelse(bh); |
bh | 644 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 656 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, NULL); |
bh | 657 | fs/xiafs/namei.c | if (bh) { |
bh | 658 | fs/xiafs/namei.c | brelse(bh); |
bh | 663 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 664 | fs/xiafs/namei.c | if (!bh) { |
bh | 670 | fs/xiafs/namei.c | mark_buffer_dirty(bh, 1); |
bh | 671 | fs/xiafs/namei.c | brelse(bh); |
bh | 53 | fs/xiafs/symlink.c | struct buffer_head * bh; |
bh | 63 | fs/xiafs/symlink.c | bh = xiafs_bread(inode, 0, 0); |
bh | 69 | fs/xiafs/symlink.c | if (!bh) |
bh | 71 | fs/xiafs/symlink.c | for (i=0; i < buflen && (c=bh->b_data[i]); i++) |
bh | 75 | fs/xiafs/symlink.c | brelse(bh); |
bh | 83 | fs/xiafs/symlink.c | struct buffer_head * bh; |
bh | 108 | fs/xiafs/symlink.c | if (!(bh = xiafs_bread(inode, 0, 0))) { |
bh | 115 | fs/xiafs/symlink.c | error = open_namei(bh->b_data,flag,mode,res_inode,dir); |
bh | 117 | fs/xiafs/symlink.c | brelse(bh); |
bh | 45 | fs/xiafs/truncate.c | struct buffer_head * bh; |
bh | 56 | fs/xiafs/truncate.c | bh = getblk(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 58 | fs/xiafs/truncate.c | brelse(bh); |
bh | 61 | fs/xiafs/truncate.c | if ((bh && bh->b_count != 1) || tmp != *lp) |
bh | 69 | fs/xiafs/truncate.c | brelse(bh); |
bh | 79 | fs/xiafs/truncate.c | struct buffer_head * bh, * ind_bh; |
bh | 102 | fs/xiafs/truncate.c | bh = getblk(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 104 | fs/xiafs/truncate.c | brelse(bh); |
bh | 107 | fs/xiafs/truncate.c | if ((bh && bh->b_count != 1) || tmp != *indp) |
bh | 115 | fs/xiafs/truncate.c | brelse(bh); |
bh | 23 | include/linux/blkdev.h | struct buffer_head * bh; |
bh | 441 | include/linux/fs.h | extern inline void mark_buffer_clean(struct buffer_head * bh) |
bh | 443 | include/linux/fs.h | if(bh->b_dirt) { |
bh | 444 | include/linux/fs.h | bh->b_dirt = 0; |
bh | 445 | include/linux/fs.h | if(bh->b_list == BUF_DIRTY) refile_buffer(bh); |
bh | 449 | include/linux/fs.h | extern inline void mark_buffer_dirty(struct buffer_head * bh, int flag) |
bh | 451 | include/linux/fs.h | if(!bh->b_dirt) { |
bh | 452 | include/linux/fs.h | bh->b_dirt = 1; |
bh | 453 | include/linux/fs.h | set_writetime(bh, flag); |
bh | 454 | include/linux/fs.h | if(bh->b_list != BUF_DIRTY) refile_buffer(bh); |
bh | 486 | include/linux/fs.h | extern void ll_rw_block(int rw, int nr, struct buffer_head * bh[]); |
bh | 202 | 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 | 125 | include/linux/msdos_fs.h | extern int msdos_get_entry(struct inode *dir,loff_t *pos,struct buffer_head **bh, |
bh | 38 | kernel/softirq.c | struct bh_struct *bh; |
bh | 40 | kernel/softirq.c | bh = bh_base; |
bh | 42 | kernel/softirq.c | for (mask = 1, left = ~0 ; left & active ; bh++,mask += mask,left += left) { |
bh | 46 | kernel/softirq.c | fn = bh->routine; |
bh | 49 | kernel/softirq.c | fn(bh->data); |
bh | 68 | mm/filemap.c | struct buffer_head * bh; |
bh | 70 | mm/filemap.c | bh = buffer_pages[MAP_NR(page)]; |
bh | 71 | mm/filemap.c | if (bh) { |
bh | 73 | mm/filemap.c | struct buffer_head * tmp = bh; |
bh | 77 | mm/filemap.c | } while (tmp != bh); |
bh | 590 | mm/swap.c | struct buffer_head * bh; |
bh | 592 | mm/swap.c | bh = buffer_pages[MAP_NR(addr)]; |
bh | 593 | mm/swap.c | if (bh) { |
bh | 594 | mm/swap.c | struct buffer_head *tmp = bh; |
bh | 599 | mm/swap.c | } while (tmp != bh); |