diff options
Diffstat (limited to 'fs/reiserfs/super.c')
-rw-r--r-- | fs/reiserfs/super.c | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index c78e99e196fa..c89aa2338191 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -432,7 +432,6 @@ int remove_save_link(struct inode *inode, int truncate) | |||
432 | 432 | ||
433 | static void reiserfs_put_super(struct super_block *s) | 433 | static void reiserfs_put_super(struct super_block *s) |
434 | { | 434 | { |
435 | int i; | ||
436 | struct reiserfs_transaction_handle th; | 435 | struct reiserfs_transaction_handle th; |
437 | th.t_trans_id = 0; | 436 | th.t_trans_id = 0; |
438 | 437 | ||
@@ -462,10 +461,7 @@ static void reiserfs_put_super(struct super_block *s) | |||
462 | */ | 461 | */ |
463 | journal_release(&th, s); | 462 | journal_release(&th, s); |
464 | 463 | ||
465 | for (i = 0; i < SB_BMAP_NR(s); i++) | 464 | reiserfs_free_bitmap_cache(s); |
466 | brelse(SB_AP_BITMAP(s)[i].bh); | ||
467 | |||
468 | vfree(SB_AP_BITMAP(s)); | ||
469 | 465 | ||
470 | brelse(SB_BUFFER_WITH_SB(s)); | 466 | brelse(SB_BUFFER_WITH_SB(s)); |
471 | 467 | ||
@@ -1344,7 +1340,6 @@ static int read_super_block(struct super_block *s, int offset) | |||
1344 | /* after journal replay, reread all bitmap and super blocks */ | 1340 | /* after journal replay, reread all bitmap and super blocks */ |
1345 | static int reread_meta_blocks(struct super_block *s) | 1341 | static int reread_meta_blocks(struct super_block *s) |
1346 | { | 1342 | { |
1347 | int i; | ||
1348 | ll_rw_block(READ, 1, &(SB_BUFFER_WITH_SB(s))); | 1343 | ll_rw_block(READ, 1, &(SB_BUFFER_WITH_SB(s))); |
1349 | wait_on_buffer(SB_BUFFER_WITH_SB(s)); | 1344 | wait_on_buffer(SB_BUFFER_WITH_SB(s)); |
1350 | if (!buffer_uptodate(SB_BUFFER_WITH_SB(s))) { | 1345 | if (!buffer_uptodate(SB_BUFFER_WITH_SB(s))) { |
@@ -1353,20 +1348,7 @@ static int reread_meta_blocks(struct super_block *s) | |||
1353 | return 1; | 1348 | return 1; |
1354 | } | 1349 | } |
1355 | 1350 | ||
1356 | for (i = 0; i < SB_BMAP_NR(s); i++) { | ||
1357 | ll_rw_block(READ, 1, &(SB_AP_BITMAP(s)[i].bh)); | ||
1358 | wait_on_buffer(SB_AP_BITMAP(s)[i].bh); | ||
1359 | if (!buffer_uptodate(SB_AP_BITMAP(s)[i].bh)) { | ||
1360 | reiserfs_warning(s, | ||
1361 | "reread_meta_blocks, error reading bitmap block number %d at %llu", | ||
1362 | i, | ||
1363 | (unsigned long long)SB_AP_BITMAP(s)[i]. | ||
1364 | bh->b_blocknr); | ||
1365 | return 1; | ||
1366 | } | ||
1367 | } | ||
1368 | return 0; | 1351 | return 0; |
1369 | |||
1370 | } | 1352 | } |
1371 | 1353 | ||
1372 | ///////////////////////////////////////////////////// | 1354 | ///////////////////////////////////////////////////// |
@@ -1547,7 +1529,6 @@ static int function2code(hashf_t func) | |||
1547 | static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | 1529 | static int reiserfs_fill_super(struct super_block *s, void *data, int silent) |
1548 | { | 1530 | { |
1549 | struct inode *root_inode; | 1531 | struct inode *root_inode; |
1550 | int j; | ||
1551 | struct reiserfs_transaction_handle th; | 1532 | struct reiserfs_transaction_handle th; |
1552 | int old_format = 0; | 1533 | int old_format = 0; |
1553 | unsigned long blocks; | 1534 | unsigned long blocks; |
@@ -1793,19 +1774,17 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent) | |||
1793 | if (jinit_done) { /* kill the commit thread, free journal ram */ | 1774 | if (jinit_done) { /* kill the commit thread, free journal ram */ |
1794 | journal_release_error(NULL, s); | 1775 | journal_release_error(NULL, s); |
1795 | } | 1776 | } |
1796 | if (SB_DISK_SUPER_BLOCK(s)) { | 1777 | |
1797 | for (j = 0; j < SB_BMAP_NR(s); j++) { | 1778 | reiserfs_free_bitmap_cache(s); |
1798 | if (SB_AP_BITMAP(s)) | ||
1799 | brelse(SB_AP_BITMAP(s)[j].bh); | ||
1800 | } | ||
1801 | vfree(SB_AP_BITMAP(s)); | ||
1802 | } | ||
1803 | if (SB_BUFFER_WITH_SB(s)) | 1779 | if (SB_BUFFER_WITH_SB(s)) |
1804 | brelse(SB_BUFFER_WITH_SB(s)); | 1780 | brelse(SB_BUFFER_WITH_SB(s)); |
1805 | #ifdef CONFIG_QUOTA | 1781 | #ifdef CONFIG_QUOTA |
1806 | for (j = 0; j < MAXQUOTAS; j++) { | 1782 | { |
1807 | kfree(sbi->s_qf_names[j]); | 1783 | int j; |
1808 | sbi->s_qf_names[j] = NULL; | 1784 | for (j = 0; j < MAXQUOTAS; j++) { |
1785 | kfree(sbi->s_qf_names[j]); | ||
1786 | sbi->s_qf_names[j] = NULL; | ||
1787 | } | ||
1809 | } | 1788 | } |
1810 | #endif | 1789 | #endif |
1811 | kfree(sbi); | 1790 | kfree(sbi); |