@@ -1214,8 +1214,7 @@ static void ext4_put_super(struct super_block *sb)
12141214
12151215 if (sbi -> s_journal ) {
12161216 aborted = is_journal_aborted (sbi -> s_journal );
1217- err = jbd2_journal_destroy (sbi -> s_journal );
1218- sbi -> s_journal = NULL ;
1217+ err = ext4_journal_destroy (sbi , sbi -> s_journal );
12191218 if ((err < 0 ) && !aborted ) {
12201219 ext4_abort (sb , - err , "Couldn't clean up the journal" );
12211220 }
@@ -4897,8 +4896,7 @@ static int ext4_load_and_init_journal(struct super_block *sb,
48974896out :
48984897 /* flush s_sb_upd_work before destroying the journal. */
48994898 flush_work (& sbi -> s_sb_upd_work );
4900- jbd2_journal_destroy (sbi -> s_journal );
4901- sbi -> s_journal = NULL ;
4899+ ext4_journal_destroy (sbi , sbi -> s_journal );
49024900 return - EINVAL ;
49034901}
49044902
@@ -5637,8 +5635,7 @@ failed_mount8: __maybe_unused
56375635 if (sbi -> s_journal ) {
56385636 /* flush s_sb_upd_work before journal destroy. */
56395637 flush_work (& sbi -> s_sb_upd_work );
5640- jbd2_journal_destroy (sbi -> s_journal );
5641- sbi -> s_journal = NULL ;
5638+ ext4_journal_destroy (sbi , sbi -> s_journal );
56425639 }
56435640failed_mount3a :
56445641 ext4_es_unregister_shrinker (sbi );
@@ -5917,7 +5914,7 @@ static journal_t *ext4_get_dev_journal(struct super_block *sb,
59175914 return journal ;
59185915
59195916out_journal :
5920- jbd2_journal_destroy ( journal );
5917+ ext4_journal_destroy ( EXT4_SB ( sb ), journal );
59215918out_bdev :
59225919 blkdev_put (bdev , sb );
59235920 return NULL ;
@@ -6034,8 +6031,7 @@ static int ext4_load_journal(struct super_block *sb,
60346031 EXT4_SB (sb )-> s_journal = journal ;
60356032 err = ext4_clear_journal_err (sb , es );
60366033 if (err ) {
6037- EXT4_SB (sb )-> s_journal = NULL ;
6038- jbd2_journal_destroy (journal );
6034+ ext4_journal_destroy (EXT4_SB (sb ), journal );
60396035 return err ;
60406036 }
60416037
@@ -6053,7 +6049,7 @@ static int ext4_load_journal(struct super_block *sb,
60536049 return 0 ;
60546050
60556051err_out :
6056- jbd2_journal_destroy ( journal );
6052+ ext4_journal_destroy ( EXT4_SB ( sb ), journal );
60576053 return err ;
60586054}
60596055
0 commit comments