When failing from creating cache jbd2_inode_cache, we will destroy the previously created cache jbd2_handle_cache twice. This patch fixes this by moving each cache initialization/destruction to its own separate, individual function.
Showing the changes to include/linux (1 of 4 files). Show all
Unified · Split
| @@ -1318,7 +1318,7 @@ extern void __wait_on_journal (journal_t *); · 1317 unmodified lines | |||
| 1318 | 1318 | ||
| 1319 | /* Transaction cache support */ | 1319 | /* Transaction cache support */ |
| 1320 | extern void jbd2_journal_destroy_transaction_cache(void); | 1320 | extern void jbd2_journal_destroy_transaction_cache(void); |
| 1321 | extern int jbd2_journal_init_transaction_cache(void); | 1321 | extern int __init jbd2_journal_init_transaction_cache(void); |
| 1322 | extern void jbd2_journal_free_transaction(transaction_t *); | 1322 | extern void jbd2_journal_free_transaction(transaction_t *); |
| 1323 | 1323 | ||
| 1324 | /* | 1324 | /* |
| @@ -1446,8 +1446,10 @@ static inline void jbd2_free_inode(struct jbd2_inode *jinode) · 121 unmodified lines | |||
| 1446 | /* Primary revoke support */ | 1446 | /* Primary revoke support */ |
| 1447 | #define JOURNAL_REVOKE_DEFAULT_HASH 256 | 1447 | #define JOURNAL_REVOKE_DEFAULT_HASH 256 |
| 1448 | extern int jbd2_journal_init_revoke(journal_t *, int); | 1448 | extern int jbd2_journal_init_revoke(journal_t *, int); |
| 1449 | extern void jbd2_journal_destroy_revoke_caches(void); | 1449 | extern void jbd2_journal_destroy_revoke_record_cache(void); |
| 1450 | extern int jbd2_journal_init_revoke_caches(void); | 1450 | extern void jbd2_journal_destroy_revoke_table_cache(void); |
| 1451 | extern int __init jbd2_journal_init_revoke_record_cache(void); | ||
| 1452 | extern int __init jbd2_journal_init_revoke_table_cache(void); | ||
| 1451 | 1453 | ||
| 1452 | extern void jbd2_journal_destroy_revoke(journal_t *); | 1454 | extern void jbd2_journal_destroy_revoke(journal_t *); |
| 1453 | extern int jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *); | 1455 | extern int jbd2_journal_revoke (handle_t *, unsigned long long, struct buffer_head *); |