tag | line | file | source code |
bh | 23 | fs/block_dev.c | struct buffer_head * bh; |
bh | 38 | fs/block_dev.c | bh = getblk(dev, block, BLOCK_SIZE); |
bh | 40 | fs/block_dev.c | bh = breada(dev,block,block+1,block+2,-1); |
bh | 42 | fs/block_dev.c | if (!bh) |
bh | 44 | fs/block_dev.c | p = offset + bh->b_data; |
bh | 52 | fs/block_dev.c | bh->b_uptodate = 1; |
bh | 53 | fs/block_dev.c | bh->b_dirt = 1; |
bh | 54 | fs/block_dev.c | brelse(bh); |
bh | 67 | fs/block_dev.c | struct buffer_head * bh; |
bh | 81 | fs/block_dev.c | if (!(bh = breada(dev,block,block+1,block+2,-1))) |
bh | 84 | fs/block_dev.c | p = offset + bh->b_data; |
bh | 92 | fs/block_dev.c | brelse(bh); |
bh | 39 | fs/buffer.c | static inline void wait_on_buffer(struct buffer_head * bh) |
bh | 42 | fs/buffer.c | while (bh->b_lock) |
bh | 43 | fs/buffer.c | sleep_on(&bh->b_wait); |
bh | 50 | fs/buffer.c | struct buffer_head * bh; |
bh | 52 | fs/buffer.c | bh = free_list; |
bh | 53 | fs/buffer.c | for (i = nr_buffers*2 ; i-- > 0 ; bh = bh->b_next_free) { |
bh | 54 | fs/buffer.c | if (bh->b_lock) |
bh | 56 | fs/buffer.c | if (!bh->b_dirt) |
bh | 58 | fs/buffer.c | ll_rw_block(WRITE,bh); |
bh | 93 | fs/buffer.c | struct buffer_head * bh; |
bh | 95 | fs/buffer.c | bh = free_list; |
bh | 96 | fs/buffer.c | for (i = nr_buffers*2 ; --i > 0 ; bh = bh->b_next_free) { |
bh | 97 | fs/buffer.c | if (bh->b_dev != dev) |
bh | 99 | fs/buffer.c | wait_on_buffer(bh); |
bh | 100 | fs/buffer.c | if (bh->b_dev == dev) |
bh | 101 | fs/buffer.c | bh->b_uptodate = bh->b_dirt = 0; |
bh | 122 | fs/buffer.c | struct buffer_head * bh; |
bh | 126 | fs/buffer.c | if (!(bh = getblk(dev,0,1024))) |
bh | 128 | fs/buffer.c | i = floppy_change(bh); |
bh | 129 | fs/buffer.c | brelse(bh); |
bh | 142 | fs/buffer.c | static inline void remove_from_hash_queue(struct buffer_head * bh) |
bh | 144 | fs/buffer.c | if (bh->b_next) |
bh | 145 | fs/buffer.c | bh->b_next->b_prev = bh->b_prev; |
bh | 146 | fs/buffer.c | if (bh->b_prev) |
bh | 147 | fs/buffer.c | bh->b_prev->b_next = bh->b_next; |
bh | 148 | fs/buffer.c | if (hash(bh->b_dev,bh->b_blocknr) == bh) |
bh | 149 | fs/buffer.c | hash(bh->b_dev,bh->b_blocknr) = bh->b_next; |
bh | 150 | fs/buffer.c | bh->b_next = bh->b_prev = NULL; |
bh | 153 | fs/buffer.c | static inline void remove_from_free_list(struct buffer_head * bh) |
bh | 155 | fs/buffer.c | if (!(bh->b_prev_free) || !(bh->b_next_free)) |
bh | 157 | fs/buffer.c | bh->b_prev_free->b_next_free = bh->b_next_free; |
bh | 158 | fs/buffer.c | bh->b_next_free->b_prev_free = bh->b_prev_free; |
bh | 159 | fs/buffer.c | if (free_list == bh) |
bh | 160 | fs/buffer.c | free_list = bh->b_next_free; |
bh | 161 | fs/buffer.c | bh->b_next_free = bh->b_prev_free = NULL; |
bh | 164 | fs/buffer.c | static inline void remove_from_queues(struct buffer_head * bh) |
bh | 166 | fs/buffer.c | remove_from_hash_queue(bh); |
bh | 167 | fs/buffer.c | remove_from_free_list(bh); |
bh | 170 | fs/buffer.c | static inline void put_first_free(struct buffer_head * bh) |
bh | 172 | fs/buffer.c | if (!bh || (bh == free_list)) |
bh | 174 | fs/buffer.c | remove_from_free_list(bh); |
bh | 176 | fs/buffer.c | bh->b_next_free = free_list; |
bh | 177 | fs/buffer.c | bh->b_prev_free = free_list->b_prev_free; |
bh | 178 | fs/buffer.c | free_list->b_prev_free->b_next_free = bh; |
bh | 179 | fs/buffer.c | free_list->b_prev_free = bh; |
bh | 180 | fs/buffer.c | free_list = bh; |
bh | 183 | fs/buffer.c | static inline void put_last_free(struct buffer_head * bh) |
bh | 185 | fs/buffer.c | if (!bh) |
bh | 187 | fs/buffer.c | if (bh == free_list) { |
bh | 188 | fs/buffer.c | free_list = bh->b_next_free; |
bh | 191 | fs/buffer.c | remove_from_free_list(bh); |
bh | 193 | fs/buffer.c | bh->b_next_free = free_list; |
bh | 194 | fs/buffer.c | bh->b_prev_free = free_list->b_prev_free; |
bh | 195 | fs/buffer.c | free_list->b_prev_free->b_next_free = bh; |
bh | 196 | fs/buffer.c | free_list->b_prev_free = bh; |
bh | 199 | fs/buffer.c | static inline void insert_into_queues(struct buffer_head * bh) |
bh | 202 | fs/buffer.c | bh->b_next_free = free_list; |
bh | 203 | fs/buffer.c | bh->b_prev_free = free_list->b_prev_free; |
bh | 204 | fs/buffer.c | free_list->b_prev_free->b_next_free = bh; |
bh | 205 | fs/buffer.c | free_list->b_prev_free = bh; |
bh | 207 | fs/buffer.c | bh->b_prev = NULL; |
bh | 208 | fs/buffer.c | bh->b_next = NULL; |
bh | 209 | fs/buffer.c | if (!bh->b_dev) |
bh | 211 | fs/buffer.c | bh->b_next = hash(bh->b_dev,bh->b_blocknr); |
bh | 212 | fs/buffer.c | hash(bh->b_dev,bh->b_blocknr) = bh; |
bh | 213 | fs/buffer.c | if (bh->b_next) |
bh | 214 | fs/buffer.c | bh->b_next->b_prev = bh; |
bh | 241 | fs/buffer.c | struct buffer_head * bh; |
bh | 244 | fs/buffer.c | if (!(bh=find_buffer(dev,block,size))) |
bh | 246 | fs/buffer.c | bh->b_count++; |
bh | 247 | fs/buffer.c | wait_on_buffer(bh); |
bh | 248 | fs/buffer.c | if (bh->b_dev == dev && bh->b_blocknr == block && bh->b_size == size) { |
bh | 249 | fs/buffer.c | put_last_free(bh); |
bh | 250 | fs/buffer.c | return bh; |
bh | 252 | fs/buffer.c | bh->b_count--; |
bh | 266 | fs/buffer.c | #define BADNESS(bh) (((bh)->b_dirt<<1)+(bh)->b_lock) |
bh | 269 | fs/buffer.c | struct buffer_head * bh, * tmp; |
bh | 273 | fs/buffer.c | if (bh = get_hash_table(dev, block, size)) |
bh | 274 | fs/buffer.c | return bh; |
bh | 280 | fs/buffer.c | bh = NULL; |
bh | 285 | fs/buffer.c | if (!bh || BADNESS(tmp)<BADNESS(bh)) { |
bh | 286 | fs/buffer.c | bh = tmp; |
bh | 296 | fs/buffer.c | if (!bh && nr_free_pages > 5) { |
bh | 302 | fs/buffer.c | if (!bh) { |
bh | 306 | fs/buffer.c | wait_on_buffer(bh); |
bh | 307 | fs/buffer.c | if (bh->b_count || bh->b_size != size) |
bh | 309 | fs/buffer.c | if (bh->b_dirt) { |
bh | 310 | fs/buffer.c | sync_buffers(bh->b_dev); |
bh | 319 | fs/buffer.c | bh->b_count=1; |
bh | 320 | fs/buffer.c | bh->b_dirt=0; |
bh | 321 | fs/buffer.c | bh->b_uptodate=0; |
bh | 322 | fs/buffer.c | remove_from_queues(bh); |
bh | 323 | fs/buffer.c | bh->b_dev=dev; |
bh | 324 | fs/buffer.c | bh->b_blocknr=block; |
bh | 325 | fs/buffer.c | insert_into_queues(bh); |
bh | 326 | fs/buffer.c | return bh; |
bh | 345 | fs/buffer.c | struct buffer_head * bh; |
bh | 347 | fs/buffer.c | if (!(bh = getblk(dev, block, size))) { |
bh | 351 | fs/buffer.c | if (bh->b_uptodate) |
bh | 352 | fs/buffer.c | return bh; |
bh | 353 | fs/buffer.c | ll_rw_block(READ,bh); |
bh | 354 | fs/buffer.c | wait_on_buffer(bh); |
bh | 355 | fs/buffer.c | if (bh->b_uptodate) |
bh | 356 | fs/buffer.c | return bh; |
bh | 357 | fs/buffer.c | brelse(bh); |
bh | 376 | fs/buffer.c | struct buffer_head * bh[4]; |
bh | 381 | fs/buffer.c | if (bh[i] = getblk(dev, b[i], 1024)) |
bh | 382 | fs/buffer.c | if (!bh[i]->b_uptodate) |
bh | 383 | fs/buffer.c | ll_rw_block(READ,bh[i]); |
bh | 385 | fs/buffer.c | bh[i] = NULL; |
bh | 387 | fs/buffer.c | if (bh[i]) { |
bh | 388 | fs/buffer.c | wait_on_buffer(bh[i]); |
bh | 389 | fs/buffer.c | if (bh[i]->b_uptodate) |
bh | 390 | fs/buffer.c | COPYBLK((unsigned long) bh[i]->b_data,address); |
bh | 391 | fs/buffer.c | brelse(bh[i]); |
bh | 403 | fs/buffer.c | struct buffer_head * bh, *tmp; |
bh | 406 | fs/buffer.c | if (!(bh = getblk(dev, first, 1024))) { |
bh | 410 | fs/buffer.c | if (!bh->b_uptodate) |
bh | 411 | fs/buffer.c | ll_rw_block(READ,bh); |
bh | 421 | fs/buffer.c | wait_on_buffer(bh); |
bh | 422 | fs/buffer.c | if (bh->b_uptodate) |
bh | 423 | fs/buffer.c | return bh; |
bh | 424 | fs/buffer.c | brelse(bh); |
bh | 428 | fs/buffer.c | static void put_unused_buffer_head(struct buffer_head * bh) |
bh | 430 | fs/buffer.c | memset((void *) bh,0,sizeof(*bh)); |
bh | 431 | fs/buffer.c | bh->b_next_free = unused_list; |
bh | 432 | fs/buffer.c | unused_list = bh; |
bh | 438 | fs/buffer.c | struct buffer_head * bh; |
bh | 445 | fs/buffer.c | bh = (struct buffer_head *) page; |
bh | 446 | fs/buffer.c | while ((unsigned long) (bh+1) <= page+4096) { |
bh | 447 | fs/buffer.c | put_unused_buffer_head(bh); |
bh | 448 | fs/buffer.c | bh++; |
bh | 455 | fs/buffer.c | struct buffer_head * bh; |
bh | 460 | fs/buffer.c | bh = unused_list; |
bh | 461 | fs/buffer.c | unused_list = bh->b_next_free; |
bh | 462 | fs/buffer.c | bh->b_next_free = NULL; |
bh | 463 | fs/buffer.c | bh->b_data = NULL; |
bh | 464 | fs/buffer.c | bh->b_size = 0; |
bh | 465 | fs/buffer.c | return bh; |
bh | 478 | fs/buffer.c | struct buffer_head *bh, *tmp; |
bh | 490 | fs/buffer.c | bh = get_unused_buffer_head(); |
bh | 491 | fs/buffer.c | if (!bh) |
bh | 493 | fs/buffer.c | bh->b_this_page = tmp; |
bh | 494 | fs/buffer.c | tmp = bh; |
bh | 495 | fs/buffer.c | bh->b_data = (char * ) (page+i); |
bh | 496 | fs/buffer.c | bh->b_size = size; |
bh | 499 | fs/buffer.c | tmp = bh; |
bh | 512 | fs/buffer.c | tmp->b_this_page = bh; |
bh | 518 | fs/buffer.c | bh = tmp; |
bh | 519 | fs/buffer.c | while (bh) { |
bh | 520 | fs/buffer.c | tmp = bh; |
bh | 521 | fs/buffer.c | bh = bh->b_this_page; |
bh | 531 | fs/buffer.c | static int try_to_free(struct buffer_head * bh) |
bh | 536 | fs/buffer.c | tmp = bh; |
bh | 543 | fs/buffer.c | } while (tmp != bh); |
bh | 544 | fs/buffer.c | page = (unsigned long) bh->b_data; |
bh | 546 | fs/buffer.c | tmp = bh; |
bh | 553 | fs/buffer.c | } while (tmp != bh); |
bh | 563 | fs/buffer.c | struct buffer_head *bh; |
bh | 566 | fs/buffer.c | bh = free_list; |
bh | 567 | fs/buffer.c | for (i = nr_buffers*2 ; i-- > 0 ; bh = bh->b_next_free) { |
bh | 568 | fs/buffer.c | wait_on_buffer(bh); |
bh | 569 | fs/buffer.c | if (bh->b_count || !bh->b_this_page) |
bh | 571 | fs/buffer.c | if (bh->b_dirt) { |
bh | 572 | fs/buffer.c | ll_rw_block(WRITEA,bh); |
bh | 575 | fs/buffer.c | if (try_to_free(bh)) |
bh | 592 | fs/buffer.c | struct buffer_head * bh; |
bh | 611 | fs/buffer.c | bh = get_unused_buffer_head(); |
bh | 612 | fs/buffer.c | if (!bh) |
bh | 614 | fs/buffer.c | bh->b_data = (char *) mem; |
bh | 615 | fs/buffer.c | bh->b_size = BLOCK_SIZE; |
bh | 617 | fs/buffer.c | bh->b_next_free = free_list; |
bh | 618 | fs/buffer.c | bh->b_prev_free = free_list->b_prev_free; |
bh | 619 | fs/buffer.c | free_list->b_prev_free->b_next_free = bh; |
bh | 620 | fs/buffer.c | free_list->b_prev_free = bh; |
bh | 621 | fs/buffer.c | free_list = bh; |
bh | 170 | fs/exec.c | struct buffer_head * bh; |
bh | 187 | fs/exec.c | if (!(bh = bread(inode->i_dev,bmap(inode,0),inode->i_sb->s_blocksize))) { |
bh | 195 | fs/exec.c | ex = *(struct exec *) bh->b_data; |
bh | 196 | fs/exec.c | brelse(bh); |
bh | 356 | fs/exec.c | struct buffer_head *bh; |
bh | 367 | fs/exec.c | if (!(bh = bread(inode->i_dev, blkno, block_size))) |
bh | 373 | fs/exec.c | memcpy_tofs(dest, (blk ? bh->b_data : |
bh | 374 | fs/exec.c | bh->b_data + sizeof(struct exec)), n); |
bh | 375 | fs/exec.c | brelse(bh); |
bh | 394 | fs/exec.c | struct buffer_head * bh; |
bh | 450 | fs/exec.c | if (!(bh = bread(inode->i_dev,bmap(inode,0),inode->i_sb->s_blocksize))) { |
bh | 458 | fs/exec.c | ex = *((struct exec *) bh->b_data); /* read exec-header */ |
bh | 459 | fs/exec.c | if ((bh->b_data[0] == '#') && (bh->b_data[1] == '!') && (!sh_bang)) { |
bh | 468 | fs/exec.c | strncpy(buf, bh->b_data+2, 127); |
bh | 469 | fs/exec.c | brelse(bh); |
bh | 531 | fs/exec.c | brelse(bh); |
bh | 62 | fs/ext/bitmap.c | struct buffer_head *bh; |
bh | 65 | fs/ext/bitmap.c | if (!(bh=map[i])) |
bh | 74 | fs/ext/bitmap.c | tmp = bh->b_data[end] & ((1<<numbits)-1); |
bh | 79 | fs/ext/bitmap.c | sum += nibblemap[bh->b_data[j] & 0xf] |
bh | 80 | fs/ext/bitmap.c | + nibblemap[(bh->b_data[j]>>4)&0xf]; |
bh | 88 | fs/ext/bitmap.c | struct buffer_head * bh; |
bh | 95 | fs/ext/bitmap.c | bh = get_hash_table(dev,block); |
bh | 96 | fs/ext/bitmap.c | if (bh) { |
bh | 97 | fs/ext/bitmap.c | if (bh->b_count > 1) { |
bh | 98 | fs/ext/bitmap.c | brelse(bh); |
bh | 101 | fs/ext/bitmap.c | bh->b_dirt=0; |
bh | 102 | fs/ext/bitmap.c | bh->b_uptodate=0; |
bh | 103 | fs/ext/bitmap.c | if (bh->b_count) |
bh | 104 | fs/ext/bitmap.c | brelse(bh); |
bh | 109 | fs/ext/bitmap.c | bh = sb->s_zmap[zone]; |
bh | 110 | fs/ext/bitmap.c | if (clear_bit(bit,bh->b_data)) |
bh | 112 | fs/ext/bitmap.c | bh->b_dirt = 1; |
bh | 118 | fs/ext/bitmap.c | struct buffer_head * bh; |
bh | 126 | fs/ext/bitmap.c | if (bh=sb->s_zmap[i]) |
bh | 127 | fs/ext/bitmap.c | if ((j=find_first_zero(bh->b_data))<8192) |
bh | 129 | fs/ext/bitmap.c | if (i>=8 || !bh || j>=8192) |
bh | 131 | fs/ext/bitmap.c | if (set_bit(j,bh->b_data)) |
bh | 133 | fs/ext/bitmap.c | bh->b_dirt = 1; |
bh | 137 | fs/ext/bitmap.c | if (!(bh=getblk(dev,j))) |
bh | 139 | fs/ext/bitmap.c | if (bh->b_count != 1) |
bh | 141 | fs/ext/bitmap.c | clear_block(bh->b_data); |
bh | 142 | fs/ext/bitmap.c | bh->b_uptodate = 1; |
bh | 143 | fs/ext/bitmap.c | bh->b_dirt = 1; |
bh | 144 | fs/ext/bitmap.c | brelse(bh); |
bh | 159 | fs/ext/bitmap.c | struct buffer_head * bh; |
bh | 183 | fs/ext/bitmap.c | if (!(bh=inode->i_sb->s_imap[inode->i_ino>>13])) { |
bh | 187 | fs/ext/bitmap.c | if (clear_bit(inode->i_ino&8191,bh->b_data)) |
bh | 189 | fs/ext/bitmap.c | bh->b_dirt = 1; |
bh | 196 | fs/ext/bitmap.c | struct buffer_head * bh; |
bh | 209 | fs/ext/bitmap.c | if (bh=inode->i_sb->s_imap[i]) |
bh | 210 | fs/ext/bitmap.c | if ((j=find_first_zero(bh->b_data))<8192) |
bh | 212 | fs/ext/bitmap.c | if (!bh || j >= 8192 || j+i*8192 > inode->i_sb->s_ninodes) { |
bh | 216 | fs/ext/bitmap.c | if (set_bit(j,bh->b_data)) { /* shouldn't happen */ |
bh | 221 | fs/ext/bitmap.c | bh->b_dirt = 1; |
bh | 60 | fs/ext/dir.c | struct buffer_head * bh; |
bh | 70 | fs/ext/dir.c | if (!block || !(bh = bread(inode->i_dev, block, BLOCK_SIZE))) { |
bh | 74 | fs/ext/dir.c | de = (struct ext_dir_entry *) (offset + bh->b_data); |
bh | 88 | fs/ext/dir.c | brelse(bh); |
bh | 95 | fs/ext/dir.c | brelse(bh); |
bh | 68 | fs/ext/file.c | static inline void wait_on_buffer(struct buffer_head * bh) |
bh | 71 | fs/ext/file.c | while (bh->b_lock) |
bh | 72 | fs/ext/file.c | sleep_on(&bh->b_wait); |
bh | 164 | fs/ext/file.c | struct buffer_head * bh; |
bh | 194 | fs/ext/file.c | bh = getblk(inode->i_dev, block, BLOCK_SIZE); |
bh | 196 | fs/ext/file.c | bh = bread(inode->i_dev, block, BLOCK_SIZE); |
bh | 197 | fs/ext/file.c | if (!bh) { |
bh | 202 | fs/ext/file.c | p = (pos % BLOCK_SIZE) + bh->b_data; |
bh | 211 | fs/ext/file.c | bh->b_uptodate = 1; |
bh | 212 | fs/ext/file.c | bh->b_dirt = 1; |
bh | 213 | fs/ext/file.c | brelse(bh); |
bh | 52 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 60 | fs/ext/freelists.c | bh = get_hash_table(dev, block, sb->s_blocksize); |
bh | 61 | fs/ext/freelists.c | if (bh) { |
bh | 62 | fs/ext/freelists.c | if (bh->b_count > 1) { |
bh | 63 | fs/ext/freelists.c | brelse(bh); |
bh | 67 | fs/ext/freelists.c | bh->b_dirt=0; |
bh | 68 | fs/ext/freelists.c | bh->b_uptodate=0; |
bh | 69 | fs/ext/freelists.c | if (bh->b_count) |
bh | 70 | fs/ext/freelists.c | brelse(bh); |
bh | 98 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 133 | fs/ext/freelists.c | if (!(bh=getblk(dev, j, sb->s_blocksize))) |
bh | 135 | fs/ext/freelists.c | if (bh->b_count != 1) |
bh | 137 | fs/ext/freelists.c | clear_block(bh->b_data); |
bh | 138 | fs/ext/freelists.c | bh->b_uptodate = 1; |
bh | 139 | fs/ext/freelists.c | bh->b_dirt = 1; |
bh | 140 | fs/ext/freelists.c | brelse(bh); |
bh | 151 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 163 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
bh | 167 | fs/ext/freelists.c | efb = (struct ext_free_block *) bh->b_data; |
bh | 170 | fs/ext/freelists.c | brelse (bh); |
bh | 185 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 223 | fs/ext/freelists.c | if (!(bh = bread(inode->i_dev, block, inode->i_sb->s_blocksize))) |
bh | 225 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) bh->b_data) + |
bh | 230 | fs/ext/freelists.c | inode->i_sb->u.ext_sb.s_imap[1] = bh; |
bh | 304 | fs/ext/freelists.c | struct buffer_head * bh; |
bh | 323 | fs/ext/freelists.c | if (!(bh = bread (sb->s_dev, block, sb->s_blocksize))) { |
bh | 327 | fs/ext/freelists.c | efi = ((struct ext_free_inode *) bh->b_data) + |
bh | 331 | fs/ext/freelists.c | brelse (bh); |
bh | 67 | fs/ext/inode.c | struct buffer_head *bh; |
bh | 75 | fs/ext/inode.c | if (!(bh = bread(dev, 1, BLOCK_SIZE))) { |
bh | 83 | fs/ext/inode.c | es = (struct ext_super_block *) bh->b_data; |
bh | 101 | fs/ext/inode.c | brelse(bh); |
bh | 176 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 182 | fs/ext/inode.c | if (!(bh = bread(sb->s_dev, 1, BLOCK_SIZE))) { |
bh | 186 | fs/ext/inode.c | es = (struct ext_super_block *) bh->b_data; |
bh | 191 | fs/ext/inode.c | bh->b_dirt = 1; |
bh | 192 | fs/ext/inode.c | brelse (bh); |
bh | 214 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 242 | fs/ext/inode.c | if (!(bh = bread(inode->i_dev, inode->i_data[9], BLOCK_SIZE))) |
bh | 244 | fs/ext/inode.c | i = ((unsigned long *) (bh->b_data))[block]; |
bh | 247 | fs/ext/inode.c | ((unsigned long *) (bh->b_data))[block]=i; |
bh | 248 | fs/ext/inode.c | bh->b_dirt=1; |
bh | 250 | fs/ext/inode.c | brelse(bh); |
bh | 262 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, inode->i_data[10], BLOCK_SIZE))) |
bh | 264 | fs/ext/inode.c | i = ((unsigned long *)bh->b_data)[block>>8]; |
bh | 267 | fs/ext/inode.c | ((unsigned long *) (bh->b_data))[block>>8]=i; |
bh | 268 | fs/ext/inode.c | bh->b_dirt=1; |
bh | 270 | fs/ext/inode.c | brelse(bh); |
bh | 273 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, i, BLOCK_SIZE))) |
bh | 275 | fs/ext/inode.c | i = ((unsigned long *)bh->b_data)[block&255]; |
bh | 278 | fs/ext/inode.c | ((unsigned long *) (bh->b_data))[block&255]=i; |
bh | 279 | fs/ext/inode.c | bh->b_dirt=1; |
bh | 281 | fs/ext/inode.c | brelse(bh); |
bh | 291 | fs/ext/inode.c | if (!(bh = bread(inode->i_dev, inode->i_data[11], BLOCK_SIZE))) |
bh | 293 | fs/ext/inode.c | i = ((unsigned long *) bh->b_data)[block >> 16]; |
bh | 296 | fs/ext/inode.c | ((unsigned long *) bh->b_data)[block >> 16] = i; |
bh | 297 | fs/ext/inode.c | bh->b_dirt = 1; |
bh | 299 | fs/ext/inode.c | brelse (bh); |
bh | 302 | fs/ext/inode.c | if (!(bh = bread(inode->i_dev, i, BLOCK_SIZE))) |
bh | 304 | fs/ext/inode.c | i = ((unsigned long *) bh->b_data)[(block >> 8) & 255]; |
bh | 307 | fs/ext/inode.c | ((unsigned long *) bh->b_data)[(block >> 8) & 255] = i; |
bh | 308 | fs/ext/inode.c | bh->b_dirt = 1; |
bh | 310 | fs/ext/inode.c | brelse (bh); |
bh | 313 | fs/ext/inode.c | if (!(bh = bread(inode->i_dev, i, BLOCK_SIZE))) |
bh | 315 | fs/ext/inode.c | i = ((unsigned long *) bh->b_data)[block & 255]; |
bh | 318 | fs/ext/inode.c | ((unsigned long *) bh->b_data)[block & 255] = i; |
bh | 319 | fs/ext/inode.c | bh->b_dirt = 1; |
bh | 321 | fs/ext/inode.c | brelse (bh); |
bh | 340 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 351 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
bh | 353 | fs/ext/inode.c | raw_inode = ((struct ext_inode *) bh->b_data) + |
bh | 365 | fs/ext/inode.c | brelse(bh); |
bh | 388 | fs/ext/inode.c | struct buffer_head * bh; |
bh | 399 | fs/ext/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
bh | 401 | fs/ext/inode.c | raw_inode = ((struct ext_inode *)bh->b_data) + |
bh | 413 | fs/ext/inode.c | bh->b_dirt=1; |
bh | 415 | fs/ext/inode.c | brelse(bh); |
bh | 98 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 114 | fs/ext/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) |
bh | 122 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 124 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data) { |
bh | 125 | fs/ext/namei.c | brelse(bh); |
bh | 126 | fs/ext/namei.c | bh = NULL; |
bh | 128 | fs/ext/namei.c | !(bh = bread(dir->i_dev, block, BLOCK_SIZE))) { |
bh | 133 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 145 | 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 | 218 | fs/ext/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) |
bh | 223 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 225 | fs/ext/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data && offset < dir->i_size) { |
bh | 229 | fs/ext/namei.c | brelse(bh); |
bh | 230 | fs/ext/namei.c | bh = NULL; |
bh | 234 | fs/ext/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) { |
bh | 239 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 257 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 259 | fs/ext/namei.c | brelse (bh); |
bh | 260 | fs/ext/namei.c | bh = NULL; |
bh | 267 | fs/ext/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) |
bh | 269 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 296 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 298 | fs/ext/namei.c | return bh; |
bh | 303 | fs/ext/namei.c | brelse(bh); |
bh | 311 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 325 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 326 | fs/ext/namei.c | if (!bh) { |
bh | 334 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 335 | fs/ext/namei.c | brelse(bh); |
bh | 344 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 349 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 350 | fs/ext/namei.c | if (bh) { |
bh | 351 | fs/ext/namei.c | brelse(bh); |
bh | 384 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 385 | fs/ext/namei.c | if (!bh) { |
bh | 393 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 394 | fs/ext/namei.c | brelse(bh); |
bh | 403 | fs/ext/namei.c | struct buffer_head * bh, *dir_block; |
bh | 406 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 407 | fs/ext/namei.c | if (bh) { |
bh | 408 | fs/ext/namei.c | brelse(bh); |
bh | 455 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 456 | fs/ext/namei.c | if (!bh) { |
bh | 463 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 468 | fs/ext/namei.c | brelse(bh); |
bh | 480 | fs/ext/namei.c | struct buffer_head * bh; |
bh | 485 | fs/ext/namei.c | !(bh=bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE))) { |
bh | 489 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
bh | 500 | fs/ext/namei.c | if ((void *) de >= (void *) (bh->b_data+BLOCK_SIZE)) { |
bh | 501 | fs/ext/namei.c | brelse(bh); |
bh | 507 | fs/ext/namei.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
bh | 509 | fs/ext/namei.c | de = (struct ext_dir_entry *) bh->b_data; |
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 | 619 | fs/ext/namei.c | brelse(bh); |
bh | 629 | fs/ext/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 662 | fs/ext/namei.c | bh = ext_find_entry(dir,name,len,&de,NULL,NULL); |
bh | 663 | fs/ext/namei.c | if (bh) { |
bh | 667 | fs/ext/namei.c | brelse(bh); |
bh | 671 | fs/ext/namei.c | bh = ext_add_entry(dir,name,len,&de); |
bh | 672 | fs/ext/namei.c | if (!bh) { |
bh | 680 | fs/ext/namei.c | bh->b_dirt = 1; |
bh | 681 | fs/ext/namei.c | brelse(bh); |
bh | 690 | 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 | 49 | fs/ext/symlink.c | struct buffer_head * bh; |
bh | 65 | fs/ext/symlink.c | !(bh = bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE))) { |
bh | 73 | fs/ext/symlink.c | inode = _namei(bh->b_data,dir,1); |
bh | 76 | fs/ext/symlink.c | brelse(bh); |
bh | 82 | fs/ext/symlink.c | struct buffer_head * bh; |
bh | 93 | fs/ext/symlink.c | bh = bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE); |
bh | 95 | fs/ext/symlink.c | bh = NULL; |
bh | 97 | fs/ext/symlink.c | if (!bh) |
bh | 100 | fs/ext/symlink.c | while (i<buflen && (c = bh->b_data[i])) { |
bh | 104 | fs/ext/symlink.c | brelse(bh); |
bh | 55 | fs/ext/truncate.c | struct buffer_head * bh = NULL; |
bh | 61 | fs/ext/truncate.c | bh = bread(inode->i_dev, *p, BLOCK_SIZE); |
bh | 62 | fs/ext/truncate.c | if (!bh) |
bh | 70 | fs/ext/truncate.c | ind = i+(unsigned long *) bh->b_data; |
bh | 77 | fs/ext/truncate.c | ind = (unsigned long *) bh->b_data; |
bh | 81 | fs/ext/truncate.c | brelse(bh); |
bh | 93 | fs/ext/truncate.c | struct buffer_head * bh = NULL; |
bh | 99 | fs/ext/truncate.c | bh = bread(inode->i_dev, *p, BLOCK_SIZE); |
bh | 100 | fs/ext/truncate.c | if (!bh) |
bh | 108 | fs/ext/truncate.c | dind = i+(unsigned long *) bh->b_data; |
bh | 113 | fs/ext/truncate.c | dind = (unsigned long *) bh->b_data; |
bh | 117 | fs/ext/truncate.c | brelse(bh); |
bh | 129 | fs/ext/truncate.c | struct buffer_head * bh = NULL; |
bh | 135 | fs/ext/truncate.c | bh = bread(inode->i_dev, inode->i_data[11], BLOCK_SIZE); |
bh | 136 | fs/ext/truncate.c | if (!bh) |
bh | 144 | fs/ext/truncate.c | tind = i+(unsigned long *) bh->b_data; |
bh | 149 | fs/ext/truncate.c | tind = (unsigned long *) bh->b_data; |
bh | 153 | fs/ext/truncate.c | brelse(bh); |
bh | 53 | fs/minix/bitmap.c | struct buffer_head *bh; |
bh | 56 | fs/minix/bitmap.c | if (!(bh=map[i])) |
bh | 65 | fs/minix/bitmap.c | tmp = bh->b_data[end] & ((1<<numbits)-1); |
bh | 70 | fs/minix/bitmap.c | sum += nibblemap[bh->b_data[j] & 0xf] |
bh | 71 | fs/minix/bitmap.c | + nibblemap[(bh->b_data[j]>>4)&0xf]; |
bh | 79 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 86 | fs/minix/bitmap.c | bh = get_hash_table(dev,block,BLOCK_SIZE); |
bh | 87 | fs/minix/bitmap.c | if (bh) { |
bh | 88 | fs/minix/bitmap.c | if (bh->b_count > 1) { |
bh | 89 | fs/minix/bitmap.c | brelse(bh); |
bh | 92 | fs/minix/bitmap.c | bh->b_dirt=0; |
bh | 93 | fs/minix/bitmap.c | bh->b_uptodate=0; |
bh | 94 | fs/minix/bitmap.c | if (bh->b_count) |
bh | 95 | fs/minix/bitmap.c | brelse(bh); |
bh | 100 | fs/minix/bitmap.c | bh = sb->u.minix_sb.s_zmap[zone]; |
bh | 101 | fs/minix/bitmap.c | if (clear_bit(bit,bh->b_data)) |
bh | 103 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 109 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 117 | fs/minix/bitmap.c | if (bh=sb->u.minix_sb.s_zmap[i]) |
bh | 118 | fs/minix/bitmap.c | if ((j=find_first_zero(bh->b_data))<8192) |
bh | 120 | fs/minix/bitmap.c | if (i>=8 || !bh || j>=8192) |
bh | 122 | fs/minix/bitmap.c | if (set_bit(j,bh->b_data)) |
bh | 124 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 128 | fs/minix/bitmap.c | if (!(bh=getblk(dev,j,BLOCK_SIZE))) |
bh | 130 | fs/minix/bitmap.c | if (bh->b_count != 1) |
bh | 132 | fs/minix/bitmap.c | clear_block(bh->b_data); |
bh | 133 | fs/minix/bitmap.c | bh->b_uptodate = 1; |
bh | 134 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 135 | fs/minix/bitmap.c | brelse(bh); |
bh | 147 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 171 | fs/minix/bitmap.c | if (!(bh=inode->i_sb->u.minix_sb.s_imap[inode->i_ino>>13])) { |
bh | 175 | fs/minix/bitmap.c | if (clear_bit(inode->i_ino&8191,bh->b_data)) |
bh | 177 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 184 | fs/minix/bitmap.c | struct buffer_head * bh; |
bh | 197 | fs/minix/bitmap.c | if (bh=inode->i_sb->u.minix_sb.s_imap[i]) |
bh | 198 | fs/minix/bitmap.c | if ((j=find_first_zero(bh->b_data))<8192) |
bh | 200 | fs/minix/bitmap.c | if (!bh || j >= 8192 || j+i*8192 > inode->i_sb->u.minix_sb.s_ninodes) { |
bh | 204 | fs/minix/bitmap.c | if (set_bit(j,bh->b_data)) { /* shouldn't happen */ |
bh | 209 | fs/minix/bitmap.c | bh->b_dirt = 1; |
bh | 54 | fs/minix/dir.c | struct buffer_head * bh; |
bh | 64 | fs/minix/dir.c | if (!block || !(bh = bread(inode->i_dev,block,BLOCK_SIZE))) { |
bh | 68 | fs/minix/dir.c | de = (struct minix_dir_entry *) (offset + bh->b_data); |
bh | 82 | fs/minix/dir.c | brelse(bh); |
bh | 88 | fs/minix/dir.c | brelse(bh); |
bh | 62 | fs/minix/file.c | static inline void wait_on_buffer(struct buffer_head * bh) |
bh | 65 | fs/minix/file.c | while (bh->b_lock) |
bh | 66 | fs/minix/file.c | sleep_on(&bh->b_wait); |
bh | 164 | fs/minix/file.c | struct buffer_head * bh; |
bh | 194 | fs/minix/file.c | bh = getblk(inode->i_dev, block, BLOCK_SIZE); |
bh | 196 | fs/minix/file.c | bh = bread(inode->i_dev,block, BLOCK_SIZE); |
bh | 197 | fs/minix/file.c | if (!bh) { |
bh | 202 | fs/minix/file.c | p = (pos % BLOCK_SIZE) + bh->b_data; |
bh | 211 | fs/minix/file.c | bh->b_uptodate = 1; |
bh | 212 | fs/minix/file.c | bh->b_dirt = 1; |
bh | 213 | fs/minix/file.c | brelse(bh); |
bh | 51 | fs/minix/inode.c | struct buffer_head *bh; |
bh | 56 | fs/minix/inode.c | if (!(bh = bread(dev,1,BLOCK_SIZE))) { |
bh | 62 | fs/minix/inode.c | ms = (struct minix_super_block *) bh->b_data; |
bh | 72 | fs/minix/inode.c | brelse(bh); |
bh | 135 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 163 | fs/minix/inode.c | if (!(bh = bread(inode->i_dev,inode->i_data[7],BLOCK_SIZE))) |
bh | 165 | fs/minix/inode.c | i = ((unsigned short *) (bh->b_data))[block]; |
bh | 168 | fs/minix/inode.c | ((unsigned short *) (bh->b_data))[block]=i; |
bh | 169 | fs/minix/inode.c | bh->b_dirt=1; |
bh | 171 | fs/minix/inode.c | brelse(bh); |
bh | 182 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,inode->i_data[8], BLOCK_SIZE))) |
bh | 184 | fs/minix/inode.c | i = ((unsigned short *)bh->b_data)[block>>9]; |
bh | 187 | fs/minix/inode.c | ((unsigned short *) (bh->b_data))[block>>9]=i; |
bh | 188 | fs/minix/inode.c | bh->b_dirt=1; |
bh | 190 | fs/minix/inode.c | brelse(bh); |
bh | 193 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,i,BLOCK_SIZE))) |
bh | 195 | fs/minix/inode.c | i = ((unsigned short *)bh->b_data)[block&511]; |
bh | 198 | fs/minix/inode.c | ((unsigned short *) (bh->b_data))[block&511]=i; |
bh | 199 | fs/minix/inode.c | bh->b_dirt=1; |
bh | 201 | fs/minix/inode.c | brelse(bh); |
bh | 217 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 223 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev,block, BLOCK_SIZE))) |
bh | 225 | fs/minix/inode.c | raw_inode = ((struct minix_inode *) bh->b_data) + |
bh | 237 | fs/minix/inode.c | brelse(bh); |
bh | 260 | fs/minix/inode.c | struct buffer_head * bh; |
bh | 266 | fs/minix/inode.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
bh | 268 | fs/minix/inode.c | raw_inode = ((struct minix_inode *)bh->b_data) + |
bh | 280 | fs/minix/inode.c | bh->b_dirt=1; |
bh | 282 | fs/minix/inode.c | brelse(bh); |
bh | 65 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 81 | fs/minix/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) |
bh | 84 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
bh | 86 | fs/minix/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data) { |
bh | 87 | fs/minix/namei.c | brelse(bh); |
bh | 88 | fs/minix/namei.c | bh = NULL; |
bh | 90 | fs/minix/namei.c | !(bh = bread(dir->i_dev, block, BLOCK_SIZE))) { |
bh | 94 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
bh | 98 | fs/minix/namei.c | return bh; |
bh | 103 | fs/minix/namei.c | brelse(bh); |
bh | 112 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 121 | fs/minix/namei.c | if (!(bh = minix_find_entry(dir,name,len,&de))) { |
bh | 126 | fs/minix/namei.c | brelse(bh); |
bh | 149 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 166 | fs/minix/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) |
bh | 169 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
bh | 171 | fs/minix/namei.c | if ((char *)de >= BLOCK_SIZE+bh->b_data) { |
bh | 172 | fs/minix/namei.c | brelse(bh); |
bh | 173 | fs/minix/namei.c | bh = NULL; |
bh | 177 | fs/minix/namei.c | if (!(bh = bread(dir->i_dev, block, BLOCK_SIZE))) { |
bh | 181 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
bh | 193 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 195 | fs/minix/namei.c | return bh; |
bh | 200 | fs/minix/namei.c | brelse(bh); |
bh | 208 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 222 | fs/minix/namei.c | bh = minix_add_entry(dir,name,len,&de); |
bh | 223 | fs/minix/namei.c | if (!bh) { |
bh | 231 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 232 | fs/minix/namei.c | brelse(bh); |
bh | 241 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 246 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 247 | fs/minix/namei.c | if (bh) { |
bh | 248 | fs/minix/namei.c | brelse(bh); |
bh | 281 | fs/minix/namei.c | bh = minix_add_entry(dir,name,len,&de); |
bh | 282 | fs/minix/namei.c | if (!bh) { |
bh | 290 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 291 | fs/minix/namei.c | brelse(bh); |
bh | 300 | fs/minix/namei.c | struct buffer_head * bh, *dir_block; |
bh | 303 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 304 | fs/minix/namei.c | if (bh) { |
bh | 305 | fs/minix/namei.c | brelse(bh); |
bh | 343 | fs/minix/namei.c | bh = minix_add_entry(dir,name,len,&de); |
bh | 344 | fs/minix/namei.c | if (!bh) { |
bh | 351 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 356 | fs/minix/namei.c | brelse(bh); |
bh | 367 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 372 | fs/minix/namei.c | !(bh=bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE))) { |
bh | 376 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
bh | 385 | fs/minix/namei.c | if ((void *) de >= (void *) (bh->b_data+BLOCK_SIZE)) { |
bh | 386 | fs/minix/namei.c | brelse(bh); |
bh | 392 | fs/minix/namei.c | if (!(bh=bread(inode->i_dev, block, BLOCK_SIZE))) |
bh | 394 | fs/minix/namei.c | de = (struct minix_dir_entry *) bh->b_data; |
bh | 397 | fs/minix/namei.c | brelse(bh); |
bh | 403 | fs/minix/namei.c | brelse(bh); |
bh | 411 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 415 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 417 | fs/minix/namei.c | if (!bh) |
bh | 444 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 454 | fs/minix/namei.c | brelse(bh); |
bh | 462 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 467 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 468 | fs/minix/namei.c | if (!bh) |
bh | 485 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 491 | fs/minix/namei.c | brelse(bh); |
bh | 501 | fs/minix/namei.c | struct buffer_head * bh = NULL, * name_block = NULL; |
bh | 534 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 535 | fs/minix/namei.c | if (bh) { |
bh | 539 | fs/minix/namei.c | brelse(bh); |
bh | 543 | fs/minix/namei.c | bh = minix_add_entry(dir,name,len,&de); |
bh | 544 | fs/minix/namei.c | if (!bh) { |
bh | 552 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 553 | fs/minix/namei.c | brelse(bh); |
bh | 562 | fs/minix/namei.c | struct buffer_head * bh; |
bh | 569 | fs/minix/namei.c | bh = minix_find_entry(dir,name,len,&de); |
bh | 570 | fs/minix/namei.c | if (bh) { |
bh | 571 | fs/minix/namei.c | brelse(bh); |
bh | 576 | fs/minix/namei.c | bh = minix_add_entry(dir,name,len,&de); |
bh | 577 | fs/minix/namei.c | if (!bh) { |
bh | 583 | fs/minix/namei.c | bh->b_dirt = 1; |
bh | 584 | fs/minix/namei.c | brelse(bh); |
bh | 43 | fs/minix/symlink.c | struct buffer_head * bh; |
bh | 59 | fs/minix/symlink.c | !(bh = bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE))) { |
bh | 67 | fs/minix/symlink.c | inode = _namei(bh->b_data,dir,1); |
bh | 70 | fs/minix/symlink.c | brelse(bh); |
bh | 76 | fs/minix/symlink.c | struct buffer_head * bh; |
bh | 87 | fs/minix/symlink.c | bh = bread(inode->i_dev, inode->i_data[0], BLOCK_SIZE); |
bh | 89 | fs/minix/symlink.c | bh = NULL; |
bh | 91 | fs/minix/symlink.c | if (!bh) |
bh | 94 | fs/minix/symlink.c | while (i<buflen && (c = bh->b_data[i])) { |
bh | 98 | fs/minix/symlink.c | brelse(bh); |
bh | 49 | fs/minix/truncate.c | struct buffer_head * bh = NULL; |
bh | 55 | fs/minix/truncate.c | bh = bread(inode->i_dev, *p, BLOCK_SIZE); |
bh | 56 | fs/minix/truncate.c | if (!bh) |
bh | 64 | fs/minix/truncate.c | ind = i+(unsigned short *) bh->b_data; |
bh | 71 | fs/minix/truncate.c | ind = (unsigned short *) bh->b_data; |
bh | 75 | fs/minix/truncate.c | brelse(bh); |
bh | 87 | fs/minix/truncate.c | struct buffer_head * bh = NULL; |
bh | 93 | fs/minix/truncate.c | bh = bread(inode->i_dev, inode->i_data[8], BLOCK_SIZE); |
bh | 94 | fs/minix/truncate.c | if (!bh) |
bh | 102 | fs/minix/truncate.c | dind = i+(unsigned short *) bh->b_data; |
bh | 107 | fs/minix/truncate.c | dind = (unsigned short *) bh->b_data; |
bh | 111 | fs/minix/truncate.c | brelse(bh); |
bh | 72 | fs/msdos/dir.c | struct buffer_head *bh; |
bh | 90 | fs/msdos/dir.c | bh = NULL; |
bh | 91 | fs/msdos/dir.c | while ((ino = msdos_get_entry(inode,&filp->f_pos,&bh,&de)) > -1) { |
bh | 120 | fs/msdos/dir.c | brelse(bh); |
bh | 125 | fs/msdos/dir.c | if (bh) brelse(bh); |
bh | 19 | fs/msdos/fat.c | struct buffer_head *bh,*bh2,*c_bh,*c_bh2; |
bh | 29 | fs/msdos/fat.c | if (!(bh = msdos_sread(sb->s_dev,MSDOS_SB(sb)->fat_start+(first >> |
bh | 35 | fs/msdos/fat.c | bh2 = bh; |
bh | 41 | fs/msdos/fat.c | brelse(bh); |
bh | 74 | fs/msdos/fat.c | bh->b_dirt = 1; |
bh | 81 | fs/msdos/fat.c | if (data != data2 || bh != bh2) { |
bh | 95 | fs/msdos/fat.c | brelse(bh); |
bh | 82 | fs/msdos/file.c | struct buffer_head *bh; |
bh | 100 | fs/msdos/file.c | if (!(bh = msdos_sread(inode->i_dev,sector,&data))) break; |
bh | 113 | fs/msdos/file.c | brelse(bh); |
bh | 118 | fs/msdos/file.c | brelse(bh); |
bh | 131 | fs/msdos/file.c | struct buffer_head *bh; |
bh | 155 | fs/msdos/file.c | if (!(bh = msdos_sread(inode->i_dev,sector,&data))) { |
bh | 190 | fs/msdos/file.c | bh->b_dirt = 1; |
bh | 191 | fs/msdos/file.c | brelse(bh); |
bh | 92 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 103 | fs/msdos/inode.c | bh = bread(s->s_dev, 0, BLOCK_SIZE); |
bh | 105 | fs/msdos/inode.c | if (bh == NULL) { |
bh | 110 | fs/msdos/inode.c | b = (struct msdos_boot_sector *) bh->b_data; |
bh | 125 | fs/msdos/inode.c | brelse(bh); |
bh | 196 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 218 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, BLOCK_SIZE))) |
bh | 220 | fs/msdos/inode.c | raw_entry = &((struct msdos_dir_entry *) (bh->b_data)) |
bh | 248 | fs/msdos/inode.c | brelse(bh); |
bh | 254 | fs/msdos/inode.c | struct buffer_head *bh; |
bh | 259 | fs/msdos/inode.c | if (!(bh = bread(inode->i_dev,inode->i_ino >> MSDOS_DPB_BITS, BLOCK_SIZE))) |
bh | 261 | fs/msdos/inode.c | raw_entry = &((struct msdos_dir_entry *) (bh->b_data)) |
bh | 274 | fs/msdos/inode.c | bh->b_dirt = 1; |
bh | 275 | fs/msdos/inode.c | brelse(bh); |
bh | 67 | fs/msdos/misc.c | struct buffer_head *bh; |
bh | 128 | fs/msdos/misc.c | if (!(bh = getblk(inode->i_dev,sector >> 1, BLOCK_SIZE))) |
bh | 131 | fs/msdos/misc.c | memset(bh->b_data,0,BLOCK_SIZE); |
bh | 132 | fs/msdos/misc.c | bh->b_uptodate = 1; |
bh | 137 | fs/msdos/misc.c | if (!(bh = msdos_sread(inode->i_dev,sector,&data))) |
bh | 141 | fs/msdos/misc.c | if (bh) { |
bh | 142 | fs/msdos/misc.c | bh->b_dirt = 1; |
bh | 143 | fs/msdos/misc.c | brelse(bh); |
bh | 211 | fs/msdos/misc.c | int msdos_get_entry(struct inode *dir,int *pos,struct buffer_head **bh, |
bh | 224 | fs/msdos/misc.c | if (*bh) |
bh | 225 | fs/msdos/misc.c | brelse(*bh); |
bh | 226 | fs/msdos/misc.c | if (!(*bh = msdos_sread(dir->i_dev,sector,&data))) |
bh | 283 | fs/msdos/misc.c | struct buffer_head *bh; |
bh | 287 | fs/msdos/misc.c | if (!(bh = msdos_sread(sb->s_dev,sector,(void **) &data))) return -EIO; |
bh | 294 | fs/msdos/misc.c | brelse(bh); |
bh | 297 | fs/msdos/misc.c | brelse(bh); |
bh | 91 | fs/msdos/namei.c | struct buffer_head **bh,struct msdos_dir_entry **de,int *ino) |
bh | 98 | fs/msdos/namei.c | return msdos_scan(dir,msdos_name,bh,de,ino); |
bh | 107 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 128 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) { |
bh | 132 | fs/msdos/namei.c | if (bh) brelse(bh); |
bh | 159 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 163 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) { |
bh | 166 | fs/msdos/namei.c | if ((res = msdos_scan(dir,NULL,&bh,&de,&ino)) < 0) return res; |
bh | 173 | fs/msdos/namei.c | bh->b_dirt = 1; |
bh | 175 | fs/msdos/namei.c | brelse(bh); |
bh | 187 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 199 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
bh | 201 | fs/msdos/namei.c | brelse(bh); |
bh | 214 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 226 | fs/msdos/namei.c | if (msdos_scan(dir,msdos_name,&bh,&de,&ino) >= 0) { |
bh | 228 | fs/msdos/namei.c | brelse(bh); |
bh | 267 | fs/msdos/namei.c | struct buffer_head *bh,*dbh; |
bh | 271 | fs/msdos/namei.c | bh = NULL; |
bh | 275 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) goto rmdir_done; |
bh | 298 | fs/msdos/namei.c | bh->b_dirt = 1; |
bh | 301 | fs/msdos/namei.c | brelse(bh); |
bh | 311 | fs/msdos/namei.c | struct buffer_head *bh; |
bh | 315 | fs/msdos/namei.c | bh = NULL; |
bh | 317 | fs/msdos/namei.c | if ((res = msdos_find(dir,name,len,&bh,&de,&ino)) < 0) |
bh | 331 | fs/msdos/namei.c | bh->b_dirt = 1; |
bh | 333 | fs/msdos/namei.c | brelse(bh); |
bh | 257 | include/linux/fs.h | extern void ll_rw_block(int rw, struct buffer_head * bh); |
bh | 101 | include/linux/msdos_fs.h | struct buffer_head *bh; |
bh | 103 | include/linux/msdos_fs.h | if (!(bh = bread(dev,sector >> 1, 1024))) |
bh | 105 | include/linux/msdos_fs.h | *start = bh->b_data+((sector & 1) << SECTOR_BITS); |
bh | 106 | include/linux/msdos_fs.h | return bh; |
bh | 119 | include/linux/msdos_fs.h | extern int msdos_get_entry(struct inode *dir,int *pos,struct buffer_head **bh, |
bh | 32 | kernel/blk_drv/blk.h | struct buffer_head * bh; |
bh | 172 | kernel/blk_drv/blk.h | extern inline void unlock_buffer(struct buffer_head * bh) |
bh | 174 | kernel/blk_drv/blk.h | if (!bh->b_lock) |
bh | 176 | kernel/blk_drv/blk.h | bh->b_lock=0; |
bh | 177 | kernel/blk_drv/blk.h | wake_up(&bh->b_wait); |
bh | 183 | kernel/blk_drv/blk.h | struct buffer_head * bh; |
bh | 196 | kernel/blk_drv/blk.h | if (bh = req->bh) { |
bh | 197 | kernel/blk_drv/blk.h | req->bh = bh->b_reqnext; |
bh | 198 | kernel/blk_drv/blk.h | bh->b_reqnext = NULL; |
bh | 199 | kernel/blk_drv/blk.h | bh->b_uptodate = uptodate; |
bh | 200 | kernel/blk_drv/blk.h | unlock_buffer(bh); |
bh | 201 | kernel/blk_drv/blk.h | if (bh = req->bh) { |
bh | 202 | kernel/blk_drv/blk.h | req->current_nr_sectors = bh->b_size >> 9; |
bh | 207 | kernel/blk_drv/blk.h | req->buffer = bh->b_data; |
bh | 231 | kernel/blk_drv/blk.h | if (CURRENT->bh) { \ |
bh | 232 | kernel/blk_drv/blk.h | if (!CURRENT->bh->b_lock) \ |
bh | 298 | kernel/blk_drv/floppy.c | int floppy_change(struct buffer_head * bh) |
bh | 300 | kernel/blk_drv/floppy.c | unsigned int mask = 1 << (bh->b_dev & 0x03); |
bh | 302 | kernel/blk_drv/floppy.c | if (MAJOR(bh->b_dev) != 2) { |
bh | 317 | kernel/blk_drv/floppy.c | if (!bh) |
bh | 319 | kernel/blk_drv/floppy.c | if (bh->b_dirt) |
bh | 320 | kernel/blk_drv/floppy.c | ll_rw_block(WRITE,bh); |
bh | 323 | kernel/blk_drv/floppy.c | bh->b_uptodate = 0; |
bh | 324 | kernel/blk_drv/floppy.c | ll_rw_block(READ,bh); |
bh | 327 | kernel/blk_drv/floppy.c | while (bh->b_lock) |
bh | 328 | kernel/blk_drv/floppy.c | sleep_on(&bh->b_wait); |
bh | 913 | kernel/blk_drv/floppy.c | if (CURRENT->bh) { |
bh | 914 | kernel/blk_drv/floppy.c | if (!CURRENT->bh->b_lock) |
bh | 34 | kernel/blk_drv/genhd.c | struct buffer_head *bh; |
bh | 45 | kernel/blk_drv/genhd.c | if (!(bh = bread(dev,0,1024))) { |
bh | 53 | kernel/blk_drv/genhd.c | bh->b_dirt=0; |
bh | 54 | kernel/blk_drv/genhd.c | bh->b_uptodate=0; |
bh | 55 | kernel/blk_drv/genhd.c | if (*(unsigned short *) (bh->b_data+510) == 0xAA55) { |
bh | 56 | kernel/blk_drv/genhd.c | p = 0x1BE + (void *)bh->b_data; |
bh | 85 | kernel/blk_drv/genhd.c | brelse(bh); |
bh | 90 | kernel/blk_drv/genhd.c | brelse(bh); |
bh | 96 | kernel/blk_drv/genhd.c | struct buffer_head *bh; |
bh | 102 | kernel/blk_drv/genhd.c | if (!(bh = bread(dev,0,1024))) { |
bh | 108 | kernel/blk_drv/genhd.c | if (*(unsigned short *) (bh->b_data+510) == 0xAA55) { |
bh | 109 | kernel/blk_drv/genhd.c | p = 0x1BE + (void *)bh->b_data; |
bh | 126 | kernel/blk_drv/genhd.c | if (*(unsigned short *) (bh->b_data+0xfc) == 0x55AA) { |
bh | 127 | kernel/blk_drv/genhd.c | p = 0x1BE + (void *)bh->b_data; |
bh | 146 | kernel/blk_drv/genhd.c | brelse(bh); |
bh | 277 | kernel/blk_drv/hd.c | if (!i || (CURRENT->bh && !SUBSECTOR(i))) |
bh | 316 | kernel/blk_drv/hd.c | if (!i || (CURRENT->bh && !SUBSECTOR(i))) |
bh | 58 | kernel/blk_drv/ll_rw_blk.c | static inline void lock_buffer(struct buffer_head * bh) |
bh | 61 | kernel/blk_drv/ll_rw_blk.c | while (bh->b_lock) |
bh | 62 | kernel/blk_drv/ll_rw_blk.c | sleep_on(&bh->b_wait); |
bh | 63 | kernel/blk_drv/ll_rw_blk.c | bh->b_lock=1; |
bh | 67 | kernel/blk_drv/ll_rw_blk.c | static inline void unlock_buffer(struct buffer_head * bh) |
bh | 69 | kernel/blk_drv/ll_rw_blk.c | if (!bh->b_lock) |
bh | 71 | kernel/blk_drv/ll_rw_blk.c | bh->b_lock = 0; |
bh | 72 | kernel/blk_drv/ll_rw_blk.c | wake_up(&bh->b_wait); |
bh | 114 | kernel/blk_drv/ll_rw_blk.c | if (req->bh) |
bh | 115 | kernel/blk_drv/ll_rw_blk.c | req->bh->b_dirt = 0; |
bh | 123 | kernel/blk_drv/ll_rw_blk.c | if (!req->bh) |
bh | 124 | kernel/blk_drv/ll_rw_blk.c | if (tmp->next->bh) |
bh | 138 | kernel/blk_drv/ll_rw_blk.c | static void make_request(int major,int rw, struct buffer_head * bh) |
bh | 147 | kernel/blk_drv/ll_rw_blk.c | if (bh->b_lock) |
bh | 158 | kernel/blk_drv/ll_rw_blk.c | count = bh->b_size >> 9; |
bh | 159 | kernel/blk_drv/ll_rw_blk.c | sector = bh->b_blocknr * count; |
bh | 161 | kernel/blk_drv/ll_rw_blk.c | if (blk_size[major][MINOR(bh->b_dev)] < (sector + count)>>1) { |
bh | 162 | kernel/blk_drv/ll_rw_blk.c | bh->b_dirt = bh->b_uptodate = 0; |
bh | 165 | kernel/blk_drv/ll_rw_blk.c | lock_buffer(bh); |
bh | 166 | kernel/blk_drv/ll_rw_blk.c | if ((rw == WRITE && !bh->b_dirt) || (rw == READ && bh->b_uptodate)) { |
bh | 167 | kernel/blk_drv/ll_rw_blk.c | unlock_buffer(bh); |
bh | 174 | kernel/blk_drv/ll_rw_blk.c | if (req->dev == bh->b_dev && |
bh | 179 | kernel/blk_drv/ll_rw_blk.c | req->bhtail->b_reqnext = bh; |
bh | 180 | kernel/blk_drv/ll_rw_blk.c | req->bhtail = bh; |
bh | 182 | kernel/blk_drv/ll_rw_blk.c | bh->b_dirt = 0; |
bh | 203 | kernel/blk_drv/ll_rw_blk.c | unlock_buffer(bh); |
bh | 212 | kernel/blk_drv/ll_rw_blk.c | req->dev = bh->b_dev; |
bh | 218 | kernel/blk_drv/ll_rw_blk.c | req->buffer = bh->b_data; |
bh | 220 | kernel/blk_drv/ll_rw_blk.c | req->bh = bh; |
bh | 221 | kernel/blk_drv/ll_rw_blk.c | req->bhtail = bh; |
bh | 261 | kernel/blk_drv/ll_rw_blk.c | req->bh = NULL; |
bh | 268 | kernel/blk_drv/ll_rw_blk.c | void ll_rw_block(int rw, struct buffer_head * bh) |
bh | 272 | kernel/blk_drv/ll_rw_blk.c | if (!bh) |
bh | 274 | kernel/blk_drv/ll_rw_blk.c | if (bh->b_size != 1024) { |
bh | 275 | kernel/blk_drv/ll_rw_blk.c | printk("ll_rw_block: only 1024-char blocks implemented (%d)\n",bh->b_size); |
bh | 276 | kernel/blk_drv/ll_rw_blk.c | bh->b_dirt = bh->b_uptodate = 0; |
bh | 279 | kernel/blk_drv/ll_rw_blk.c | if ((major=MAJOR(bh->b_dev)) >= NR_BLK_DEV || |
bh | 281 | kernel/blk_drv/ll_rw_blk.c | printk("ll_rw_block: Trying to read nonexistent block-device %04x (%d)\n",bh->b_dev,bh->b_blocknr); |
bh | 282 | kernel/blk_drv/ll_rw_blk.c | bh->b_dirt = bh->b_uptodate = 0; |
bh | 285 | kernel/blk_drv/ll_rw_blk.c | if ((rw == WRITE || rw == WRITEA) && is_read_only(bh->b_dev)) { |
bh | 286 | kernel/blk_drv/ll_rw_blk.c | printk("Can't write to read-only device 0x%X\n\r",bh->b_dev); |
bh | 287 | kernel/blk_drv/ll_rw_blk.c | bh->b_dirt = bh->b_uptodate = 0; |
bh | 290 | kernel/blk_drv/ll_rw_blk.c | make_request(major,rw,bh); |
bh | 348 | kernel/blk_drv/ll_rw_blk.c | req->bh = NULL; |
bh | 88 | kernel/blk_drv/ramdisk.c | struct buffer_head *bh; |
bh | 101 | kernel/blk_drv/ramdisk.c | bh = breada(ROOT_DEV,block+1,block,block+2,-1); |
bh | 102 | kernel/blk_drv/ramdisk.c | if (!bh) { |
bh | 106 | kernel/blk_drv/ramdisk.c | *((struct minix_super_block *) &s) = *((struct minix_super_block *) bh->b_data); |
bh | 107 | kernel/blk_drv/ramdisk.c | brelse(bh); |
bh | 122 | kernel/blk_drv/ramdisk.c | bh = breada(ROOT_DEV, block, block+1, block+2, -1); |
bh | 124 | kernel/blk_drv/ramdisk.c | bh = bread(ROOT_DEV, block, BLOCK_SIZE); |
bh | 125 | kernel/blk_drv/ramdisk.c | if (!bh) { |
bh | 130 | kernel/blk_drv/ramdisk.c | (void) memcpy(cp, bh->b_data, BLOCK_SIZE); |
bh | 131 | kernel/blk_drv/ramdisk.c | brelse(bh); |
bh | 128 | kernel/blk_drv/scsi/sd.c | if (!CURRENT->bh) |
bh | 249 | kernel/blk_drv/scsi/sd.c | if (!CURRENT->bh) |