tag | line | file | source code |
bh | 36 | drivers/block/blk.h | struct buffer_head * bh; |
bh | 238 | drivers/block/blk.h | struct buffer_head * bh; |
bh | 253 | drivers/block/blk.h | if ((bh = req->bh) != NULL) { |
bh | 254 | drivers/block/blk.h | req->bh = bh->b_reqnext; |
bh | 255 | drivers/block/blk.h | bh->b_reqnext = NULL; |
bh | 256 | drivers/block/blk.h | bh->b_uptodate = uptodate; |
bh | 257 | drivers/block/blk.h | unlock_buffer(bh); |
bh | 258 | drivers/block/blk.h | if ((bh = req->bh) != NULL) { |
bh | 259 | drivers/block/blk.h | req->current_nr_sectors = bh->b_size >> 9; |
bh | 264 | drivers/block/blk.h | req->buffer = bh->b_data; |
bh | 294 | drivers/block/blk.h | if (CURRENT->bh) { \ |
bh | 295 | drivers/block/blk.h | if (!CURRENT->bh->b_lock) \ |
bh | 392 | drivers/block/floppy.c | int floppy_change(struct buffer_head * bh) |
bh | 394 | drivers/block/floppy.c | unsigned int mask = 1 << (bh->b_dev & 0x03); |
bh | 396 | drivers/block/floppy.c | if (MAJOR(bh->b_dev) != MAJOR_NR) { |
bh | 413 | drivers/block/floppy.c | if (!bh) |
bh | 415 | drivers/block/floppy.c | if (bh->b_dirt) |
bh | 416 | drivers/block/floppy.c | ll_rw_block(WRITE, 1, &bh); |
bh | 419 | drivers/block/floppy.c | bh->b_uptodate = 0; |
bh | 420 | drivers/block/floppy.c | ll_rw_block(READ, 1, &bh); |
bh | 423 | drivers/block/floppy.c | while (bh->b_lock) |
bh | 424 | drivers/block/floppy.c | sleep_on(&bh->b_wait); |
bh | 1016 | drivers/block/floppy.c | if (CURRENT->bh) { |
bh | 1017 | drivers/block/floppy.c | if (!CURRENT->bh->b_lock) |
bh | 38 | drivers/block/genhd.c | struct buffer_head *bh; |
bh | 49 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) |
bh | 55 | drivers/block/genhd.c | bh->b_dirt=0; |
bh | 56 | drivers/block/genhd.c | bh->b_uptodate=0; |
bh | 57 | drivers/block/genhd.c | if (*(unsigned short *) (bh->b_data+510) == 0xAA55) { |
bh | 58 | drivers/block/genhd.c | p = (struct partition *) (0x1BE + bh->b_data); |
bh | 85 | drivers/block/genhd.c | brelse(bh); |
bh | 90 | drivers/block/genhd.c | brelse(bh); |
bh | 97 | drivers/block/genhd.c | struct buffer_head *bh; |
bh | 106 | drivers/block/genhd.c | if (!(bh = bread(dev,0,1024))) { |
bh | 112 | drivers/block/genhd.c | if (*(unsigned short *) (bh->b_data+510) == 0xAA55) { |
bh | 113 | drivers/block/genhd.c | p = (struct partition *) (0x1BE + bh->b_data); |
bh | 130 | drivers/block/genhd.c | if (*(unsigned short *) (bh->b_data+0xfc) == 0x55AA) { |
bh | 131 | drivers/block/genhd.c | p = (struct partition *) (0x1BE + bh->b_data); |
bh | 148 | drivers/block/genhd.c | brelse(bh); |
bh | 353 | drivers/block/hd.c | if (!i || (CURRENT->bh && !SUBSECTOR(i))) |
bh | 397 | drivers/block/hd.c | if (!i || (CURRENT->bh && !SUBSECTOR(i))) |
bh | 153 | drivers/block/ll_rw_blk.c | if (req->bh) |
bh | 154 | drivers/block/ll_rw_blk.c | req->bh->b_dirt = 0; |
bh | 177 | drivers/block/ll_rw_blk.c | static void make_request(int major,int rw, struct buffer_head * bh) |
bh | 187 | drivers/block/ll_rw_blk.c | if (bh->b_lock) |
bh | 198 | drivers/block/ll_rw_blk.c | count = bh->b_size >> 9; |
bh | 199 | drivers/block/ll_rw_blk.c | sector = bh->b_blocknr * count; |
bh | 201 | drivers/block/ll_rw_blk.c | if (blk_size[major][MINOR(bh->b_dev)] < (sector + count)>>1) { |
bh | 202 | drivers/block/ll_rw_blk.c | bh->b_dirt = bh->b_uptodate = 0; |
bh | 205 | drivers/block/ll_rw_blk.c | lock_buffer(bh); |
bh | 206 | drivers/block/ll_rw_blk.c | if ((rw == WRITE && !bh->b_dirt) || (rw == READ && bh->b_uptodate)) { |
bh | 207 | drivers/block/ll_rw_blk.c | unlock_buffer(bh); |
bh | 234 | drivers/block/ll_rw_blk.c | if (req->dev == bh->b_dev && |
bh | 240 | drivers/block/ll_rw_blk.c | req->bhtail->b_reqnext = bh; |
bh | 241 | drivers/block/ll_rw_blk.c | req->bhtail = bh; |
bh | 243 | drivers/block/ll_rw_blk.c | bh->b_dirt = 0; |
bh | 248 | drivers/block/ll_rw_blk.c | if (req->dev == bh->b_dev && |
bh | 255 | drivers/block/ll_rw_blk.c | bh->b_reqnext = req->bh; |
bh | 256 | drivers/block/ll_rw_blk.c | req->buffer = bh->b_data; |
bh | 259 | drivers/block/ll_rw_blk.c | bh->b_dirt = 0; |
bh | 260 | drivers/block/ll_rw_blk.c | req->bh = bh; |
bh | 270 | drivers/block/ll_rw_blk.c | req = get_request(max_req, bh->b_dev); |
bh | 276 | drivers/block/ll_rw_blk.c | unlock_buffer(bh); |
bh | 293 | drivers/block/ll_rw_blk.c | req->buffer = bh->b_data; |
bh | 295 | drivers/block/ll_rw_blk.c | req->bh = bh; |
bh | 296 | drivers/block/ll_rw_blk.c | req->bhtail = bh; |
bh | 327 | drivers/block/ll_rw_blk.c | req->bh = NULL; |
bh | 338 | drivers/block/ll_rw_blk.c | void ll_rw_block(int rw, int nr, struct buffer_head * bh[]) |
bh | 348 | drivers/block/ll_rw_blk.c | while (!*bh) { |
bh | 349 | drivers/block/ll_rw_blk.c | bh++; |
bh | 355 | drivers/block/ll_rw_blk.c | if ((major = MAJOR(bh[0]->b_dev)) < MAX_BLKDEV) |
bh | 360 | drivers/block/ll_rw_blk.c | (unsigned long) bh[0]->b_dev, bh[0]->b_blocknr); |
bh | 367 | drivers/block/ll_rw_blk.c | i = blksize_size[major][MINOR(bh[0]->b_dev)]; |
bh | 374 | drivers/block/ll_rw_blk.c | if (bh[i] && bh[i]->b_size != correct_size) { |
bh | 377 | drivers/block/ll_rw_blk.c | correct_size, bh[i]->b_size); |
bh | 382 | drivers/block/ll_rw_blk.c | if ((rw == WRITE || rw == WRITEA) && is_read_only(bh[0]->b_dev)) { |
bh | 383 | drivers/block/ll_rw_blk.c | printk("Can't write to read-only device 0x%X\n",bh[0]->b_dev); |
bh | 402 | drivers/block/ll_rw_blk.c | if (bh[i]) { |
bh | 403 | drivers/block/ll_rw_blk.c | bh[i]->b_req = 1; |
bh | 404 | drivers/block/ll_rw_blk.c | make_request(major, rw, bh[i]); |
bh | 417 | drivers/block/ll_rw_blk.c | if (bh[i]) |
bh | 418 | drivers/block/ll_rw_blk.c | bh[i]->b_dirt = bh[i]->b_uptodate = 0; |
bh | 458 | drivers/block/ll_rw_blk.c | req->bh = NULL; |
bh | 104 | drivers/block/ramdisk.c | struct buffer_head *bh; |
bh | 129 | drivers/block/ramdisk.c | bh = breada(ROOT_DEV,block+1,block,block+2,-1); |
bh | 130 | drivers/block/ramdisk.c | if (!bh) { |
bh | 137 | drivers/block/ramdisk.c | *((struct minix_super_block *) bh->b_data); |
bh | 138 | drivers/block/ramdisk.c | brelse(bh); |
bh | 157 | drivers/block/ramdisk.c | bh = breada(ROOT_DEV, block, block+1, block+2, -1); |
bh | 159 | drivers/block/ramdisk.c | bh = bread(ROOT_DEV, block, BLOCK_SIZE); |
bh | 160 | drivers/block/ramdisk.c | if (!bh) { |
bh | 165 | drivers/block/ramdisk.c | (void) memcpy(cp, bh->b_data, BLOCK_SIZE); |
bh | 166 | drivers/block/ramdisk.c | brelse(bh); |
bh | 526 | drivers/scsi/scsi.c | struct buffer_head * bh; |
bh | 550 | drivers/scsi/scsi.c | bh = req->bh; |
bh | 551 | drivers/scsi/scsi.c | if(!tablesize) bh = NULL; |
bh | 554 | drivers/scsi/scsi.c | while(req->nr_sectors && bh){ |
bh | 556 | drivers/scsi/scsi.c | req->nr_sectors -= bh->b_size >> 9; |
bh | 557 | drivers/scsi/scsi.c | req->sector += bh->b_size >> 9; |
bh | 559 | drivers/scsi/scsi.c | bh = bh->b_reqnext; |
bh | 561 | drivers/scsi/scsi.c | if(req->nr_sectors && bh && bh->b_reqnext){ /* Any leftovers? */ |
bh | 562 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
bh | 563 | drivers/scsi/scsi.c | req->bh = bh->b_reqnext; /* Divide request */ |
bh | 564 | drivers/scsi/scsi.c | bh->b_reqnext = NULL; |
bh | 565 | drivers/scsi/scsi.c | bh = req->bh; |
bh | 569 | drivers/scsi/scsi.c | req->current_nr_sectors = bh->b_size >> 9; |
bh | 570 | drivers/scsi/scsi.c | req->buffer = bh->b_data; |
bh | 601 | drivers/scsi/scsi.c | struct buffer_head * bh; |
bh | 647 | drivers/scsi/scsi.c | bh = req->bh; |
bh | 648 | drivers/scsi/scsi.c | if(!tablesize) bh = NULL; |
bh | 651 | drivers/scsi/scsi.c | while(req->nr_sectors && bh){ |
bh | 653 | drivers/scsi/scsi.c | req->nr_sectors -= bh->b_size >> 9; |
bh | 654 | drivers/scsi/scsi.c | req->sector += bh->b_size >> 9; |
bh | 656 | drivers/scsi/scsi.c | bh = bh->b_reqnext; |
bh | 658 | drivers/scsi/scsi.c | if(req->nr_sectors && bh && bh->b_reqnext){ /* Any leftovers? */ |
bh | 659 | drivers/scsi/scsi.c | SCpnt->request.bhtail = bh; |
bh | 660 | drivers/scsi/scsi.c | req->bh = bh->b_reqnext; /* Divide request */ |
bh | 661 | drivers/scsi/scsi.c | bh->b_reqnext = NULL; |
bh | 662 | drivers/scsi/scsi.c | bh = req->bh; |
bh | 665 | drivers/scsi/scsi.c | req->current_nr_sectors = bh->b_size >> 9; |
bh | 666 | drivers/scsi/scsi.c | req->buffer = bh->b_data; |
bh | 453 | drivers/scsi/scsi.h | struct buffer_head * bh; |
bh | 464 | drivers/scsi/scsi.h | if ((bh = req->bh) != NULL) { |
bh | 465 | drivers/scsi/scsi.h | req->bh = bh->b_reqnext; |
bh | 466 | drivers/scsi/scsi.h | req->nr_sectors -= bh->b_size >> 9; |
bh | 467 | drivers/scsi/scsi.h | req->sector += bh->b_size >> 9; |
bh | 468 | drivers/scsi/scsi.h | bh->b_reqnext = NULL; |
bh | 469 | drivers/scsi/scsi.h | bh->b_uptodate = uptodate; |
bh | 470 | drivers/scsi/scsi.h | unlock_buffer(bh); |
bh | 471 | drivers/scsi/scsi.h | sectors -= bh->b_size >> 9; |
bh | 472 | drivers/scsi/scsi.h | if ((bh = req->bh) != NULL) { |
bh | 473 | drivers/scsi/scsi.h | req->current_nr_sectors = bh->b_size >> 9; |
bh | 480 | drivers/scsi/scsi.h | } while(sectors && bh); |
bh | 481 | drivers/scsi/scsi.h | if (req->bh){ |
bh | 482 | drivers/scsi/scsi.h | req->buffer = bh->b_data; |
bh | 510 | drivers/scsi/scsi.h | if (CURRENT->bh) { \ |
bh | 511 | drivers/scsi/scsi.h | if (!CURRENT->bh->b_lock) \ |
bh | 50 | drivers/scsi/scsi_debug.c | if (bh){ \ |
bh | 51 | drivers/scsi/scsi_debug.c | if (bh->b_size != 1024) panic ("Wrong bh size"); \ |
bh | 52 | drivers/scsi/scsi_debug.c | if ((bh->b_blocknr << 1) + start != block) \ |
bh | 53 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",bh->b_blocknr, block); \ |
bh | 55 | drivers/scsi/scsi_debug.c | if (bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
bh | 75 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh){ \ |
bh | 76 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_size != 1024) panic ("Wrong bh size"); \ |
bh | 77 | drivers/scsi/scsi_debug.c | if ((SCpnt->request.bh->b_blocknr << 1) + start != block) \ |
bh | 78 | drivers/scsi/scsi_debug.c | { printk("Wrong bh block# %d %d ",SCpnt->request.bh->b_blocknr, block); \ |
bh | 80 | drivers/scsi/scsi_debug.c | if (SCpnt->request.bh->b_dev != SCpnt->request.dev) panic ("Bad bh target");\ |
bh | 142 | drivers/scsi/scsi_debug.c | struct buffer_head * bh = NULL; |
bh | 229 | drivers/scsi/scsi_debug.c | bh = SCpnt->request.bh; |
bh | 280 | drivers/scsi/scsi_debug.c | memcpy(buff+128, bh, sizeof(struct buffer_head)); |
bh | 282 | drivers/scsi/scsi_debug.c | bh = bh->b_reqnext; |
bh | 285 | drivers/scsi/scsi_debug.c | if(!bh) panic("Too few blocks for linked request."); |
bh | 292 | drivers/scsi/scsi_debug.c | if(bh) scsi_dump(SCpnt, 0); |
bh | 195 | drivers/scsi/sd.c | if (!SCpnt->request.bh) |
bh | 443 | drivers/scsi/sd.c | if (!SCpnt->request.bh || |
bh | 474 | drivers/scsi/sd.c | struct buffer_head * bh; |
bh | 477 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
bh | 481 | drivers/scsi/sd.c | while(bh && count < SCpnt->host->sg_tablesize) { |
bh | 482 | drivers/scsi/sd.c | if ((this_count + (bh->b_size >> 9)) > this_count_max) break; |
bh | 483 | drivers/scsi/sd.c | this_count += (bh->b_size >> 9); |
bh | 485 | drivers/scsi/sd.c | bh = bh->b_reqnext; |
bh | 501 | drivers/scsi/sd.c | bh = SCpnt->request.bh; |
bh | 502 | drivers/scsi/sd.c | for(count = 0, bh = SCpnt->request.bh; count < SCpnt->use_sg; |
bh | 503 | drivers/scsi/sd.c | count++, bh = bh->b_reqnext) { |
bh | 504 | drivers/scsi/sd.c | sgpnt[count].address = bh->b_data; |
bh | 506 | drivers/scsi/sd.c | sgpnt[count].length = bh->b_size; |
bh | 513 | drivers/scsi/sd.c | if(dma_free_sectors < (bh->b_size >> 9) + 5) { |
bh | 119 | drivers/scsi/sr.c | printk("sr.c done: %x %x\n",result, SCpnt->request.bh->b_data); |
bh | 137 | drivers/scsi/sr.c | SCpnt->request.bh && |
bh | 138 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext && |
bh | 139 | drivers/scsi/sr.c | SCpnt->request.bh->b_reqnext->b_size == 1024) { |
bh | 140 | drivers/scsi/sr.c | memcpy((char *)SCpnt->request.bh->b_reqnext->b_data, |
bh | 168 | drivers/scsi/sr.c | printk("(%x %x %x) ",SCpnt->request.bh, SCpnt->request.nr_sectors, |
bh | 174 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
bh | 423 | drivers/scsi/sr.c | struct buffer_head * bh; |
bh | 426 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
bh | 434 | drivers/scsi/sr.c | while(bh && count < SCpnt->host->sg_tablesize) { |
bh | 435 | drivers/scsi/sr.c | if ((this_count + (bh->b_size >> 9)) > this_count_max) break; |
bh | 436 | drivers/scsi/sr.c | this_count += (bh->b_size >> 9); |
bh | 438 | drivers/scsi/sr.c | bh = bh->b_reqnext; |
bh | 464 | drivers/scsi/sr.c | bh = SCpnt->request.bh; |
bh | 473 | drivers/scsi/sr.c | for(bh = SCpnt->request.bh; count < SCpnt->use_sg; |
bh | 474 | drivers/scsi/sr.c | count++, bh = bh->b_reqnext) { |
bh | 475 | drivers/scsi/sr.c | if (bh) { /* Need a placeholder at the end of the record? */ |
bh | 476 | drivers/scsi/sr.c | sgpnt[count].address = bh->b_data; |
bh | 477 | drivers/scsi/sr.c | sgpnt[count].length = bh->b_size; |
bh | 531 | drivers/scsi/sr.c | if (!SCpnt->request.bh) |
bh | 534 | drivers/scsi/sr.c | this_count = (SCpnt->request.bh->b_size >> 9); |
bh | 26 | fs/block_dev.c | struct buffer_head * bh; |
bh | 55 | fs/block_dev.c | bh = getblk(dev, block, blocksize); |
bh | 57 | fs/block_dev.c | bh = breada(dev,block,block+1,block+2,-1); |
bh | 59 | fs/block_dev.c | if (!bh) |
bh | 61 | fs/block_dev.c | p = offset + bh->b_data; |
bh | 69 | fs/block_dev.c | bh->b_uptodate = 1; |
bh | 70 | fs/block_dev.c | bh->b_dirt = 1; |
bh | 71 | fs/block_dev.c | brelse(bh); |
bh | 71 | fs/buffer.c | void __wait_on_buffer(struct buffer_head * bh) |
bh | 75 | fs/buffer.c | bh->b_count++; |
bh | 76 | fs/buffer.c | add_wait_queue(&bh->b_wait, &wait); |
bh | 79 | fs/buffer.c | if (bh->b_lock) { |
bh | 83 | fs/buffer.c | remove_wait_queue(&bh->b_wait, &wait); |
bh | 84 | fs/buffer.c | bh->b_count--; |
bh | 95 | fs/buffer.c | struct buffer_head * bh; |
bh | 104 | fs/buffer.c | bh = free_list; |
bh | 105 | fs/buffer.c | for (i = nr_buffers*2 ; i-- > 0 ; bh = bh->b_next_free) { |
bh | 106 | fs/buffer.c | if (dev && bh->b_dev != dev) |
bh | 109 | fs/buffer.c | if (bh->b_req && !bh->b_lock && |
bh | 110 | fs/buffer.c | !bh->b_dirt && !bh->b_uptodate) |
bh | 112 | fs/buffer.c | bh->b_blocknr, bh->b_dev); |
bh | 114 | fs/buffer.c | if (bh->b_lock) |
bh | 122 | fs/buffer.c | wait_on_buffer (bh); |
bh | 126 | fs/buffer.c | if (wait && bh->b_req && !bh->b_lock && |
bh | 127 | fs/buffer.c | !bh->b_dirt && !bh->b_uptodate) |
bh | 134 | fs/buffer.c | if (!bh->b_dirt || pass>=2) |
bh | 136 | fs/buffer.c | bh->b_count++; |
bh | 137 | fs/buffer.c | ll_rw_block(WRITE, 1, &bh); |
bh | 138 | fs/buffer.c | bh->b_count--; |
bh | 194 | fs/buffer.c | struct buffer_head * bh; |
bh | 196 | fs/buffer.c | bh = free_list; |
bh | 197 | fs/buffer.c | for (i = nr_buffers*2 ; --i > 0 ; bh = bh->b_next_free) { |
bh | 198 | fs/buffer.c | if (bh->b_dev != dev) |
bh | 200 | fs/buffer.c | wait_on_buffer(bh); |
bh | 201 | fs/buffer.c | if (bh->b_dev == dev) |
bh | 202 | fs/buffer.c | bh->b_uptodate = bh->b_dirt = bh->b_req = 0; |
bh | 223 | fs/buffer.c | struct buffer_head * bh; |
bh | 227 | fs/buffer.c | if (!(bh = getblk(dev,0,1024))) |
bh | 229 | fs/buffer.c | i = floppy_change(bh); |
bh | 230 | fs/buffer.c | brelse(bh); |
bh | 282 | fs/buffer.c | static inline void remove_from_hash_queue(struct buffer_head * bh) |
bh | 284 | fs/buffer.c | if (bh->b_next) |
bh | 285 | fs/buffer.c | bh->b_next->b_prev = bh->b_prev; |
bh | 286 | fs/buffer.c | if (bh->b_prev) |
bh | 287 | fs/buffer.c | bh->b_prev->b_next = bh->b_next; |
bh | 288 | fs/buffer.c | if (hash(bh->b_dev,bh->b_blocknr) == bh) |
bh | 289 | fs/buffer.c | hash(bh->b_dev,bh->b_blocknr) = bh->b_next; |
bh | 290 | fs/buffer.c | bh->b_next = bh->b_prev = NULL; |
bh | 293 | fs/buffer.c | static inline void remove_from_free_list(struct buffer_head * bh) |
bh | 295 | fs/buffer.c | if (!(bh->b_prev_free) || !(bh->b_next_free)) |
bh | 297 | fs/buffer.c | bh->b_prev_free->b_next_free = bh->b_next_free; |
bh | 298 | fs/buffer.c | bh->b_next_free->b_prev_free = bh->b_prev_free; |
bh | 299 | fs/buffer.c | if (free_list == bh) |
bh | 300 | fs/buffer.c | free_list = bh->b_next_free; |
bh | 301 | fs/buffer.c | bh->b_next_free = bh->b_prev_free = NULL; |
bh | 304 | fs/buffer.c | static inline void remove_from_queues(struct buffer_head * bh) |
bh | 306 | fs/buffer.c | remove_from_hash_queue(bh); |
bh | 307 | fs/buffer.c | remove_from_free_list(bh); |
bh | 310 | fs/buffer.c | static inline void put_first_free(struct buffer_head * bh) |
bh | 312 | fs/buffer.c | if (!bh || (bh == free_list)) |
bh | 314 | fs/buffer.c | remove_from_free_list(bh); |
bh | 316 | fs/buffer.c | bh->b_next_free = free_list; |
bh | 317 | fs/buffer.c | bh->b_prev_free = free_list->b_prev_free; |
bh | 318 | fs/buffer.c | free_list->b_prev_free->b_next_free = bh; |
bh | 319 | fs/buffer.c | free_list->b_prev_free = bh; |
bh | 320 | fs/buffer.c | free_list = bh; |
bh | 323 | fs/buffer.c | static inline void put_last_free(struct buffer_head * bh) |
bh | 325 | fs/buffer.c | if (!bh) |
bh | 327 | fs/buffer.c | if (bh == free_list) { |
bh | 328 | fs/buffer.c | free_list = bh->b_next_free; |
bh | 331 | fs/buffer.c | remove_from_free_list(bh); |
bh | 333 | fs/buffer.c | bh->b_next_free = free_list; |
bh | 334 | fs/buffer.c | bh->b_prev_free = free_list->b_prev_free; |
bh | 335 | fs/buffer.c | free_list->b_prev_free->b_next_free = bh; |
bh | 336 | fs/buffer.c | free_list->b_prev_free = bh; |
bh | 339 | fs/buffer.c | static inline void insert_into_queues(struct buffer_head * bh) |
bh | 342 | fs/buffer.c | bh->b_next_free = free_list; |
bh | 343 | fs/buffer.c | bh->b_prev_free = free_list->b_prev_free; |
bh | 344 | fs/buffer.c | free_list->b_prev_free->b_next_free = bh; |
bh | 345 | fs/buffer.c | free_list->b_prev_free = bh; |
bh | 347 | fs/buffer.c | bh->b_prev = NULL; |
bh | 348 | fs/buffer.c | bh->b_next = NULL; |
bh | 349 | fs/buffer.c | if (!bh->b_dev) |
bh | 351 | fs/buffer.c | bh->b_next = hash(bh->b_dev,bh->b_blocknr); |
bh | 352 | fs/buffer.c | hash(bh->b_dev,bh->b_blocknr) = bh; |
bh | 353 | fs/buffer.c | if (bh->b_next) |
bh | 354 | fs/buffer.c | bh->b_next->b_prev = bh; |
bh | 382 | fs/buffer.c | struct buffer_head * bh; |
bh | 385 | fs/buffer.c | if (!(bh=find_buffer(dev,block,size))) |
bh | 387 | fs/buffer.c | bh->b_count++; |
bh | 388 | fs/buffer.c | wait_on_buffer(bh); |
bh | 389 | fs/buffer.c | if (bh->b_dev == dev && bh->b_blocknr == block && bh->b_size == size) |
bh | 390 | fs/buffer.c | return bh; |
bh | 391 | fs/buffer.c | bh->b_count--; |
bh | 398 | fs/buffer.c | struct buffer_head * bh, *bhnext; |
bh | 420 | fs/buffer.c | bh = free_list; |
bh | 421 | fs/buffer.c | for (i = nr_buffers*2 ; --i > 0 ; bh = bhnext) { |
bh | 422 | fs/buffer.c | bhnext = bh->b_next_free; |
bh | 423 | fs/buffer.c | if (bh->b_dev != dev) |
bh | 425 | fs/buffer.c | if (bh->b_size == size) |
bh | 428 | fs/buffer.c | wait_on_buffer(bh); |
bh | 429 | fs/buffer.c | if (bh->b_dev == dev && bh->b_size != size) |
bh | 430 | fs/buffer.c | bh->b_uptodate = bh->b_dirt = 0; |
bh | 431 | fs/buffer.c | remove_from_hash_queue(bh); |
bh | 446 | fs/buffer.c | #define BADNESS(bh) (((bh)->b_dirt<<1)+(bh)->b_lock) |
bh | 449 | fs/buffer.c | struct buffer_head * bh, * tmp; |
bh | 454 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
bh | 455 | fs/buffer.c | if (bh) { |
bh | 456 | fs/buffer.c | if (bh->b_uptodate && !bh->b_dirt) |
bh | 457 | fs/buffer.c | put_last_free(bh); |
bh | 458 | fs/buffer.c | return bh; |
bh | 466 | fs/buffer.c | bh = NULL; |
bh | 473 | fs/buffer.c | if (!bh || BADNESS(tmp)<BADNESS(bh)) { |
bh | 474 | fs/buffer.c | bh = tmp; |
bh | 487 | fs/buffer.c | if (!bh && nr_free_pages > 5) { |
bh | 493 | fs/buffer.c | if (!bh) { |
bh | 498 | fs/buffer.c | wait_on_buffer(bh); |
bh | 499 | fs/buffer.c | if (bh->b_count || bh->b_size != size) |
bh | 501 | fs/buffer.c | if (bh->b_dirt) { |
bh | 511 | fs/buffer.c | bh->b_count=1; |
bh | 512 | fs/buffer.c | bh->b_dirt=0; |
bh | 513 | fs/buffer.c | bh->b_uptodate=0; |
bh | 514 | fs/buffer.c | bh->b_req=0; |
bh | 515 | fs/buffer.c | remove_from_queues(bh); |
bh | 516 | fs/buffer.c | bh->b_dev=dev; |
bh | 517 | fs/buffer.c | bh->b_blocknr=block; |
bh | 518 | fs/buffer.c | insert_into_queues(bh); |
bh | 519 | fs/buffer.c | return bh; |
bh | 542 | fs/buffer.c | struct buffer_head * bh; |
bh | 544 | fs/buffer.c | if (!(bh = getblk(dev, block, size))) { |
bh | 549 | fs/buffer.c | if (bh->b_uptodate) |
bh | 550 | fs/buffer.c | return bh; |
bh | 551 | fs/buffer.c | ll_rw_block(READ, 1, &bh); |
bh | 552 | fs/buffer.c | wait_on_buffer(bh); |
bh | 553 | fs/buffer.c | if (bh->b_uptodate) |
bh | 554 | fs/buffer.c | return bh; |
bh | 555 | fs/buffer.c | brelse(bh); |
bh | 568 | fs/buffer.c | struct buffer_head * bh, *tmp; |
bh | 576 | fs/buffer.c | if (!(bh = getblk(dev, first, blocksize))) { |
bh | 581 | fs/buffer.c | if (!bh->b_uptodate) |
bh | 582 | fs/buffer.c | ll_rw_block(READ, 1, &bh); |
bh | 592 | fs/buffer.c | wait_on_buffer(bh); |
bh | 593 | fs/buffer.c | if (bh->b_uptodate) |
bh | 594 | fs/buffer.c | return bh; |
bh | 595 | fs/buffer.c | brelse(bh); |
bh | 602 | fs/buffer.c | static void put_unused_buffer_head(struct buffer_head * bh) |
bh | 606 | fs/buffer.c | wait = ((volatile struct buffer_head *) bh)->b_wait; |
bh | 607 | fs/buffer.c | memset((void *) bh,0,sizeof(*bh)); |
bh | 608 | fs/buffer.c | ((volatile struct buffer_head *) bh)->b_wait = wait; |
bh | 609 | fs/buffer.c | bh->b_next_free = unused_list; |
bh | 610 | fs/buffer.c | unused_list = bh; |
bh | 616 | fs/buffer.c | struct buffer_head * bh; |
bh | 621 | fs/buffer.c | if(! (bh = (struct buffer_head*) get_free_page(GFP_BUFFER))) |
bh | 624 | fs/buffer.c | for (nr_buffer_heads+=i=PAGE_SIZE/sizeof*bh ; i>0; i--) { |
bh | 625 | fs/buffer.c | bh->b_next_free = unused_list; /* only make link */ |
bh | 626 | fs/buffer.c | unused_list = bh++; |
bh | 632 | fs/buffer.c | struct buffer_head * bh; |
bh | 637 | fs/buffer.c | bh = unused_list; |
bh | 638 | fs/buffer.c | unused_list = bh->b_next_free; |
bh | 639 | fs/buffer.c | bh->b_next_free = NULL; |
bh | 640 | fs/buffer.c | bh->b_data = NULL; |
bh | 641 | fs/buffer.c | bh->b_size = 0; |
bh | 642 | fs/buffer.c | bh->b_req = 0; |
bh | 643 | fs/buffer.c | return bh; |
bh | 654 | fs/buffer.c | struct buffer_head *bh, *head; |
bh | 660 | fs/buffer.c | bh = get_unused_buffer_head(); |
bh | 661 | fs/buffer.c | if (!bh) |
bh | 663 | fs/buffer.c | bh->b_this_page = head; |
bh | 664 | fs/buffer.c | head = bh; |
bh | 665 | fs/buffer.c | bh->b_data = (char *) (page+offset); |
bh | 666 | fs/buffer.c | bh->b_size = size; |
bh | 673 | fs/buffer.c | bh = head; |
bh | 674 | fs/buffer.c | while (bh) { |
bh | 675 | fs/buffer.c | head = bh; |
bh | 676 | fs/buffer.c | bh = bh->b_this_page; |
bh | 682 | fs/buffer.c | static void read_buffers(struct buffer_head * bh[], int nrbuf) |
bh | 689 | fs/buffer.c | if (bh[i] && !bh[i]->b_uptodate) |
bh | 690 | fs/buffer.c | bhr[bhnum++] = bh[i]; |
bh | 695 | fs/buffer.c | if (bh[i]) { |
bh | 696 | fs/buffer.c | wait_on_buffer(bh[i]); |
bh | 704 | fs/buffer.c | struct buffer_head * bh[8]; |
bh | 716 | fs/buffer.c | bh[0] = first; |
bh | 725 | fs/buffer.c | bh[nrbuf++] = first; |
bh | 729 | fs/buffer.c | read_buffers(bh,nrbuf); /* make sure they are actually read correctly */ |
bh | 731 | fs/buffer.c | brelse(bh[nrbuf]); |
bh | 737 | fs/buffer.c | brelse(bh[nrbuf]); |
bh | 745 | fs/buffer.c | struct buffer_head * bh, * tmp, * arr[8]; |
bh | 750 | fs/buffer.c | bh = create_buffers(address, size); |
bh | 751 | fs/buffer.c | if (!bh) |
bh | 764 | fs/buffer.c | tmp = bh; |
bh | 768 | fs/buffer.c | arr[block++] = bh; |
bh | 769 | fs/buffer.c | bh->b_count = 1; |
bh | 770 | fs/buffer.c | bh->b_dirt = 0; |
bh | 771 | fs/buffer.c | bh->b_uptodate = 0; |
bh | 772 | fs/buffer.c | bh->b_dev = dev; |
bh | 773 | fs/buffer.c | bh->b_blocknr = *(p++); |
bh | 775 | fs/buffer.c | insert_into_queues(bh); |
bh | 776 | fs/buffer.c | if (bh->b_this_page) |
bh | 777 | fs/buffer.c | bh = bh->b_this_page; |
bh | 782 | fs/buffer.c | bh->b_this_page = tmp; |
bh | 790 | fs/buffer.c | while ((tmp = bh) != NULL) { |
bh | 791 | fs/buffer.c | bh = bh->b_this_page; |
bh | 811 | fs/buffer.c | struct buffer_head * bh; |
bh | 817 | fs/buffer.c | bh = get_hash_table(dev, block, size); |
bh | 818 | fs/buffer.c | if (bh) |
bh | 819 | fs/buffer.c | return check_aligned(bh, address, dev, b, size); |
bh | 837 | fs/buffer.c | struct buffer_head * bh[8]; |
bh | 848 | fs/buffer.c | bh[i] = NULL; |
bh | 850 | fs/buffer.c | bh[i] = getblk(dev, b[i], size); |
bh | 852 | fs/buffer.c | read_buffers(bh,i); |
bh | 855 | fs/buffer.c | if (bh[i]) { |
bh | 856 | fs/buffer.c | if (bh[i]->b_uptodate) |
bh | 857 | fs/buffer.c | COPYBLK(size, (unsigned long) bh[i]->b_data,address); |
bh | 858 | fs/buffer.c | brelse(bh[i]); |
bh | 871 | fs/buffer.c | struct buffer_head *bh, *tmp; |
bh | 879 | fs/buffer.c | bh = create_buffers(page, size); |
bh | 880 | fs/buffer.c | if (!bh) { |
bh | 884 | fs/buffer.c | tmp = bh; |
bh | 902 | fs/buffer.c | tmp->b_this_page = bh; |
bh | 911 | fs/buffer.c | static int try_to_free(struct buffer_head * bh, struct buffer_head ** bhp) |
bh | 916 | fs/buffer.c | *bhp = bh; |
bh | 917 | fs/buffer.c | page = (unsigned long) bh->b_data; |
bh | 919 | fs/buffer.c | tmp = bh; |
bh | 926 | fs/buffer.c | } while (tmp != bh); |
bh | 927 | fs/buffer.c | tmp = bh; |
bh | 936 | fs/buffer.c | } while (tmp != bh); |
bh | 951 | fs/buffer.c | struct buffer_head *bh; |
bh | 956 | fs/buffer.c | bh = free_list; |
bh | 958 | fs/buffer.c | for ( ; i-- > 0 ; bh = bh->b_next_free) { |
bh | 959 | fs/buffer.c | if (bh->b_count || !bh->b_this_page) |
bh | 961 | fs/buffer.c | if (bh->b_lock) |
bh | 965 | fs/buffer.c | wait_on_buffer(bh); |
bh | 966 | fs/buffer.c | if (bh->b_dirt) { |
bh | 967 | fs/buffer.c | bh->b_count++; |
bh | 968 | fs/buffer.c | ll_rw_block(WRITEA, 1, &bh); |
bh | 969 | fs/buffer.c | bh->b_count--; |
bh | 972 | fs/buffer.c | if (try_to_free(bh, &bh)) |
bh | 69 | fs/ext/dir.c | struct buffer_head * bh; |
bh | 78 | fs/ext/dir.c | bh = ext_bread(inode,(filp->f_pos)>>BLOCK_SIZE_BITS,0); |
bh | 79 | fs/ext/dir.c | if (!bh) { |
bh | 83 | fs/ext/dir.c | de = (struct ext_dir_entry *) (offset + bh->b_data); |
bh | 108 | fs/ext/dir.c | brelse(bh); |
bh | 115 | fs/ext/dir.c | brelse(bh); |
bh | 200 | fs/ext/file.c | struct buffer_head * bh; |
bh | 221 | fs/ext/file.c | bh = ext_getblk(inode,pos/BLOCK_SIZE,1); |
bh | 222 | fs/ext/file.c | if (!bh) { |
bh | 230 | fs/ext/file.c | if (c != BLOCK_SIZE && !bh->b_uptodate) { |
bh | 231 | fs/ext/file.c | ll_rw_block(READ, 1, &bh); |
bh | 232 | fs/ext/file.c | wait_on_buffer(bh); |
bh | 233 | fs/ext/file.c | if (!bh->b_uptodate) { |
bh | 234 | fs/ext/file.c | brelse(bh); |
bh | 240 | fs/ext/file.c | p = (pos % BLOCK_SIZE) + bh->b_data; |
bh | 249 | fs/ext/file.c | bh->b_uptodate = 1; |
bh | 250 | fs/ext/file.c | bh->b_dirt = 1; |
bh | 251 | fs/ext/file.c | brelse(bh); |
bh | 49 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 62 | fs/ext/freelists.c | bh = get_hash_table(sb->s_dev, block, sb->s_blocksize); |
bh | 63 | fs/ext/freelists.c | if (bh) |
bh | 64 | fs/ext/freelists.c | bh->b_dirt=0; |
bh | 65 | fs/ext/freelists.c | brelse(bh); |
bh | 93 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 132 | fs/ext/freelists.c | if (!(bh=getblk(sb->s_dev, j, sb->s_blocksize))) { |
bh | 136 | fs/ext/freelists.c | clear_block(bh->b_data); |
bh | 137 | fs/ext/freelists.c | bh->b_uptodate = 1; |
bh | 138 | fs/ext/freelists.c | bh->b_dirt = 1; |
bh | 139 | fs/ext/freelists.c | brelse(bh); |
bh | 150 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 162 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
bh | 166 | fs/ext/freelists.c | efb = (struct ext_free_block *) bh->b_data; |
bh | 169 | fs/ext/freelists.c | brelse (bh); |
bh | 184 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 229 | fs/ext/freelists.c | if (!(bh = bread(dev, block, sb->s_blocksize))) |
bh | 231 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) bh->b_data) + |
bh | 236 | fs/ext/freelists.c | sb->u.ext_sb.s_firstfreeinodeblock = bh; |
bh | 310 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 329 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
bh | 333 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) bh->b_data) + |
bh | 337 | fs/ext/freelists.c | brelse (bh); |
bh | 33 | fs/ext/fsync.c | struct buffer_head * bh; |
bh | 39 | fs/ext/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
bh | 40 | fs/ext/fsync.c | if (!bh) |
bh | 43 | fs/ext/fsync.c | brelse (bh); |
bh | 46 | fs/ext/fsync.c | if (wait && bh->b_req && !bh->b_uptodate) { |
bh | 47 | fs/ext/fsync.c | brelse(bh); |
bh | 50 | fs/ext/fsync.c | if (wait || !bh->b_uptodate || !bh->b_dirt) |
bh | 52 | fs/ext/fsync.c | brelse(bh); |
bh | 55 | fs/ext/fsync.c | ll_rw_block(WRITE, 1, &bh); |
bh | 56 | fs/ext/fsync.c | bh->b_count--; |
bh | 61 | fs/ext/fsync.c | struct buffer_head **bh, int wait) |
bh | 65 | fs/ext/fsync.c | *bh = NULL; |
bh | 72 | fs/ext/fsync.c | *bh = bread(inode->i_dev, tmp, blocksize); |
bh | 74 | fs/ext/fsync.c | brelse(*bh); |
bh | 75 | fs/ext/fsync.c | *bh = NULL; |
bh | 78 | 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 | bh->b_dirt = 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 | bh->b_dirt = 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 | bh->b_dirt=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 | 92 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 105 | fs/ext/namei.c | bh = ext_bread(dir,0,0); |
bh | 106 | fs/ext/namei.c | if (!bh) |
bh | 113 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 115 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data) { |
bh | 116 | fs/ext/namei.c | brelse(bh); |
bh | 117 | fs/ext/namei.c | bh = NULL; |
bh | 118 | fs/ext/namei.c | bh = ext_bread(dir,offset>>BLOCK_SIZE_BITS,0); |
bh | 119 | fs/ext/namei.c | if (!bh) |
bh | 121 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 127 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
bh | 131 | fs/ext/namei.c | de = (struct ext_dir_entry *) (bh->b_data+BLOCK_SIZE); |
bh | 141 | fs/ext/namei.c | ((char *)de) + de->rec_len < BLOCK_SIZE+bh->b_data) |
bh | 146 | fs/ext/namei.c | return bh; |
bh | 153 | fs/ext/namei.c | brelse(bh); |
bh | 162 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 171 | fs/ext/namei.c | if (!(bh = ext_find_entry(dir,name,len,&de,NULL,NULL))) { |
bh | 176 | fs/ext/namei.c | brelse(bh); |
bh | 201 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 216 | fs/ext/namei.c | bh = ext_bread(dir,0,0); |
bh | 217 | fs/ext/namei.c | if (!bh) |
bh | 221 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 223 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data && offset < dir->i_size) { |
bh | 227 | fs/ext/namei.c | brelse(bh); |
bh | 228 | fs/ext/namei.c | bh = NULL; |
bh | 229 | fs/ext/namei.c | bh = ext_bread(dir,offset>>BLOCK_SIZE_BITS,0); |
bh | 230 | fs/ext/namei.c | if (!bh) |
bh | 232 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 252 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 254 | fs/ext/namei.c | brelse (bh); |
bh | 255 | fs/ext/namei.c | bh = NULL; |
bh | 259 | fs/ext/namei.c | bh = ext_bread(dir,offset>>BLOCK_SIZE_BITS,1); |
bh | 260 | fs/ext/namei.c | if (!bh) |
bh | 262 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 275 | fs/ext/namei.c | (((char *) de) + de->rec_len-1 >= BLOCK_SIZE+bh->b_data)) { |
bh | 279 | fs/ext/namei.c | brelse (bh); |
bh | 299 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 301 | fs/ext/namei.c | return bh; |
bh | 306 | fs/ext/namei.c | brelse(bh); |
bh | 314 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 328 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 329 | fs/ext/namei.c | if (!bh) { |
bh | 337 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 338 | fs/ext/namei.c | brelse(bh); |
bh | 347 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 352 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 353 | fs/ext/namei.c | if (bh) { |
bh | 354 | fs/ext/namei.c | brelse(bh); |
bh | 387 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 388 | fs/ext/namei.c | if (!bh) { |
bh | 396 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 397 | fs/ext/namei.c | brelse(bh); |
bh | 406 | fs/ext/namei.c | struct buffer_head * bh, *dir_block; |
bh | 409 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 410 | fs/ext/namei.c | if (bh) { |
bh | 411 | fs/ext/namei.c | brelse(bh); |
bh | 454 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 455 | fs/ext/namei.c | if (!bh) { |
bh | 462 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 467 | fs/ext/namei.c | brelse(bh); |
bh | 477 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 480 | fs/ext/namei.c | if (inode->i_size < 2 * 12 || !(bh = ext_bread(inode,0,0))) { |
bh | 484 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 494 | fs/ext/namei.c | if ((void *) de >= (void *) (bh->b_data+BLOCK_SIZE)) { |
bh | 495 | fs/ext/namei.c | brelse(bh); |
bh | 496 | fs/ext/namei.c | bh = ext_bread(inode, offset >> BLOCK_SIZE_BITS,1); |
bh | 497 | fs/ext/namei.c | if (!bh) { |
bh | 501 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 508 | fs/ext/namei.c | brelse (bh); |
bh | 512 | fs/ext/namei.c | brelse(bh); |
bh | 518 | fs/ext/namei.c | brelse(bh); |
bh | 535 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 539 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
bh | 541 | fs/ext/namei.c | if (!bh) |
bh | 570 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 580 | fs/ext/namei.c | brelse(bh); |
bh | 588 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 593 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,&pde,&nde); |
bh | 594 | fs/ext/namei.c | if (!bh) |
bh | 613 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 621 | fs/ext/namei.c | brelse(bh); |
bh | 631 | fs/ext/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 657 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 658 | fs/ext/namei.c | if (bh) { |
bh | 662 | fs/ext/namei.c | brelse(bh); |
bh | 666 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 667 | fs/ext/namei.c | if (!bh) { |
bh | 675 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 676 | fs/ext/namei.c | brelse(bh); |
bh | 685 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 697 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 698 | fs/ext/namei.c | if (bh) { |
bh | 699 | fs/ext/namei.c | brelse(bh); |
bh | 704 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 705 | fs/ext/namei.c | if (!bh) { |
bh | 711 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 712 | fs/ext/namei.c | brelse(bh); |
bh | 51 | fs/ext/symlink.c | struct buffer_head * bh; |
bh | 72 | fs/ext/symlink.c | if (!(bh = ext_bread(inode, 0, 0))) { |
bh | 79 | fs/ext/symlink.c | error = open_namei(bh->b_data,flag,mode,res_inode,dir); |
bh | 81 | fs/ext/symlink.c | brelse(bh); |
bh | 87 | fs/ext/symlink.c | struct buffer_head * bh; |
bh | 97 | fs/ext/symlink.c | bh = ext_bread(inode, 0, 0); |
bh | 99 | fs/ext/symlink.c | if (!bh) |
bh | 102 | fs/ext/symlink.c | while (i<buflen && (c = bh->b_data[i])) { |
bh | 106 | fs/ext/symlink.c | brelse(bh); |
bh | 37 | fs/ext/truncate.c | struct buffer_head * bh; |
bh | 46 | fs/ext/truncate.c | bh = getblk(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 48 | fs/ext/truncate.c | brelse(bh); |
bh | 51 | fs/ext/truncate.c | if ((bh && bh->b_count != 1) || tmp != *p) { |
bh | 53 | fs/ext/truncate.c | brelse(bh); |
bh | 58 | fs/ext/truncate.c | brelse(bh); |
bh | 67 | fs/ext/truncate.c | struct buffer_head * bh; |
bh | 95 | fs/ext/truncate.c | bh = getblk(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 97 | fs/ext/truncate.c | brelse(bh); |
bh | 100 | fs/ext/truncate.c | if ((bh && bh->b_count != 1) || tmp != *ind) { |
bh | 102 | fs/ext/truncate.c | brelse(bh); |
bh | 107 | fs/ext/truncate.c | brelse(bh); |
bh | 119 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 130 | fs/ext2/balloc.c | bh = bread (sb->s_dev, gdp[desc].bg_block_bitmap, sb->s_blocksize); |
bh | 131 | fs/ext2/balloc.c | if (!bh) |
bh | 139 | fs/ext2/balloc.c | sb->u.ext2_sb.s_block_bitmap[bitmap_nr] = bh; |
bh | 230 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 255 | fs/ext2/balloc.c | bh = get_hash_table (sb->s_dev, block, sb->s_blocksize); |
bh | 256 | fs/ext2/balloc.c | if (bh) |
bh | 257 | fs/ext2/balloc.c | bh->b_dirt = 0; |
bh | 258 | fs/ext2/balloc.c | brelse (bh); |
bh | 264 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 265 | fs/ext2/balloc.c | if (!bh) |
bh | 269 | fs/ext2/balloc.c | if (!clear_bit (bit, bh->b_data)) |
bh | 286 | fs/ext2/balloc.c | bh->b_dirt = 1; |
bh | 288 | fs/ext2/balloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 289 | fs/ext2/balloc.c | wait_on_buffer (bh); |
bh | 305 | fs/ext2/balloc.c | struct buffer_head * bh; |
bh | 350 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 351 | fs/ext2/balloc.c | if (!bh) { |
bh | 361 | fs/ext2/balloc.c | if (!test_bit(j, bh->b_data)) { |
bh | 371 | fs/ext2/balloc.c | lmap = ((((unsigned long *) bh->b_data)[j >> 5]) >> |
bh | 374 | fs/ext2/balloc.c | lmap |= (((unsigned long *) bh->b_data)[(j >> 5) + 1]) << |
bh | 399 | fs/ext2/balloc.c | p = ((char *) bh->b_data) + (j >> 3); |
bh | 402 | fs/ext2/balloc.c | k = (r - ((char *) bh->b_data)) << 3; |
bh | 407 | fs/ext2/balloc.c | k = find_next_zero_bit ((unsigned long *) bh->b_data, |
bh | 451 | fs/ext2/balloc.c | bh = sb->u.ext2_sb.s_block_bitmap[bitmap_nr]; |
bh | 452 | fs/ext2/balloc.c | if (!bh) |
bh | 455 | fs/ext2/balloc.c | r = find_first_zero_byte (bh->b_data, |
bh | 457 | fs/ext2/balloc.c | j = (r - bh->b_data) << 3; |
bh | 459 | fs/ext2/balloc.c | j = find_first_zero_bit ((unsigned long *) bh->b_data, |
bh | 473 | fs/ext2/balloc.c | if (set_bit (j, bh->b_data)) { |
bh | 478 | fs/ext2/balloc.c | bh->b_dirt = 1; |
bh | 480 | fs/ext2/balloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 481 | fs/ext2/balloc.c | wait_on_buffer (bh); |
bh | 494 | fs/ext2/balloc.c | if (!(bh = getblk (sb->s_dev, j, sb->s_blocksize))) { |
bh | 499 | fs/ext2/balloc.c | clear_block (bh->b_data, sb->s_blocksize); |
bh | 500 | fs/ext2/balloc.c | bh->b_uptodate = 1; |
bh | 501 | fs/ext2/balloc.c | bh->b_dirt = 1; |
bh | 502 | fs/ext2/balloc.c | brelse (bh); |
bh | 69 | fs/ext2/dir.c | struct ext2_dir_entry * de, struct buffer_head * bh, |
bh | 80 | fs/ext2/dir.c | else if (dir && ((char *) de - bh->b_data) + de->rec_len > |
bh | 97 | fs/ext2/dir.c | struct buffer_head * bh; |
bh | 107 | fs/ext2/dir.c | bh = ext2_bread (inode, (filp->f_pos) >> EXT2_BLOCK_SIZE_BITS(sb), |
bh | 109 | fs/ext2/dir.c | if (!bh) { |
bh | 113 | fs/ext2/dir.c | de = (struct ext2_dir_entry *) (offset + bh->b_data); |
bh | 116 | fs/ext2/dir.c | bh, offset)) { |
bh | 117 | fs/ext2/dir.c | brelse (bh); |
bh | 134 | fs/ext2/dir.c | brelse (bh); |
bh | 144 | fs/ext2/dir.c | brelse (bh); |
bh | 210 | fs/ext2/file.c | struct buffer_head * bh; |
bh | 235 | fs/ext2/file.c | bh = ext2_getblk (inode, pos / sb->s_blocksize, 1, &err); |
bh | 236 | fs/ext2/file.c | if (!bh) { |
bh | 244 | fs/ext2/file.c | if (c != sb->s_blocksize && !bh->b_uptodate) { |
bh | 245 | fs/ext2/file.c | ll_rw_block (READ, 1, &bh); |
bh | 246 | fs/ext2/file.c | wait_on_buffer (bh); |
bh | 247 | fs/ext2/file.c | if (!bh->b_uptodate) { |
bh | 248 | fs/ext2/file.c | brelse (bh); |
bh | 254 | fs/ext2/file.c | p = (pos % sb->s_blocksize) + bh->b_data; |
bh | 263 | fs/ext2/file.c | bh->b_uptodate = 1; |
bh | 264 | fs/ext2/file.c | bh->b_dirt = 1; |
bh | 265 | fs/ext2/file.c | brelse (bh); |
bh | 30 | fs/ext2/fsync.c | struct buffer_head * bh; |
bh | 36 | fs/ext2/fsync.c | bh = get_hash_table (inode->i_dev, *block, blocksize); |
bh | 37 | fs/ext2/fsync.c | if (!bh) |
bh | 40 | fs/ext2/fsync.c | brelse (bh); |
bh | 43 | fs/ext2/fsync.c | if (wait && bh->b_req && !bh->b_uptodate) { |
bh | 44 | fs/ext2/fsync.c | brelse (bh); |
bh | 47 | fs/ext2/fsync.c | if (wait || !bh->b_uptodate || !bh->b_dirt) { |
bh | 48 | fs/ext2/fsync.c | brelse (bh); |
bh | 51 | fs/ext2/fsync.c | ll_rw_block (WRITE, 1, &bh); |
bh | 52 | fs/ext2/fsync.c | bh->b_count--; |
bh | 57 | fs/ext2/fsync.c | struct buffer_head ** bh, int wait) |
bh | 61 | fs/ext2/fsync.c | *bh = NULL; |
bh | 68 | fs/ext2/fsync.c | *bh = bread (inode->i_dev, tmp, blocksize); |
bh | 70 | fs/ext2/fsync.c | brelse (*bh); |
bh | 71 | fs/ext2/fsync.c | *bh = NULL; |
bh | 74 | fs/ext2/fsync.c | if (!*bh) |
bh | 69 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 79 | fs/ext2/ialloc.c | bh = bread (sb->s_dev, gdp[desc].bg_inode_bitmap, sb->s_blocksize); |
bh | 80 | fs/ext2/ialloc.c | if (!bh) |
bh | 85 | fs/ext2/ialloc.c | sb->u.ext2_sb.s_inode_bitmap[bitmap_nr] = bh; |
bh | 168 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 174 | fs/ext2/ialloc.c | bh = bread (inode->i_sb->s_dev, inode_block, inode->i_sb->s_blocksize); |
bh | 175 | fs/ext2/ialloc.c | if (!bh) |
bh | 180 | fs/ext2/ialloc.c | raw_inode = ((struct ext2_inode *) bh->b_data) + |
bh | 186 | fs/ext2/ialloc.c | bh->b_dirt = 1; |
bh | 188 | fs/ext2/ialloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 189 | fs/ext2/ialloc.c | wait_on_buffer (bh); |
bh | 191 | fs/ext2/ialloc.c | brelse (bh); |
bh | 197 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 243 | fs/ext2/ialloc.c | bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; |
bh | 244 | fs/ext2/ialloc.c | if (!bh) |
bh | 247 | fs/ext2/ialloc.c | if (!clear_bit (bit, bh->b_data)) |
bh | 267 | fs/ext2/ialloc.c | bh->b_dirt = 1; |
bh | 269 | fs/ext2/ialloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 270 | fs/ext2/ialloc.c | wait_on_buffer (bh); |
bh | 288 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 294 | fs/ext2/ialloc.c | bh = bread (inode->i_sb->s_dev, inode_block, inode->i_sb->s_blocksize); |
bh | 295 | fs/ext2/ialloc.c | if (!bh) { |
bh | 303 | fs/ext2/ialloc.c | raw_inode = ((struct ext2_inode *) bh->b_data) + |
bh | 309 | fs/ext2/ialloc.c | bh->b_dirt = 1; |
bh | 310 | fs/ext2/ialloc.c | brelse (bh); |
bh | 342 | fs/ext2/ialloc.c | struct buffer_head * bh; |
bh | 430 | fs/ext2/ialloc.c | bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; |
bh | 431 | fs/ext2/ialloc.c | if (!bh) |
bh | 434 | fs/ext2/ialloc.c | if ((j = find_first_zero_bit ((unsigned long *) bh->b_data, |
bh | 437 | fs/ext2/ialloc.c | if (set_bit (j, bh->b_data)) { |
bh | 442 | fs/ext2/ialloc.c | bh->b_dirt = 1; |
bh | 444 | fs/ext2/ialloc.c | ll_rw_block (WRITE, 1, &bh); |
bh | 445 | fs/ext2/ialloc.c | wait_on_buffer (bh); |
bh | 40 | fs/ext2/inode.c | static int block_bmap (struct buffer_head * bh, int nr) |
bh | 44 | fs/ext2/inode.c | if (!bh) |
bh | 46 | fs/ext2/inode.c | tmp = ((unsigned long *) bh->b_data)[nr]; |
bh | 47 | fs/ext2/inode.c | brelse (bh); |
bh | 172 | fs/ext2/inode.c | struct buffer_head * bh, int nr, |
bh | 181 | fs/ext2/inode.c | if (!bh) |
bh | 183 | fs/ext2/inode.c | if (!bh->b_uptodate) { |
bh | 184 | fs/ext2/inode.c | ll_rw_block (READ, 1, &bh); |
bh | 185 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 186 | fs/ext2/inode.c | if (!bh->b_uptodate) { |
bh | 187 | fs/ext2/inode.c | brelse (bh); |
bh | 191 | fs/ext2/inode.c | p = (unsigned long *) bh->b_data + nr; |
bh | 195 | fs/ext2/inode.c | result = getblk (bh->b_dev, tmp, blocksize); |
bh | 197 | fs/ext2/inode.c | brelse (bh); |
bh | 206 | fs/ext2/inode.c | brelse (bh); |
bh | 214 | fs/ext2/inode.c | if (((unsigned long *) bh->b_data)[tmp]) { |
bh | 215 | fs/ext2/inode.c | goal = ((unsigned long *)bh->b_data)[tmp]; |
bh | 220 | fs/ext2/inode.c | goal = bh->b_blocknr + 1; |
bh | 224 | fs/ext2/inode.c | brelse (bh); |
bh | 227 | fs/ext2/inode.c | result = getblk (bh->b_dev, tmp, blocksize); |
bh | 234 | fs/ext2/inode.c | bh->b_dirt = 1; |
bh | 236 | fs/ext2/inode.c | ll_rw_block (WRITE, 1, &bh); |
bh | 237 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 244 | fs/ext2/inode.c | brelse (bh); |
bh | 251 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 285 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_IND_BLOCK, create, b, err); |
bh | 286 | fs/ext2/inode.c | return block_getblk (inode, bh, block, create, |
bh | 291 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_DIND_BLOCK, create, b, err); |
bh | 292 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block / addr_per_block, create, |
bh | 294 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), |
bh | 298 | fs/ext2/inode.c | bh = inode_getblk (inode, EXT2_TIND_BLOCK, create, b, err); |
bh | 299 | fs/ext2/inode.c | bh = block_getblk (inode, bh, block/(addr_per_block * addr_per_block), |
bh | 301 | fs/ext2/inode.c | bh = block_getblk (inode, bh, (block/addr_per_block) & (addr_per_block - 1), |
bh | 303 | fs/ext2/inode.c | return block_getblk (inode, bh, block & (addr_per_block - 1), create, |
bh | 310 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 312 | fs/ext2/inode.c | bh = ext2_getblk (inode, block, create, err); |
bh | 313 | fs/ext2/inode.c | if (!bh || bh->b_uptodate) |
bh | 314 | fs/ext2/inode.c | return bh; |
bh | 315 | fs/ext2/inode.c | ll_rw_block (READ, 1, &bh); |
bh | 316 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 317 | fs/ext2/inode.c | if (bh->b_uptodate) |
bh | 318 | fs/ext2/inode.c | return bh; |
bh | 319 | fs/ext2/inode.c | brelse (bh); |
bh | 326 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 347 | fs/ext2/inode.c | bh = inode->i_sb->u.ext2_sb.s_group_desc[group_desc]; |
bh | 348 | fs/ext2/inode.c | if (!bh) |
bh | 351 | fs/ext2/inode.c | gdp = (struct ext2_group_desc *) bh->b_data; |
bh | 355 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
bh | 359 | fs/ext2/inode.c | raw_inode = ((struct ext2_inode *) bh->b_data) + |
bh | 386 | fs/ext2/inode.c | brelse (bh); |
bh | 409 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 429 | fs/ext2/inode.c | bh = inode->i_sb->u.ext2_sb.s_group_desc[group_desc]; |
bh | 430 | fs/ext2/inode.c | if (!bh) |
bh | 433 | fs/ext2/inode.c | gdp = (struct ext2_group_desc *) bh->b_data; |
bh | 437 | fs/ext2/inode.c | if (!(bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize))) |
bh | 441 | fs/ext2/inode.c | raw_inode = ((struct ext2_inode *)bh->b_data) + |
bh | 464 | fs/ext2/inode.c | bh->b_dirt = 1; |
bh | 466 | fs/ext2/inode.c | return bh; |
bh | 471 | fs/ext2/inode.c | struct buffer_head * bh; |
bh | 472 | fs/ext2/inode.c | bh = ext2_update_inode (inode); |
bh | 473 | fs/ext2/inode.c | brelse (bh); |
bh | 479 | fs/ext2/inode.c | struct buffer_head *bh; |
bh | 481 | fs/ext2/inode.c | bh = ext2_update_inode (inode); |
bh | 482 | fs/ext2/inode.c | if (bh && bh->b_dirt) |
bh | 484 | fs/ext2/inode.c | ll_rw_block (WRITE, 1, &bh); |
bh | 485 | fs/ext2/inode.c | wait_on_buffer (bh); |
bh | 486 | fs/ext2/inode.c | if (bh->b_req && !bh->b_uptodate) |
bh | 493 | fs/ext2/inode.c | else if (!bh) |
bh | 495 | fs/ext2/inode.c | brelse (bh); |
bh | 70 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 86 | fs/ext2/namei.c | bh = ext2_bread (dir, 0, 0, &err); |
bh | 87 | fs/ext2/namei.c | if (!bh) |
bh | 90 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 92 | fs/ext2/namei.c | if (!bh || (char *)de >= sb->s_blocksize + bh->b_data) { |
bh | 93 | fs/ext2/namei.c | brelse (bh); |
bh | 94 | fs/ext2/namei.c | bh = ext2_bread (dir, offset >> EXT2_BLOCK_SIZE_BITS(sb), 0, &err); |
bh | 95 | fs/ext2/namei.c | if (!bh) { |
bh | 99 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 101 | fs/ext2/namei.c | if (! ext2_check_dir_entry ("ext2_find_entry", dir, de, bh, |
bh | 103 | fs/ext2/namei.c | brelse (bh); |
bh | 108 | fs/ext2/namei.c | return bh; |
bh | 113 | fs/ext2/namei.c | brelse (bh); |
bh | 122 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 134 | fs/ext2/namei.c | if (!(bh = ext2_find_entry (dir, name, len, &de))) { |
bh | 143 | fs/ext2/namei.c | brelse (bh); |
bh | 172 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 197 | fs/ext2/namei.c | bh = ext2_bread (dir, 0, 0, err); |
bh | 198 | fs/ext2/namei.c | if (!bh) |
bh | 202 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 205 | fs/ext2/namei.c | if ((char *)de >= sb->s_blocksize + bh->b_data) { |
bh | 206 | fs/ext2/namei.c | brelse (bh); |
bh | 207 | fs/ext2/namei.c | bh = NULL; |
bh | 208 | fs/ext2/namei.c | bh = ext2_bread (dir, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, err); |
bh | 209 | fs/ext2/namei.c | if (!bh) |
bh | 219 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 231 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 234 | fs/ext2/namei.c | if (! ext2_check_dir_entry ("ext2_add_entry", dir, de, bh, |
bh | 237 | fs/ext2/namei.c | brelse (bh); |
bh | 242 | fs/ext2/namei.c | brelse (bh); |
bh | 272 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 275 | fs/ext2/namei.c | return bh; |
bh | 280 | fs/ext2/namei.c | brelse (bh); |
bh | 289 | fs/ext2/namei.c | struct buffer_head * bh) |
bh | 296 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 297 | fs/ext2/namei.c | while (i < bh->b_size) { |
bh | 299 | fs/ext2/namei.c | de, bh, i)) |
bh | 319 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 334 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 335 | fs/ext2/namei.c | if (!bh) { |
bh | 347 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 349 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 350 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 352 | fs/ext2/namei.c | brelse (bh); |
bh | 362 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 368 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 369 | fs/ext2/namei.c | if (bh) { |
bh | 370 | fs/ext2/namei.c | brelse (bh); |
bh | 408 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 409 | fs/ext2/namei.c | if (!bh) { |
bh | 421 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 423 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 424 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 426 | fs/ext2/namei.c | brelse (bh); |
bh | 435 | fs/ext2/namei.c | struct buffer_head * bh, * dir_block; |
bh | 441 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 442 | fs/ext2/namei.c | if (bh) { |
bh | 443 | fs/ext2/namei.c | brelse (bh); |
bh | 487 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 488 | fs/ext2/namei.c | if (!bh) { |
bh | 500 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 502 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 503 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 509 | fs/ext2/namei.c | brelse (bh); |
bh | 519 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 526 | fs/ext2/namei.c | !(bh = ext2_bread (inode, 0, 0, &err))) { |
bh | 531 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 542 | fs/ext2/namei.c | if ((void *) de >= (void *) (bh->b_data + sb->s_blocksize)) { |
bh | 543 | fs/ext2/namei.c | brelse (bh); |
bh | 544 | fs/ext2/namei.c | bh = ext2_bread (inode, offset >> EXT2_BLOCK_SIZE_BITS(sb), 1, &err); |
bh | 545 | fs/ext2/namei.c | if (!bh) { |
bh | 549 | fs/ext2/namei.c | de = (struct ext2_dir_entry *) bh->b_data; |
bh | 551 | fs/ext2/namei.c | if (! ext2_check_dir_entry ("empty_dir", inode, de, bh, |
bh | 553 | fs/ext2/namei.c | brelse (bh); |
bh | 557 | fs/ext2/namei.c | brelse (bh); |
bh | 563 | fs/ext2/namei.c | brelse (bh); |
bh | 571 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 578 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 580 | fs/ext2/namei.c | if (!bh) |
bh | 589 | fs/ext2/namei.c | brelse(bh); |
bh | 618 | fs/ext2/namei.c | retval = ext2_delete_entry (de, bh); |
bh | 621 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 623 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 624 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 645 | fs/ext2/namei.c | brelse (bh); |
bh | 653 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 661 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 662 | fs/ext2/namei.c | if (!bh) |
bh | 671 | fs/ext2/namei.c | brelse(bh); |
bh | 686 | fs/ext2/namei.c | retval = ext2_delete_entry (de, bh); |
bh | 689 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 691 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 692 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 704 | fs/ext2/namei.c | brelse (bh); |
bh | 715 | fs/ext2/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 759 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 760 | fs/ext2/namei.c | if (bh) { |
bh | 764 | fs/ext2/namei.c | brelse (bh); |
bh | 768 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 769 | fs/ext2/namei.c | if (!bh) { |
bh | 781 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 783 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 784 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 786 | fs/ext2/namei.c | brelse (bh); |
bh | 796 | fs/ext2/namei.c | struct buffer_head * bh; |
bh | 809 | fs/ext2/namei.c | bh = ext2_find_entry (dir, name, len, &de); |
bh | 810 | fs/ext2/namei.c | if (bh) { |
bh | 811 | fs/ext2/namei.c | brelse (bh); |
bh | 816 | fs/ext2/namei.c | bh = ext2_add_entry (dir, name, len, &de, &err); |
bh | 817 | fs/ext2/namei.c | if (!bh) { |
bh | 827 | fs/ext2/namei.c | bh->b_dirt = 1; |
bh | 829 | fs/ext2/namei.c | ll_rw_block (WRITE, 1, &bh); |
bh | 830 | fs/ext2/namei.c | wait_on_buffer (bh); |
bh | 832 | fs/ext2/namei.c | brelse (bh); |
bh | 129 | fs/ext2/super.c | struct buffer_head * bh) |
bh | 138 | fs/ext2/super.c | es = (struct ext2_super_block *) bh->b_data; |
bh | 161 | fs/ext2/super.c | bh->b_dirt = 1; |
bh | 204 | fs/ext2/super.c | struct buffer_head * bh; |
bh | 224 | fs/ext2/super.c | if (!(bh = bread (dev, sb_block, BLOCK_SIZE))) { |
bh | 230 | fs/ext2/super.c | es = (struct ext2_super_block *) bh->b_data; |
bh | 242 | fs/ext2/super.c | brelse (bh); |
bh | 255 | fs/ext2/super.c | brelse (bh); |
bh | 259 | fs/ext2/super.c | bh = bread (dev, logic_sb_block, s->s_blocksize); |
bh | 260 | fs/ext2/super.c | if(!bh) |
bh | 262 | fs/ext2/super.c | es = (struct ext2_super_block *) (((char *)bh->b_data) + offset); |
bh | 267 | fs/ext2/super.c | brelse (bh); |
bh | 286 | fs/ext2/super.c | s->u.ext2_sb.s_sbh = bh; |
bh | 297 | fs/ext2/super.c | brelse (bh); |
bh | 307 | fs/ext2/super.c | brelse (bh); |
bh | 311 | fs/ext2/super.c | if (!convert_pre_02b_fs (s, bh)) { |
bh | 314 | fs/ext2/super.c | brelse (bh); |
bh | 325 | fs/ext2/super.c | brelse (bh); |
bh | 331 | fs/ext2/super.c | if (s->s_blocksize != bh->b_size) { |
bh | 334 | fs/ext2/super.c | brelse (bh); |
bh | 344 | fs/ext2/super.c | brelse (bh); |
bh | 361 | fs/ext2/super.c | brelse (bh); |
bh | 373 | fs/ext2/super.c | brelse (bh); |
bh | 395 | fs/ext2/super.c | brelse (bh); |
bh | 405 | fs/ext2/super.c | bh->b_dirt = 1; |
bh | 52 | fs/ext2/symlink.c | struct buffer_head * bh = NULL; |
bh | 75 | fs/ext2/symlink.c | if (!(bh = ext2_bread (inode, 0, 0, &error))) { |
bh | 80 | fs/ext2/symlink.c | link = bh->b_data; |
bh | 87 | fs/ext2/symlink.c | if (bh) |
bh | 88 | fs/ext2/symlink.c | brelse (bh); |
bh | 94 | fs/ext2/symlink.c | struct buffer_head * bh = NULL; |
bh | 106 | fs/ext2/symlink.c | bh = ext2_bread (inode, 0, 0, &err); |
bh | 107 | fs/ext2/symlink.c | if (!bh) { |
bh | 111 | fs/ext2/symlink.c | link = bh->b_data; |
bh | 121 | fs/ext2/symlink.c | if (bh) |
bh | 122 | fs/ext2/symlink.c | brelse (bh); |
bh | 46 | fs/ext2/truncate.c | struct buffer_head * bh; |
bh | 60 | fs/ext2/truncate.c | bh = getblk (inode->i_dev, tmp, |
bh | 63 | fs/ext2/truncate.c | bh = get_hash_table (inode->i_dev, tmp, |
bh | 66 | fs/ext2/truncate.c | brelse (bh); |
bh | 69 | fs/ext2/truncate.c | if ((bh && bh->b_count != 1) || tmp != *p) { |
bh | 71 | fs/ext2/truncate.c | brelse (bh); |
bh | 78 | fs/ext2/truncate.c | clear_block (bh->b_data, inode->i_sb->s_blocksize, |
bh | 80 | fs/ext2/truncate.c | bh->b_dirt = 1; |
bh | 82 | fs/ext2/truncate.c | brelse (bh); |
bh | 91 | fs/ext2/truncate.c | struct buffer_head * bh; |
bh | 123 | fs/ext2/truncate.c | bh = getblk (inode->i_dev, tmp, |
bh | 126 | fs/ext2/truncate.c | bh = get_hash_table (inode->i_dev, tmp, |
bh | 129 | fs/ext2/truncate.c | brelse (bh); |
bh | 132 | fs/ext2/truncate.c | if ((bh && bh->b_count != 1) || tmp != *ind) { |
bh | 134 | fs/ext2/truncate.c | brelse (bh); |
bh | 140 | fs/ext2/truncate.c | clear_block (bh->b_data, inode->i_sb->s_blocksize, |
bh | 142 | fs/ext2/truncate.c | bh->b_dirt = 1; |
bh | 144 | fs/ext2/truncate.c | brelse (bh); |
bh | 224 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh[4]; |
bh | 866 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh; |
bh | 898 | fs/hpfs/hpfs_fs.c | block = map_sector(inode->i_dev, hpfs_bmap(inode, q), &bh); |
bh | 926 | fs/hpfs/hpfs_fs.c | brelse(bh); |
bh | 997 | fs/hpfs/hpfs_fs.c | struct buffer_head *bh; |
bh | 1013 | fs/hpfs/hpfs_fs.c | fnode = map_fnode(inode->i_dev, inode->i_ino, &bh); |
bh | 1017 | fs/hpfs/hpfs_fs.c | file_secno, &bh); |
bh | 1018 | 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, |
bh | 1681 | fs/hpfs/hpfs_fs.c | if (!bh) |
bh | 1683 | fs/hpfs/hpfs_fs.c | memcpy(data, bh->b_data, 512); |
bh | 1685 | fs/hpfs/hpfs_fs.c | qbh->bh[1] = bh = bread(dev, secno + 1, 512); |
bh | 1686 | fs/hpfs/hpfs_fs.c | if (!bh) |
bh | 1688 | fs/hpfs/hpfs_fs.c | memcpy(data + 512, bh->b_data, 512); |
bh | 1690 | fs/hpfs/hpfs_fs.c | qbh->bh[2] = bh = bread(dev, secno + 2, 512); |
bh | 1691 | fs/hpfs/hpfs_fs.c | if (!bh) |
bh | 1693 | fs/hpfs/hpfs_fs.c | memcpy(data + 2 * 512, bh->b_data, 512); |
bh | 1695 | fs/hpfs/hpfs_fs.c | qbh->bh[3] = bh = bread(dev, secno + 3, 512); |
bh | 1696 | fs/hpfs/hpfs_fs.c | if (!bh) |
bh | 1698 | fs/hpfs/hpfs_fs.c | memcpy(data + 3 * 512, bh->b_data, 512); |
bh | 1703 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[2]); |
bh | 1705 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[1]); |
bh | 1707 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[0]); |
bh | 1719 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[3]); |
bh | 1720 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[2]); |
bh | 1721 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[1]); |
bh | 1722 | fs/hpfs/hpfs_fs.c | brelse(qbh->bh[0]); |
bh | 72 | fs/isofs/dir.c | struct buffer_head * bh; |
bh | 84 | fs/isofs/dir.c | if (!block || !(bh = bread(inode->i_dev,block,bufsize))) |
bh | 92 | fs/isofs/dir.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
bh | 100 | fs/isofs/dir.c | brelse(bh); |
bh | 106 | fs/isofs/dir.c | || !(bh = bread(inode->i_dev,block,bufsize))) |
bh | 122 | fs/isofs/dir.c | memcpy(cpnt, bh->b_data, bufsize); |
bh | 125 | fs/isofs/dir.c | brelse(bh); |
bh | 129 | fs/isofs/dir.c | || !(bh = bread(inode->i_dev,block,bufsize))) { |
bh | 133 | fs/isofs/dir.c | memcpy((char *)cpnt+bufsize, bh->b_data, bufsize); |
bh | 225 | fs/isofs/dir.c | brelse(bh); |
bh | 234 | fs/isofs/dir.c | brelse(bh); |
bh | 93 | fs/isofs/file.c | struct buffer_head * bh; |
bh | 97 | fs/isofs/file.c | if (block && (bh = bread(inode->i_dev,block, ISOFS_BUFFER_SIZE(inode)))) { |
bh | 98 | fs/isofs/file.c | pnt = (unsigned char *) bh->b_data; |
bh | 109 | fs/isofs/file.c | brelse(bh); |
bh | 123 | fs/isofs/inode.c | struct buffer_head *bh; |
bh | 158 | fs/isofs/inode.c | if (!(bh = bread(dev, iso_blknum << (ISOFS_BLOCK_BITS-blocksize_bits), blocksize))) { |
bh | 166 | fs/isofs/inode.c | vdp = (struct iso_volume_descriptor *)bh->b_data; |
bh | 167 | fs/isofs/inode.c | hdp = (struct hs_volume_descriptor *)bh->b_data; |
bh | 193 | fs/isofs/inode.c | brelse(bh); |
bh | 242 | fs/isofs/inode.c | brelse(bh); |
bh | 293 | fs/isofs/inode.c | brelse(bh); |
bh | 325 | fs/isofs/inode.c | struct buffer_head * bh; |
bh | 334 | fs/isofs/inode.c | if (!(bh=bread(inode->i_dev,block, bufsize))) |
bh | 337 | fs/isofs/inode.c | pnt = ((unsigned char *) bh->b_data |
bh | 344 | fs/isofs/inode.c | memcpy(cpnt, bh->b_data, bufsize); |
bh | 345 | fs/isofs/inode.c | brelse(bh); |
bh | 346 | fs/isofs/inode.c | if (!(bh = bread(inode->i_dev,++block, bufsize))) |
bh | 348 | fs/isofs/inode.c | memcpy((char *)cpnt + bufsize, bh->b_data, bufsize); |
bh | 462 | fs/isofs/inode.c | brelse(bh); |
bh | 512 | fs/isofs/inode.c | struct buffer_head * bh; |
bh | 517 | fs/isofs/inode.c | if (!(bh = bread(parent->i_dev, block, bufsize))) return -1; |
bh | 520 | fs/isofs/inode.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
bh | 523 | fs/isofs/inode.c | brelse(bh); |
bh | 533 | fs/isofs/inode.c | brelse(bh); |
bh | 540 | fs/isofs/inode.c | brelse(bh); |
bh | 555 | fs/isofs/inode.c | if (!block || !(bh = bread(parent->i_dev,block, bufsize))) |
bh | 560 | fs/isofs/inode.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
bh | 569 | fs/isofs/inode.c | brelse(bh); |
bh | 574 | fs/isofs/inode.c | || !(bh = bread(parent->i_dev,block, bufsize))) |
bh | 590 | fs/isofs/inode.c | memcpy(cpnt, bh->b_data, bufsize); |
bh | 593 | fs/isofs/inode.c | brelse(bh); |
bh | 596 | fs/isofs/inode.c | if (!(bh = bread(parent->i_dev,block,bufsize))) { |
bh | 600 | fs/isofs/inode.c | memcpy((char *)cpnt+bufsize, bh->b_data, bufsize); |
bh | 622 | fs/isofs/inode.c | brelse(bh); |
bh | 652 | fs/isofs/inode.c | void leak_check_brelse(struct buffer_head * bh){ |
bh | 654 | fs/isofs/inode.c | return brelse(bh); |
bh | 71 | fs/isofs/namei.c | struct buffer_head * bh; |
bh | 90 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,bufsize))) return NULL; |
bh | 93 | fs/isofs/namei.c | de = (struct iso_directory_record *) (bh->b_data + offset); |
bh | 101 | fs/isofs/namei.c | brelse(bh); |
bh | 106 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,bufsize))) |
bh | 119 | fs/isofs/namei.c | memcpy(cpnt, bh->b_data, bufsize); |
bh | 122 | fs/isofs/namei.c | brelse(bh); |
bh | 125 | fs/isofs/namei.c | if (!block || !(bh = bread(dir->i_dev,block,bufsize))) { |
bh | 129 | fs/isofs/namei.c | memcpy((char *)cpnt+bufsize,bh->b_data,bufsize); |
bh | 200 | fs/isofs/namei.c | return bh; |
bh | 206 | fs/isofs/namei.c | brelse(bh); |
bh | 214 | fs/isofs/namei.c | struct buffer_head * bh; |
bh | 244 | fs/isofs/namei.c | if (!(bh = isofs_find_entry(dir,name,len, &ino, &ino_back))) { |
bh | 248 | fs/isofs/namei.c | brelse(bh); |
bh | 57 | fs/isofs/rock.c | struct buffer_head * bh; \ |
bh | 66 | fs/isofs/rock.c | bh = bread(DEV->i_dev, block, ISOFS_BUFFER_SIZE(DEV)); \ |
bh | 67 | fs/isofs/rock.c | if(bh){ \ |
bh | 68 | fs/isofs/rock.c | memcpy(buffer, bh->b_data, cont_size); \ |
bh | 69 | fs/isofs/rock.c | brelse(bh); \ |
bh | 372 | fs/isofs/rock.c | struct buffer_head * bh; |
bh | 391 | fs/isofs/rock.c | if (!(bh=bread(inode->i_dev,block, bufsize))) |
bh | 394 | fs/isofs/rock.c | pnt = ((unsigned char *) bh->b_data) + (inode->i_ino & (bufsize - 1)); |
bh | 400 | fs/isofs/rock.c | memcpy(cpnt, bh->b_data, bufsize); |
bh | 401 | fs/isofs/rock.c | brelse(bh); |
bh | 402 | fs/isofs/rock.c | if (!(bh = bread(inode->i_dev,++block, bufsize))) |
bh | 404 | fs/isofs/rock.c | memcpy((char *)cpnt+bufsize, bh->b_data, bufsize); |
bh | 471 | fs/isofs/rock.c | brelse(bh); |
bh | 45 | fs/minix/bitmap.c | struct buffer_head *bh; |
bh | 48 | fs/minix/bitmap.c | if (!(bh=map[i])) |
bh | 57 | fs/minix/bitmap.c | tmp = bh->b_data[end] & ((1<<numbits)-1); |
bh | 62 | fs/minix/bitmap.c | sum += nibblemap[bh->b_data[j] & 0xf] |
bh | 63 | fs/minix/bitmap.c | + nibblemap[(bh->b_data[j]>>4)&0xf]; |
bh | 70 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 82 | fs/minix/bitmap.c | bh = get_hash_table(sb->s_dev,block,BLOCK_SIZE); |
bh | 83 | fs/minix/bitmap.c | if (bh) |
bh | 84 | fs/minix/bitmap.c | bh->b_dirt=0; |
bh | 85 | fs/minix/bitmap.c | brelse(bh); |
bh | 89 | fs/minix/bitmap.c | bh = sb->u.minix_sb.s_zmap[zone]; |
bh | 90 | fs/minix/bitmap.c | if (!bh) { |
bh | 94 | fs/minix/bitmap.c | if (!clear_bit(bit,bh->b_data)) |
bh | 96 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 102 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 112 | fs/minix/bitmap.c | if ((bh=sb->u.minix_sb.s_zmap[i]) != NULL) |
bh | 113 | fs/minix/bitmap.c | if ((j=find_first_zero(bh->b_data))<8192) |
bh | 115 | fs/minix/bitmap.c | if (i>=8 || !bh || j>=8192) |
bh | 117 | fs/minix/bitmap.c | if (set_bit(j,bh->b_data)) { |
bh | 121 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 126 | fs/minix/bitmap.c | if (!(bh = getblk(sb->s_dev,j,BLOCK_SIZE))) { |
bh | 130 | fs/minix/bitmap.c | clear_block(bh->b_data); |
bh | 131 | fs/minix/bitmap.c | bh->b_uptodate = 1; |
bh | 132 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 133 | fs/minix/bitmap.c | brelse(bh); |
bh | 145 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 171 | fs/minix/bitmap.c | if (!(bh=inode->i_sb->u.minix_sb.s_imap[ino >> 13])) { |
bh | 176 | fs/minix/bitmap.c | if (!clear_bit(ino & 8191, bh->b_data)) |
bh | 178 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 185 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 195 | fs/minix/bitmap.c | if ((bh = inode->i_sb->u.minix_sb.s_imap[i]) != NULL) |
bh | 196 | fs/minix/bitmap.c | if ((j=find_first_zero(bh->b_data))<8192) |
bh | 198 | fs/minix/bitmap.c | if (!bh || j >= 8192) { |
bh | 202 | fs/minix/bitmap.c | if (set_bit(j,bh->b_data)) { /* shouldn't happen */ |
bh | 207 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 62 | fs/minix/dir.c | struct buffer_head * bh; |
bh | 73 | fs/minix/dir.c | bh = minix_bread(inode,(filp->f_pos)>>BLOCK_SIZE_BITS,0); |
bh | 74 | fs/minix/dir.c | if (!bh) { |
bh | 79 | fs/minix/dir.c | de = (struct minix_dir_entry *) (offset + bh->b_data); |
bh | 92 | fs/minix/dir.c | brelse(bh); |
bh | 97 | fs/minix/dir.c | brelse(bh); |
bh | 192 | fs/minix/file.c | struct buffer_head * bh; |
bh | 213 | fs/minix/file.c | bh = minix_getblk(inode,pos/BLOCK_SIZE,1); |
bh | 214 | fs/minix/file.c | if (!bh) { |
bh | 222 | fs/minix/file.c | if (c != BLOCK_SIZE && !bh->b_uptodate) { |
bh | 223 | fs/minix/file.c | ll_rw_block(READ, 1, &bh); |
bh | 224 | fs/minix/file.c | wait_on_buffer(bh); |
bh | 225 | fs/minix/file.c | if (!bh->b_uptodate) { |
bh | 226 | fs/minix/file.c | brelse(bh); |
bh | 232 | fs/minix/file.c | p = (pos % BLOCK_SIZE) + bh->b_data; |
bh | 241 | fs/minix/file.c | bh->b_uptodate = 1; |
bh | 242 | fs/minix/file.c | bh->b_dirt = 1; |
bh | 243 | fs/minix/file.c | brelse(bh); |
bh | 30 | fs/minix/fsync.c | struct buffer_head * bh; |
bh | 36 | fs/minix/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
bh | 37 | fs/minix/fsync.c | if (!bh) |
bh | 40 | fs/minix/fsync.c | brelse (bh); |
bh | 43 | fs/minix/fsync.c | if (wait && bh->b_req && !bh->b_uptodate) { |
bh | 44 | fs/minix/fsync.c | brelse(bh); |
bh | 47 | fs/minix/fsync.c | if (wait || !bh->b_uptodate || !bh->b_dirt) |
bh | 49 | fs/minix/fsync.c | brelse(bh); |
bh | 52 | fs/minix/fsync.c | ll_rw_block(WRITE, 1, &bh); |
bh | 53 | fs/minix/fsync.c | bh->b_count--; |
bh | 58 | fs/minix/fsync.c | struct buffer_head **bh, int wait) |
bh | 63 | fs/minix/fsync.c | *bh = NULL; |
bh | 70 | fs/minix/fsync.c | *bh = bread(inode->i_dev, tmp, blocksize); |
bh | 72 | fs/minix/fsync.c | brelse(*bh); |
bh | 73 | fs/minix/fsync.c | *bh = NULL; |
bh | 76 | fs/minix/fsync.c | if (!*bh) |
bh | 56 | fs/minix/inode.c | struct buffer_head *bh; |
bh | 63 | fs/minix/inode.c | if (!(bh = bread(dev,1,BLOCK_SIZE))) { |
bh | 69 | fs/minix/inode.c | ms = (struct minix_super_block *) bh->b_data; |
bh | 80 | fs/minix/inode.c | brelse(bh); |
bh | 155 | fs/minix/inode.c | static int block_bmap(struct buffer_head * bh, int nr) |
bh | 159 | fs/minix/inode.c | if (!bh) |
bh | 161 | fs/minix/inode.c | tmp = ((unsigned short *) bh->b_data)[nr]; |
bh | 162 | fs/minix/inode.c | brelse(bh); |
bh | 231 | fs/minix/inode.c | struct buffer_head * bh, int nr, int create) |
bh | 237 | fs/minix/inode.c | if (!bh) |
bh | 239 | fs/minix/inode.c | if (!bh->b_uptodate) { |
bh | 240 | fs/minix/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 241 | fs/minix/inode.c | wait_on_buffer(bh); |
bh | 242 | fs/minix/inode.c | if (!bh->b_uptodate) { |
bh | 243 | fs/minix/inode.c | brelse(bh); |
bh | 247 | fs/minix/inode.c | p = nr + (unsigned short *) bh->b_data; |
bh | 251 | fs/minix/inode.c | result = getblk(bh->b_dev, tmp, BLOCK_SIZE); |
bh | 253 | fs/minix/inode.c | brelse(bh); |
bh | 260 | fs/minix/inode.c | brelse(bh); |
bh | 265 | fs/minix/inode.c | brelse(bh); |
bh | 268 | fs/minix/inode.c | result = getblk(bh->b_dev, tmp, BLOCK_SIZE); |
bh | 275 | fs/minix/inode.c | bh->b_dirt = 1; |
bh | 276 | fs/minix/inode.c | brelse(bh); |
bh | 282 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 296 | fs/minix/inode.c | bh = inode_getblk(inode,7,create); |
bh | 297 | fs/minix/inode.c | return block_getblk(inode, bh, block, create); |
bh | 300 | fs/minix/inode.c | bh = inode_getblk(inode,8,create); |
bh | 301 | fs/minix/inode.c | bh = block_getblk(inode, bh, block>>9, create); |
bh | 302 | fs/minix/inode.c | return block_getblk(inode, bh, block & 511, create); |
bh | 307 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 309 | fs/minix/inode.c | bh = minix_getblk(inode,block,create); |
bh | 310 | fs/minix/inode.c | if (!bh || bh->b_uptodate) |
bh | 311 | fs/minix/inode.c | return bh; |
bh | 312 | fs/minix/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 313 | fs/minix/inode.c | wait_on_buffer(bh); |
bh | 314 | fs/minix/inode.c | if (bh->b_uptodate) |
bh | 315 | fs/minix/inode.c | return bh; |
bh | 316 | fs/minix/inode.c | brelse(bh); |
bh | 322 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 337 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,block, BLOCK_SIZE))) { |
bh | 342 | fs/minix/inode.c | raw_inode = ((struct minix_inode *) bh->b_data) + |
bh | 355 | fs/minix/inode.c | brelse(bh); |
bh | 372 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 385 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) { |
bh | 390 | fs/minix/inode.c | raw_inode = ((struct minix_inode *)bh->b_data) + |
bh | 403 | fs/minix/inode.c | bh->b_dirt=1; |
bh | 404 | fs/minix/inode.c | return bh; |
bh | 409 | fs/minix/inode.c | struct buffer_head *bh; |
bh | 410 | fs/minix/inode.c | bh = minix_update_inode(inode); |
bh | 411 | fs/minix/inode.c | brelse(bh); |
bh | 417 | fs/minix/inode.c | struct buffer_head *bh; |
bh | 419 | fs/minix/inode.c | bh = minix_update_inode(inode); |
bh | 420 | fs/minix/inode.c | if (bh && bh->b_dirt) |
bh | 422 | fs/minix/inode.c | ll_rw_block(WRITE, 1, &bh); |
bh | 423 | fs/minix/inode.c | wait_on_buffer(bh); |
bh | 424 | fs/minix/inode.c | if (bh->b_req && !bh->b_uptodate) |
bh | 431 | fs/minix/inode.c | else if (!bh) |
bh | 433 | fs/minix/inode.c | brelse (bh); |
bh | 45 | fs/minix/namei.c | struct buffer_head * bh, unsigned long * offset, |
bh | 50 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + *offset); |
bh | 72 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 86 | fs/minix/namei.c | bh = NULL; |
bh | 89 | fs/minix/namei.c | if (!bh) { |
bh | 90 | fs/minix/namei.c | bh = minix_bread(dir,block,0); |
bh | 91 | fs/minix/namei.c | if (!bh) { |
bh | 96 | fs/minix/namei.c | *res_dir = (struct minix_dir_entry *) (bh->b_data + offset); |
bh | 97 | fs/minix/namei.c | if (minix_match(namelen,name,bh,&offset,info)) |
bh | 98 | fs/minix/namei.c | return bh; |
bh | 99 | fs/minix/namei.c | if (offset < bh->b_size) |
bh | 101 | fs/minix/namei.c | brelse(bh); |
bh | 102 | fs/minix/namei.c | bh = NULL; |
bh | 106 | fs/minix/namei.c | brelse(bh); |
bh | 116 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 125 | fs/minix/namei.c | if (!(bh = minix_find_entry(dir,name,len,&de))) { |
bh | 130 | fs/minix/namei.c | brelse(bh); |
bh | 156 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 174 | fs/minix/namei.c | bh = NULL; |
bh | 177 | fs/minix/namei.c | if (!bh) { |
bh | 178 | fs/minix/namei.c | bh = minix_bread(dir,block,1); |
bh | 179 | fs/minix/namei.c | if (!bh) |
bh | 182 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + offset); |
bh | 184 | fs/minix/namei.c | if (block*bh->b_size + offset > dir->i_size) { |
bh | 186 | fs/minix/namei.c | dir->i_size = block*bh->b_size + offset; |
bh | 191 | fs/minix/namei.c | brelse(bh); |
bh | 198 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 202 | fs/minix/namei.c | if (offset < bh->b_size) |
bh | 204 | fs/minix/namei.c | brelse(bh); |
bh | 205 | fs/minix/namei.c | bh = NULL; |
bh | 209 | fs/minix/namei.c | *res_buf = bh; |
bh | 218 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 232 | fs/minix/namei.c | error = minix_add_entry(dir,name,len, &bh ,&de); |
bh | 241 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 242 | fs/minix/namei.c | brelse(bh); |
bh | 252 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 257 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 258 | fs/minix/namei.c | if (bh) { |
bh | 259 | fs/minix/namei.c | brelse(bh); |
bh | 289 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
bh | 298 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 299 | fs/minix/namei.c | brelse(bh); |
bh | 309 | fs/minix/namei.c | struct buffer_head * bh, *dir_block; |
bh | 318 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 319 | fs/minix/namei.c | if (bh) { |
bh | 320 | fs/minix/namei.c | brelse(bh); |
bh | 356 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
bh | 364 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 369 | fs/minix/namei.c | brelse(bh); |
bh | 379 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 387 | fs/minix/namei.c | bh = NULL; |
bh | 393 | fs/minix/namei.c | bh = minix_bread(inode,0,0); |
bh | 394 | fs/minix/namei.c | if (!bh) |
bh | 396 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
bh | 399 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + info->s_dirsize); |
bh | 403 | fs/minix/namei.c | if (!bh) { |
bh | 404 | fs/minix/namei.c | bh = minix_bread(inode,block,0); |
bh | 405 | fs/minix/namei.c | if (!bh) { |
bh | 410 | fs/minix/namei.c | de = (struct minix_dir_entry *) (bh->b_data + offset); |
bh | 413 | fs/minix/namei.c | brelse(bh); |
bh | 416 | fs/minix/namei.c | if (offset < bh->b_size) |
bh | 418 | fs/minix/namei.c | brelse(bh); |
bh | 419 | fs/minix/namei.c | bh = NULL; |
bh | 423 | fs/minix/namei.c | brelse(bh); |
bh | 426 | fs/minix/namei.c | brelse(bh); |
bh | 435 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 439 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 441 | fs/minix/namei.c | if (!bh) |
bh | 472 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 482 | fs/minix/namei.c | brelse(bh); |
bh | 490 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 496 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 497 | fs/minix/namei.c | if (!bh) |
bh | 506 | fs/minix/namei.c | brelse(bh); |
bh | 525 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 533 | fs/minix/namei.c | brelse(bh); |
bh | 543 | fs/minix/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 569 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 570 | fs/minix/namei.c | if (bh) { |
bh | 574 | fs/minix/namei.c | brelse(bh); |
bh | 578 | fs/minix/namei.c | i = minix_add_entry(dir, name, len, &bh, &de); |
bh | 587 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 588 | fs/minix/namei.c | brelse(bh); |
bh | 598 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 610 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 611 | fs/minix/namei.c | if (bh) { |
bh | 612 | fs/minix/namei.c | brelse(bh); |
bh | 617 | fs/minix/namei.c | error = minix_add_entry(dir, name, len, &bh, &de); |
bh | 624 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 625 | fs/minix/namei.c | brelse(bh); |
bh | 45 | fs/minix/symlink.c | struct buffer_head * bh; |
bh | 66 | fs/minix/symlink.c | if (!(bh = minix_bread(inode, 0, 0))) { |
bh | 73 | fs/minix/symlink.c | error = open_namei(bh->b_data,flag,mode,res_inode,dir); |
bh | 75 | fs/minix/symlink.c | brelse(bh); |
bh | 81 | fs/minix/symlink.c | struct buffer_head * bh; |
bh | 91 | fs/minix/symlink.c | bh = minix_bread(inode, 0, 0); |
bh | 93 | fs/minix/symlink.c | if (!bh) |
bh | 96 | fs/minix/symlink.c | while (i<buflen && (c = bh->b_data[i])) { |
bh | 100 | fs/minix/symlink.c | brelse(bh); |
bh | 30 | fs/minix/truncate.c | struct buffer_head * bh; |
bh | 40 | fs/minix/truncate.c | bh = get_hash_table(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 42 | fs/minix/truncate.c | brelse(bh); |
bh | 45 | fs/minix/truncate.c | if ((bh && bh->b_count != 1) || tmp != *p) { |
bh | 47 | fs/minix/truncate.c | brelse(bh); |
bh | 52 | fs/minix/truncate.c | brelse(bh); |
bh | 60 | fs/minix/truncate.c | struct buffer_head * bh; |
bh | 89 | fs/minix/truncate.c | bh = get_hash_table(inode->i_dev,tmp,BLOCK_SIZE); |
bh | 91 | fs/minix/truncate.c | brelse(bh); |
bh | 94 | fs/minix/truncate.c | if ((bh && bh->b_count != 1) || tmp != *ind) { |
bh | 96 | fs/minix/truncate.c | brelse(bh); |
bh | 101 | fs/minix/truncate.c | brelse(bh); |
bh | 62 | fs/msdos/dir.c | struct buffer_head *bh; |
bh | 80 | fs/msdos/dir.c | bh = NULL; |
bh | 81 | fs/msdos/dir.c | while ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) { |
bh | 107 | fs/msdos/dir.c | brelse(bh); |
bh | 112 | fs/msdos/dir.c | if (bh) brelse(bh); |
bh | 20 | fs/msdos/fat.c | struct buffer_head *bh,*bh2,*c_bh,*c_bh2; |
bh | 31 | fs/msdos/fat.c | if (!(bh = msdos_sread(sb->s_dev,MSDOS_SB(sb)->fat_start+(first >> |
bh | 37 | fs/msdos/fat.c | bh2 = bh; |
bh | 43 | fs/msdos/fat.c | brelse(bh); |
bh | 77 | fs/msdos/fat.c | bh->b_dirt = 1; |
bh | 84 | fs/msdos/fat.c | if (data != data2 || bh != bh2) { |
bh | 98 | fs/msdos/fat.c | brelse(bh); |
bh | 86 | fs/msdos/file.c | struct buffer_head *bh; |
bh | 104 | fs/msdos/file.c | if (!(bh = msdos_sread(inode->i_dev,sector,&data))) break; |
bh | 117 | fs/msdos/file.c | brelse(bh); |
bh | 126 | fs/msdos/file.c | brelse(bh); |
bh | 141 | fs/msdos/file.c | struct buffer_head *bh; |
bh | 168 | fs/msdos/file.c | if (!(bh = msdos_sread(inode->i_dev,sector,&data))) { |
bh | 203 | fs/msdos/file.c | bh->b_dirt = 1; |
bh | 204 | fs/msdos/file.c | brelse(bh); |
bh | 147 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 163 | fs/msdos/inode.c | bh = bread(s->s_dev, 0, BLOCK_SIZE); |
bh | 165 | fs/msdos/inode.c | if (bh == NULL) { |
bh | 170 | fs/msdos/inode.c | b = (struct msdos_boot_sector *) bh->b_data; |
bh | 220 | fs/msdos/inode.c | brelse(bh); |
bh | 307 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 334 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, |
bh | 339 | fs/msdos/inode.c | raw_entry = &((struct msdos_dir_entry *) (bh->b_data)) |
bh | 386 | fs/msdos/inode.c | brelse(bh); |
bh | 392 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 397 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, |
bh | 402 | fs/msdos/inode.c | raw_entry = &((struct msdos_dir_entry *) (bh->b_data)) |
bh | 418 | fs/msdos/inode.c | bh->b_dirt = 1; |
bh | 419 | fs/msdos/inode.c | brelse(bh); |
bh | 113 | fs/msdos/misc.c | struct buffer_head *bh; |
bh | 172 | fs/msdos/misc.c | if (!(bh = getblk(inode->i_dev,sector >> 1, |
bh | 176 | fs/msdos/misc.c | memset(bh->b_data,0,BLOCK_SIZE); |
bh | 177 | fs/msdos/misc.c | bh->b_uptodate = 1; |
bh | 182 | fs/msdos/misc.c | if (!(bh = msdos_sread(inode->i_dev,sector, |
bh | 187 | fs/msdos/misc.c | if (bh) { |
bh | 188 | fs/msdos/misc.c | bh->b_dirt = 1; |
bh | 189 | fs/msdos/misc.c | brelse(bh); |
bh | 267 | fs/msdos/misc.c | int msdos_get_entry(struct inode *dir, off_t *pos,struct buffer_head **bh, |
bh | 280 | fs/msdos/misc.c | if (*bh) |
bh | 281 | fs/msdos/misc.c | brelse(*bh); |
bh | 282 | fs/msdos/misc.c | if (!(*bh = msdos_sread(dir->i_dev,sector,&data))) { |
bh | 350 | fs/msdos/misc.c | struct buffer_head *bh; |
bh | 355 | fs/msdos/misc.c | if (!(bh = msdos_sread(sb->s_dev,sector,(void **) &data))) return -EIO; |
bh | 368 | fs/msdos/misc.c | if (!res_bh) brelse(bh); |
bh | 370 | fs/msdos/misc.c | *res_bh = bh; |
bh | 376 | fs/msdos/misc.c | brelse(bh); |
bh | 94 | fs/msdos/namei.c | struct buffer_head **bh,struct msdos_dir_entry **de,int *ino) |
bh | 101 | fs/msdos/namei.c | return msdos_scan(dir,msdos_name,bh,de,ino); |
bh | 110 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 130 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) { |
bh | 134 | fs/msdos/namei.c | if (bh) brelse(bh); |
bh | 164 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 168 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) { |
bh | 172 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) return res; |
bh | 184 | fs/msdos/namei.c | bh->b_dirt = 1; |
bh | 187 | fs/msdos/namei.c | brelse(bh); |
bh | 199 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 211 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
bh | 213 | fs/msdos/namei.c | brelse(bh); |
bh | 246 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 258 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
bh | 260 | fs/msdos/namei.c | brelse(bh); |
bh | 304 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 311 | fs/msdos/namei.c | bh = NULL; |
bh | 312 | fs/msdos/namei.c | while (msdos_get_entry(dir,&pos,&bh,&de) > -1) |
bh | 316 | fs/msdos/namei.c | brelse(bh); |
bh | 319 | fs/msdos/namei.c | if (bh) |
bh | 320 | fs/msdos/namei.c | brelse(bh); |
bh | 329 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 333 | fs/msdos/namei.c | bh = NULL; |
bh | 338 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) goto rmdir_done; |
bh | 353 | fs/msdos/namei.c | bh->b_dirt = 1; |
bh | 356 | fs/msdos/namei.c | brelse(bh); |
bh | 366 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 370 | fs/msdos/namei.c | bh = NULL; |
bh | 372 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) |
bh | 387 | fs/msdos/namei.c | bh->b_dirt = 1; |
bh | 389 | fs/msdos/namei.c | brelse(bh); |
bh | 32 | fs/xiafs/bitmap.c | static int find_first_zero(struct buffer_head *bh, int start_bit, int end_bit) |
bh | 44 | fs/xiafs/bitmap.c | bmap=(u_long *)bh->b_data; |
bh | 68 | fs/xiafs/bitmap.c | bh->b_dirt=1; |
bh | 72 | fs/xiafs/bitmap.c | static void clear_buf(struct buffer_head * bh) |
bh | 77 | fs/xiafs/bitmap.c | lp=(long *)bh->b_data; |
bh | 78 | fs/xiafs/bitmap.c | for (i= bh->b_size >> 2; i-- > 0; ) |
bh | 179 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 202 | fs/xiafs/bitmap.c | bh = get__map_zone(sb, bmap_buf, bznr, cache, first_zone, |
bh | 204 | fs/xiafs/bitmap.c | if (!bh) |
bh | 206 | fs/xiafs/bitmap.c | tmp=find_first_zero(bh, start_bit, end_bit); |
bh | 223 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 235 | fs/xiafs/bitmap.c | bh = get_hash_table(sb->s_dev, d_addr, XIAFS_ZSIZE(sb)); |
bh | 236 | fs/xiafs/bitmap.c | if (bh) |
bh | 237 | fs/xiafs/bitmap.c | bh->b_dirt=0; |
bh | 238 | fs/xiafs/bitmap.c | brelse(bh); |
bh | 240 | fs/xiafs/bitmap.c | bh = get_zmap_zone(sb, bit, NULL); |
bh | 241 | fs/xiafs/bitmap.c | if (!bh) |
bh | 244 | fs/xiafs/bitmap.c | if (clear_bit(offset, bh->b_data)) |
bh | 248 | fs/xiafs/bitmap.c | bh->b_dirt = 1; |
bh | 254 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 270 | fs/xiafs/bitmap.c | if (!(bh = getblk(sb->s_dev, tmp, XIAFS_ZSIZE(sb)))) { |
bh | 274 | fs/xiafs/bitmap.c | if (bh->b_count != 1) { |
bh | 278 | fs/xiafs/bitmap.c | clear_buf(bh); |
bh | 279 | fs/xiafs/bitmap.c | bh->b_uptodate = 1; |
bh | 280 | fs/xiafs/bitmap.c | bh->b_dirt = 1; |
bh | 281 | fs/xiafs/bitmap.c | brelse(bh); |
bh | 287 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 300 | fs/xiafs/bitmap.c | bh = get_imap_zone(sb, ino, NULL); |
bh | 301 | fs/xiafs/bitmap.c | if (!bh) |
bh | 304 | fs/xiafs/bitmap.c | if (clear_bit(ino & (XIAFS_BITS_PER_Z(sb)-1), bh->b_data)) |
bh | 308 | fs/xiafs/bitmap.c | bh->b_dirt = 1; |
bh | 346 | fs/xiafs/bitmap.c | static u_long count_zone(struct buffer_head * bh) |
bh | 352 | fs/xiafs/bitmap.c | for (i=bh->b_size; i-- > 0; ) { |
bh | 353 | fs/xiafs/bitmap.c | tmp=bh->b_data[i]; |
bh | 361 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 368 | fs/xiafs/bitmap.c | bh=get_imap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), ¬_que); |
bh | 369 | fs/xiafs/bitmap.c | if (bh) { |
bh | 370 | fs/xiafs/bitmap.c | sum += count_zone(bh); |
bh | 380 | fs/xiafs/bitmap.c | struct buffer_head * bh; |
bh | 387 | fs/xiafs/bitmap.c | bh=get_zmap_zone(sb, i << XIAFS_BITS_PER_Z_BITS(sb), ¬_que); |
bh | 388 | fs/xiafs/bitmap.c | if (bh) { |
bh | 389 | fs/xiafs/bitmap.c | sum += count_zone(bh); |
bh | 69 | fs/xiafs/dir.c | struct buffer_head * bh; |
bh | 78 | fs/xiafs/dir.c | bh = xiafs_bread(inode, filp->f_pos >> XIAFS_ZSIZE_BITS(inode->i_sb),0); |
bh | 79 | fs/xiafs/dir.c | if (!bh) { |
bh | 83 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (offset + bh->b_data); |
bh | 87 | fs/xiafs/dir.c | (char *)de+de->d_rec_len > XIAFS_ZSIZE(inode->i_sb)+bh->b_data || |
bh | 92 | fs/xiafs/dir.c | brelse(bh); |
bh | 103 | fs/xiafs/dir.c | brelse(bh); |
bh | 110 | fs/xiafs/dir.c | de = (struct xiafs_direct *) (offset + bh->b_data); |
bh | 112 | fs/xiafs/dir.c | brelse(bh); |
bh | 193 | fs/xiafs/file.c | struct buffer_head * bh; |
bh | 214 | fs/xiafs/file.c | bh = xiafs_getblk(inode, pos >> XIAFS_ZSIZE_BITS(inode->i_sb), 1); |
bh | 215 | fs/xiafs/file.c | if (!bh) { |
bh | 223 | fs/xiafs/file.c | if (c != XIAFS_ZSIZE(inode->i_sb) && !bh->b_uptodate) { |
bh | 224 | fs/xiafs/file.c | ll_rw_block(READ, 1, &bh); |
bh | 225 | fs/xiafs/file.c | wait_on_buffer(bh); |
bh | 226 | fs/xiafs/file.c | if (!bh->b_uptodate) { |
bh | 227 | fs/xiafs/file.c | brelse(bh); |
bh | 233 | fs/xiafs/file.c | cp = (pos & (XIAFS_ZSIZE(inode->i_sb)-1)) + bh->b_data; |
bh | 242 | fs/xiafs/file.c | bh->b_uptodate = 1; |
bh | 243 | fs/xiafs/file.c | bh->b_dirt = 1; |
bh | 244 | fs/xiafs/file.c | brelse(bh); |
bh | 32 | fs/xiafs/fsync.c | struct buffer_head * bh; |
bh | 38 | fs/xiafs/fsync.c | bh = get_hash_table(inode->i_dev, *block, blocksize); |
bh | 39 | fs/xiafs/fsync.c | if (!bh) |
bh | 42 | fs/xiafs/fsync.c | brelse (bh); |
bh | 45 | fs/xiafs/fsync.c | if (wait && bh->b_req && !bh->b_uptodate) { |
bh | 46 | fs/xiafs/fsync.c | brelse(bh); |
bh | 49 | fs/xiafs/fsync.c | if (wait || !bh->b_uptodate || !bh->b_dirt) |
bh | 51 | fs/xiafs/fsync.c | brelse(bh); |
bh | 54 | fs/xiafs/fsync.c | ll_rw_block(WRITE, 1, &bh); |
bh | 55 | fs/xiafs/fsync.c | bh->b_count--; |
bh | 60 | fs/xiafs/fsync.c | struct buffer_head **bh, int wait) |
bh | 64 | fs/xiafs/fsync.c | *bh = NULL; |
bh | 71 | fs/xiafs/fsync.c | *bh = bread(inode->i_dev, tmp, blocksize); |
bh | 73 | fs/xiafs/fsync.c | brelse(*bh); |
bh | 74 | fs/xiafs/fsync.c | *bh = NULL; |
bh | 77 | fs/xiafs/fsync.c | if (!*bh) |
bh | 62 | fs/xiafs/inode.c | struct buffer_head *bh; |
bh | 71 | fs/xiafs/inode.c | if (!(bh = bread(dev, 0, BLOCK_SIZE))) { |
bh | 77 | fs/xiafs/inode.c | sp = (struct xiafs_super_block *) bh->b_data; |
bh | 82 | fs/xiafs/inode.c | brelse(bh); |
bh | 93 | fs/xiafs/inode.c | brelse(bh); |
bh | 95 | fs/xiafs/inode.c | bh = bread (dev, 0, s->s_blocksize); |
bh | 96 | fs/xiafs/inode.c | if(!bh) return NULL; |
bh | 97 | fs/xiafs/inode.c | sp = (struct xiafs_super_block *) (((char *)bh->b_data) + BLOCK_SIZE) ; |
bh | 107 | fs/xiafs/inode.c | brelse(bh); |
bh | 174 | fs/xiafs/inode.c | static int zone_bmap(struct buffer_head * bh, int nr) |
bh | 178 | fs/xiafs/inode.c | if (!bh) |
bh | 180 | fs/xiafs/inode.c | tmp = ((u_long *) bh->b_data)[nr]; |
bh | 181 | fs/xiafs/inode.c | brelse(bh); |
bh | 264 | fs/xiafs/inode.c | indt_getblk(struct inode * inode, struct buffer_head * bh, |
bh | 271 | fs/xiafs/inode.c | if (!bh) |
bh | 273 | fs/xiafs/inode.c | if (!bh->b_uptodate) { |
bh | 274 | fs/xiafs/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 275 | fs/xiafs/inode.c | wait_on_buffer(bh); |
bh | 276 | fs/xiafs/inode.c | if (!bh->b_uptodate) { |
bh | 277 | fs/xiafs/inode.c | brelse(bh); |
bh | 281 | fs/xiafs/inode.c | lp = nr + (u_long *) bh->b_data; |
bh | 284 | fs/xiafs/inode.c | result = getblk(bh->b_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 286 | fs/xiafs/inode.c | brelse(bh); |
bh | 293 | fs/xiafs/inode.c | brelse(bh); |
bh | 298 | fs/xiafs/inode.c | brelse(bh); |
bh | 301 | fs/xiafs/inode.c | result = getblk(bh->b_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 309 | fs/xiafs/inode.c | bh->b_dirt = 1; |
bh | 310 | fs/xiafs/inode.c | brelse(bh); |
bh | 316 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 334 | fs/xiafs/inode.c | bh = dt_getblk(inode, &(inode->u.xiafs_i.i_ind_zone), create, prev_addr); |
bh | 335 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone, create, prev_addr); |
bh | 336 | fs/xiafs/inode.c | return bh; |
bh | 339 | fs/xiafs/inode.c | bh = dt_getblk(inode, &(inode->u.xiafs_i.i_dind_zone), create, prev_addr); |
bh | 340 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone>>XIAFS_ADDRS_PER_Z_BITS(inode->i_sb), |
bh | 342 | fs/xiafs/inode.c | bh = indt_getblk(inode, bh, zone&(XIAFS_ADDRS_PER_Z(inode->i_sb)-1), |
bh | 344 | fs/xiafs/inode.c | return bh; |
bh | 349 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 351 | fs/xiafs/inode.c | bh = xiafs_getblk(inode, zone, create); |
bh | 352 | fs/xiafs/inode.c | if (!bh || bh->b_uptodate) |
bh | 353 | fs/xiafs/inode.c | return bh; |
bh | 354 | fs/xiafs/inode.c | ll_rw_block(READ, 1, &bh); |
bh | 355 | fs/xiafs/inode.c | wait_on_buffer(bh); |
bh | 356 | fs/xiafs/inode.c | if (bh->b_uptodate) |
bh | 357 | fs/xiafs/inode.c | return bh; |
bh | 358 | fs/xiafs/inode.c | brelse(bh); |
bh | 364 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 379 | fs/xiafs/inode.c | if (!(bh=bread(inode->i_dev, zone, XIAFS_ZSIZE(inode->i_sb)))) { |
bh | 383 | fs/xiafs/inode.c | raw_inode = ((struct xiafs_inode *) bh->b_data) + |
bh | 404 | fs/xiafs/inode.c | brelse(bh); |
bh | 421 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 441 | fs/xiafs/inode.c | if (!(bh=bread(inode->i_dev, zone, XIAFS_ZSIZE(inode->i_sb)))) { |
bh | 446 | fs/xiafs/inode.c | raw_inode = ((struct xiafs_inode *)bh->b_data) + |
bh | 469 | fs/xiafs/inode.c | bh->b_dirt=1; |
bh | 470 | fs/xiafs/inode.c | return bh; |
bh | 476 | fs/xiafs/inode.c | struct buffer_head * bh; |
bh | 477 | fs/xiafs/inode.c | bh = xiafs_update_inode(inode); |
bh | 478 | fs/xiafs/inode.c | brelse (bh); |
bh | 484 | fs/xiafs/inode.c | struct buffer_head *bh; |
bh | 486 | fs/xiafs/inode.c | bh = xiafs_update_inode(inode); |
bh | 487 | fs/xiafs/inode.c | if (bh && bh->b_dirt) |
bh | 489 | fs/xiafs/inode.c | ll_rw_block(WRITE, 1, &bh); |
bh | 490 | fs/xiafs/inode.c | wait_on_buffer(bh); |
bh | 491 | fs/xiafs/inode.c | if (bh->b_req && !bh->b_uptodate) |
bh | 498 | fs/xiafs/inode.c | else if (!bh) |
bh | 500 | fs/xiafs/inode.c | brelse (bh); |
bh | 61 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 76 | fs/xiafs/namei.c | bh = xiafs_bread(inode, i, 0); |
bh | 77 | fs/xiafs/namei.c | if (!bh) |
bh | 79 | fs/xiafs/namei.c | dep_pre=dep=(struct xiafs_direct *)bh->b_data; |
bh | 83 | fs/xiafs/namei.c | brelse(bh); |
bh | 90 | fs/xiafs/namei.c | dep->d_rec_len+(char *)dep > bh->b_data+XIAFS_ZSIZE(inode->i_sb) || |
bh | 93 | fs/xiafs/namei.c | brelse(bh); |
bh | 100 | fs/xiafs/namei.c | return bh; |
bh | 104 | fs/xiafs/namei.c | dep=(struct xiafs_direct *)(bh->b_data + pos); |
bh | 106 | fs/xiafs/namei.c | brelse(bh); |
bh | 120 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 129 | fs/xiafs/namei.c | if (!(bh = xiafs_find_entry(dir, name, len, &dep, NULL))) { |
bh | 134 | fs/xiafs/namei.c | brelse(bh); |
bh | 158 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 171 | fs/xiafs/namei.c | bh = xiafs_bread(dir, pos >> XIAFS_ZSIZE_BITS(dir->i_sb), pos ? 1:0); |
bh | 172 | fs/xiafs/namei.c | if (!bh) |
bh | 174 | fs/xiafs/namei.c | de_pre=de=(struct xiafs_direct *)bh->b_data; |
bh | 179 | fs/xiafs/namei.c | brelse(bh); |
bh | 183 | fs/xiafs/namei.c | de_pre=de=(struct xiafs_direct *)(bh->b_data+12); |
bh | 197 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(dir->i_sb) || |
bh | 201 | fs/xiafs/namei.c | brelse(bh); |
bh | 224 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 228 | fs/xiafs/namei.c | return bh; |
bh | 232 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
bh | 234 | fs/xiafs/namei.c | brelse(bh); |
bh | 248 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 262 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 263 | fs/xiafs/namei.c | if (!bh) { |
bh | 271 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 272 | fs/xiafs/namei.c | brelse(bh); |
bh | 281 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 286 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
bh | 287 | fs/xiafs/namei.c | if (bh) { |
bh | 288 | fs/xiafs/namei.c | brelse(bh); |
bh | 319 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 320 | fs/xiafs/namei.c | if (!bh) { |
bh | 328 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 329 | fs/xiafs/namei.c | brelse(bh); |
bh | 338 | fs/xiafs/namei.c | struct buffer_head * bh, *dir_block; |
bh | 341 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len,&de, NULL); |
bh | 342 | fs/xiafs/namei.c | if (bh) { |
bh | 343 | fs/xiafs/namei.c | brelse(bh); |
bh | 384 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 385 | fs/xiafs/namei.c | if (!bh) { |
bh | 392 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 397 | fs/xiafs/namei.c | brelse(bh); |
bh | 407 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 417 | fs/xiafs/namei.c | bh = xiafs_bread(inode, i, 0); |
bh | 419 | fs/xiafs/namei.c | if (!bh) { |
bh | 423 | fs/xiafs/namei.c | de=(struct xiafs_direct *)bh->b_data; |
bh | 427 | fs/xiafs/namei.c | brelse(bh); |
bh | 430 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(12 + bh->b_data); |
bh | 433 | fs/xiafs/namei.c | brelse(bh); |
bh | 440 | fs/xiafs/namei.c | if (!bh) |
bh | 443 | fs/xiafs/namei.c | de=(struct xiafs_direct *)(bh->b_data+offset); |
bh | 446 | fs/xiafs/namei.c | (char *)de+de->d_rec_len > bh->b_data+XIAFS_ZSIZE(inode->i_sb) || |
bh | 450 | fs/xiafs/namei.c | brelse(bh); |
bh | 454 | fs/xiafs/namei.c | brelse(bh); |
bh | 459 | fs/xiafs/namei.c | brelse(bh); |
bh | 488 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 492 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
bh | 494 | fs/xiafs/namei.c | if (!bh) |
bh | 521 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 531 | fs/xiafs/namei.c | brelse(bh); |
bh | 539 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 545 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, &de_pre); |
bh | 546 | fs/xiafs/namei.c | if (!bh) |
bh | 555 | fs/xiafs/namei.c | brelse(bh); |
bh | 569 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 576 | fs/xiafs/namei.c | brelse(bh); |
bh | 587 | fs/xiafs/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 591 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir,name,len, &de, NULL); |
bh | 592 | fs/xiafs/namei.c | if (bh) { |
bh | 593 | fs/xiafs/namei.c | brelse(bh); |
bh | 618 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 619 | fs/xiafs/namei.c | if (!bh) { |
bh | 627 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 628 | fs/xiafs/namei.c | brelse(bh); |
bh | 638 | fs/xiafs/namei.c | struct buffer_head * bh; |
bh | 650 | fs/xiafs/namei.c | bh = xiafs_find_entry(dir, name, len, &de, NULL); |
bh | 651 | fs/xiafs/namei.c | if (bh) { |
bh | 652 | fs/xiafs/namei.c | brelse(bh); |
bh | 657 | fs/xiafs/namei.c | bh = xiafs_add_entry(dir, name, len, &de, NULL); |
bh | 658 | fs/xiafs/namei.c | if (!bh) { |
bh | 664 | fs/xiafs/namei.c | bh->b_dirt = 1; |
bh | 665 | fs/xiafs/namei.c | brelse(bh); |
bh | 49 | fs/xiafs/symlink.c | struct buffer_head * bh; |
bh | 59 | fs/xiafs/symlink.c | bh = xiafs_bread(inode, 0, 0); |
bh | 65 | fs/xiafs/symlink.c | if (!bh) |
bh | 67 | fs/xiafs/symlink.c | for (i=0; i < buflen && (c=bh->b_data[i]); i++) |
bh | 71 | fs/xiafs/symlink.c | brelse(bh); |
bh | 79 | fs/xiafs/symlink.c | struct buffer_head * bh; |
bh | 104 | fs/xiafs/symlink.c | if (!(bh = xiafs_bread(inode, 0, 0))) { |
bh | 111 | fs/xiafs/symlink.c | error = open_namei(bh->b_data,flag,mode,res_inode,dir); |
bh | 113 | fs/xiafs/symlink.c | brelse(bh); |
bh | 42 | fs/xiafs/truncate.c | struct buffer_head * bh; |
bh | 53 | fs/xiafs/truncate.c | bh = getblk(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 55 | fs/xiafs/truncate.c | brelse(bh); |
bh | 58 | fs/xiafs/truncate.c | if ((bh && bh->b_count != 1) || tmp != *lp) |
bh | 66 | fs/xiafs/truncate.c | brelse(bh); |
bh | 76 | fs/xiafs/truncate.c | struct buffer_head * bh, * ind_bh; |
bh | 99 | fs/xiafs/truncate.c | bh = getblk(inode->i_dev, tmp, XIAFS_ZSIZE(inode->i_sb)); |
bh | 101 | fs/xiafs/truncate.c | brelse(bh); |
bh | 104 | fs/xiafs/truncate.c | if ((bh && bh->b_count != 1) || tmp != *indp) |
bh | 112 | fs/xiafs/truncate.c | brelse(bh); |
bh | 379 | include/linux/fs.h | extern void ll_rw_block(int rw, int nr, struct buffer_head * bh[]); |
bh | 212 | include/linux/iso_fs.h | extern void leak_check_brelse(struct buffer_head * bh); |
bh | 10 | include/linux/locks.h | extern inline void wait_on_buffer(struct buffer_head * bh) |
bh | 12 | include/linux/locks.h | if (bh->b_lock) |
bh | 13 | include/linux/locks.h | __wait_on_buffer(bh); |
bh | 16 | include/linux/locks.h | extern inline void lock_buffer(struct buffer_head * bh) |
bh | 18 | include/linux/locks.h | if (bh->b_lock) |
bh | 19 | include/linux/locks.h | __wait_on_buffer(bh); |
bh | 20 | include/linux/locks.h | bh->b_lock = 1; |
bh | 23 | include/linux/locks.h | extern inline void unlock_buffer(struct buffer_head * bh) |
bh | 25 | include/linux/locks.h | bh->b_lock = 0; |
bh | 26 | include/linux/locks.h | wake_up(&bh->b_wait); |
bh | 115 | include/linux/msdos_fs.h | struct buffer_head *bh; |
bh | 117 | include/linux/msdos_fs.h | if (!(bh = bread(dev,sector >> 1, 1024))) |
bh | 119 | include/linux/msdos_fs.h | *start = bh->b_data+((sector & 1) << SECTOR_BITS); |
bh | 120 | include/linux/msdos_fs.h | return bh; |
bh | 136 | include/linux/msdos_fs.h | extern int msdos_get_entry(struct inode *dir,off_t *pos,struct buffer_head **bh, |
bh | 94 | kernel/irq.c | struct bh_struct *bh; |
bh | 96 | kernel/irq.c | bh = bh_base; |
bh | 98 | kernel/irq.c | for (mask = 1, left = ~0 ; left & active ; bh++,mask += mask,left += left) { |
bh | 102 | kernel/irq.c | fn = bh->routine; |
bh | 105 | kernel/irq.c | fn(bh->data); |
bh | 313 | mm/mmap.c | struct buffer_head * bh; |
bh | 323 | mm/mmap.c | if (!(bh = bread(inode->i_dev,bmap(inode,0),inode->i_sb->s_blocksize))) |
bh | 329 | mm/mmap.c | brelse(bh); |