diff options
-rw-r--r-- | fs/reiserfs/bitmap.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c index dc9a6829f7c6..1bcffeab713c 100644 --- a/fs/reiserfs/bitmap.c +++ b/fs/reiserfs/bitmap.c | |||
@@ -142,7 +142,6 @@ static int scan_bitmap_block(struct reiserfs_transaction_handle *th, | |||
142 | int org = *beg; | 142 | int org = *beg; |
143 | 143 | ||
144 | BUG_ON(!th->t_trans_id); | 144 | BUG_ON(!th->t_trans_id); |
145 | |||
146 | RFALSE(bmap_n >= reiserfs_bmap_count(s), "Bitmap %u is out of " | 145 | RFALSE(bmap_n >= reiserfs_bmap_count(s), "Bitmap %u is out of " |
147 | "range (0..%u)", bmap_n, reiserfs_bmap_count(s) - 1); | 146 | "range (0..%u)", bmap_n, reiserfs_bmap_count(s) - 1); |
148 | PROC_INFO_INC(s, scan_bitmap.bmap); | 147 | PROC_INFO_INC(s, scan_bitmap.bmap); |
@@ -321,7 +320,6 @@ static int scan_bitmap(struct reiserfs_transaction_handle *th, | |||
321 | unsigned int off_max = s->s_blocksize << 3; | 320 | unsigned int off_max = s->s_blocksize << 3; |
322 | 321 | ||
323 | BUG_ON(!th->t_trans_id); | 322 | BUG_ON(!th->t_trans_id); |
324 | |||
325 | PROC_INFO_INC(s, scan_bitmap.call); | 323 | PROC_INFO_INC(s, scan_bitmap.call); |
326 | if (SB_FREE_BLOCKS(s) <= 0) | 324 | if (SB_FREE_BLOCKS(s) <= 0) |
327 | return 0; // No point in looking for more free blocks | 325 | return 0; // No point in looking for more free blocks |
@@ -388,9 +386,7 @@ static void _reiserfs_free_block(struct reiserfs_transaction_handle *th, | |||
388 | unsigned int nr, offset; | 386 | unsigned int nr, offset; |
389 | 387 | ||
390 | BUG_ON(!th->t_trans_id); | 388 | BUG_ON(!th->t_trans_id); |
391 | |||
392 | PROC_INFO_INC(s, free_block); | 389 | PROC_INFO_INC(s, free_block); |
393 | |||
394 | rs = SB_DISK_SUPER_BLOCK(s); | 390 | rs = SB_DISK_SUPER_BLOCK(s); |
395 | sbh = SB_BUFFER_WITH_SB(s); | 391 | sbh = SB_BUFFER_WITH_SB(s); |
396 | apbi = SB_AP_BITMAP(s); | 392 | apbi = SB_AP_BITMAP(s); |
@@ -435,8 +431,8 @@ void reiserfs_free_block(struct reiserfs_transaction_handle *th, | |||
435 | int for_unformatted) | 431 | int for_unformatted) |
436 | { | 432 | { |
437 | struct super_block *s = th->t_super; | 433 | struct super_block *s = th->t_super; |
438 | BUG_ON(!th->t_trans_id); | ||
439 | 434 | ||
435 | BUG_ON(!th->t_trans_id); | ||
440 | RFALSE(!s, "vs-4061: trying to free block on nonexistent device"); | 436 | RFALSE(!s, "vs-4061: trying to free block on nonexistent device"); |
441 | if (!is_reusable(s, block, 1)) | 437 | if (!is_reusable(s, block, 1)) |
442 | return; | 438 | return; |
@@ -471,6 +467,7 @@ static void __discard_prealloc(struct reiserfs_transaction_handle *th, | |||
471 | unsigned long save = ei->i_prealloc_block; | 467 | unsigned long save = ei->i_prealloc_block; |
472 | int dirty = 0; | 468 | int dirty = 0; |
473 | struct inode *inode = &ei->vfs_inode; | 469 | struct inode *inode = &ei->vfs_inode; |
470 | |||
474 | BUG_ON(!th->t_trans_id); | 471 | BUG_ON(!th->t_trans_id); |
475 | #ifdef CONFIG_REISERFS_CHECK | 472 | #ifdef CONFIG_REISERFS_CHECK |
476 | if (ei->i_prealloc_count < 0) | 473 | if (ei->i_prealloc_count < 0) |
@@ -494,6 +491,7 @@ void reiserfs_discard_prealloc(struct reiserfs_transaction_handle *th, | |||
494 | struct inode *inode) | 491 | struct inode *inode) |
495 | { | 492 | { |
496 | struct reiserfs_inode_info *ei = REISERFS_I(inode); | 493 | struct reiserfs_inode_info *ei = REISERFS_I(inode); |
494 | |||
497 | BUG_ON(!th->t_trans_id); | 495 | BUG_ON(!th->t_trans_id); |
498 | if (ei->i_prealloc_count) | 496 | if (ei->i_prealloc_count) |
499 | __discard_prealloc(th, ei); | 497 | __discard_prealloc(th, ei); |
@@ -504,7 +502,6 @@ void reiserfs_discard_all_prealloc(struct reiserfs_transaction_handle *th) | |||
504 | struct list_head *plist = &SB_JOURNAL(th->t_super)->j_prealloc_list; | 502 | struct list_head *plist = &SB_JOURNAL(th->t_super)->j_prealloc_list; |
505 | 503 | ||
506 | BUG_ON(!th->t_trans_id); | 504 | BUG_ON(!th->t_trans_id); |
507 | |||
508 | while (!list_empty(plist)) { | 505 | while (!list_empty(plist)) { |
509 | struct reiserfs_inode_info *ei; | 506 | struct reiserfs_inode_info *ei; |
510 | ei = list_entry(plist->next, struct reiserfs_inode_info, | 507 | ei = list_entry(plist->next, struct reiserfs_inode_info, |
@@ -562,7 +559,7 @@ int reiserfs_parse_alloc_options(struct super_block *s, char *options) | |||
562 | if (!strcmp(this_char, "displacing_new_packing_localities")) { | 559 | if (!strcmp(this_char, "displacing_new_packing_localities")) { |
563 | SET_OPTION(displacing_new_packing_localities); | 560 | SET_OPTION(displacing_new_packing_localities); |
564 | continue; | 561 | continue; |
565 | }; | 562 | } |
566 | 563 | ||
567 | if (!strcmp(this_char, "old_hashed_relocation")) { | 564 | if (!strcmp(this_char, "old_hashed_relocation")) { |
568 | SET_OPTION(old_hashed_relocation); | 565 | SET_OPTION(old_hashed_relocation); |
@@ -729,6 +726,7 @@ void show_alloc_options(struct seq_file *seq, struct super_block *s) | |||
729 | static inline void new_hashed_relocation(reiserfs_blocknr_hint_t * hint) | 726 | static inline void new_hashed_relocation(reiserfs_blocknr_hint_t * hint) |
730 | { | 727 | { |
731 | char *hash_in; | 728 | char *hash_in; |
729 | |||
732 | if (hint->formatted_node) { | 730 | if (hint->formatted_node) { |
733 | hash_in = (char *)&hint->key.k_dir_id; | 731 | hash_in = (char *)&hint->key.k_dir_id; |
734 | } else { | 732 | } else { |
@@ -757,6 +755,7 @@ static void dirid_groups(reiserfs_blocknr_hint_t * hint) | |||
757 | __u32 dirid = 0; | 755 | __u32 dirid = 0; |
758 | int bm = 0; | 756 | int bm = 0; |
759 | struct super_block *sb = hint->th->t_super; | 757 | struct super_block *sb = hint->th->t_super; |
758 | |||
760 | if (hint->inode) | 759 | if (hint->inode) |
761 | dirid = le32_to_cpu(INODE_PKEY(hint->inode)->k_dir_id); | 760 | dirid = le32_to_cpu(INODE_PKEY(hint->inode)->k_dir_id); |
762 | else if (hint->formatted_node) | 761 | else if (hint->formatted_node) |