@@ -1209,8 +1209,7 @@ static void ext4_put_super(struct super_block *sb)
12091209
12101210 if (sbi -> s_journal ) {
12111211 aborted = is_journal_aborted (sbi -> s_journal );
1212- err = jbd2_journal_destroy (sbi -> s_journal );
1213- sbi -> s_journal = NULL ;
1212+ err = ext4_journal_destroy (sbi , sbi -> s_journal );
12141213 if ((err < 0 ) && !aborted ) {
12151214 ext4_abort (sb , - err , "Couldn't clean up the journal" );
12161215 }
@@ -4894,8 +4893,7 @@ static int ext4_load_and_init_journal(struct super_block *sb,
48944893out :
48954894 /* flush s_sb_upd_work before destroying the journal. */
48964895 flush_work (& sbi -> s_sb_upd_work );
4897- jbd2_journal_destroy (sbi -> s_journal );
4898- sbi -> s_journal = NULL ;
4896+ ext4_journal_destroy (sbi , sbi -> s_journal );
48994897 return - EINVAL ;
49004898}
49014899
@@ -5603,8 +5601,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
56035601 if (sbi -> s_journal ) {
56045602 /* flush s_sb_upd_work before journal destroy. */
56055603 flush_work (& sbi -> s_sb_upd_work );
5606- jbd2_journal_destroy (sbi -> s_journal );
5607- sbi -> s_journal = NULL ;
5604+ ext4_journal_destroy (sbi , sbi -> s_journal );
56085605 }
56095606failed_mount3a :
56105607 ext4_es_unregister_shrinker (sbi );
@@ -5858,7 +5855,7 @@ static journal_t *ext4_get_dev_journal(struct super_block *sb,
58585855 return journal ;
58595856
58605857out_journal :
5861- jbd2_journal_destroy ( journal );
5858+ ext4_journal_destroy ( EXT4_SB ( sb ), journal );
58625859out_bdev :
58635860 ext4_blkdev_put (bdev );
58645861 return NULL ;
@@ -5958,8 +5955,7 @@ static int ext4_load_journal(struct super_block *sb,
59585955 EXT4_SB (sb )-> s_journal = journal ;
59595956 err = ext4_clear_journal_err (sb , es );
59605957 if (err ) {
5961- EXT4_SB (sb )-> s_journal = NULL ;
5962- jbd2_journal_destroy (journal );
5958+ ext4_journal_destroy (EXT4_SB (sb ), journal );
59635959 return err ;
59645960 }
59655961
@@ -5974,7 +5970,7 @@ static int ext4_load_journal(struct super_block *sb,
59745970 return 0 ;
59755971
59765972err_out :
5977- jbd2_journal_destroy ( journal );
5973+ ext4_journal_destroy ( EXT4_SB ( sb ), journal );
59785974 return err ;
59795975}
59805976
0 commit comments