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