File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -1199,20 +1199,25 @@ static void ext4_put_super(struct super_block *sb)
1199
1199
int aborted = 0 ;
1200
1200
int i , err ;
1201
1201
1202
- ext4_unregister_li_request (sb );
1203
- ext4_quota_off_umount (sb );
1204
-
1205
- flush_work (& sbi -> s_error_work );
1206
- destroy_workqueue (sbi -> rsv_conversion_wq );
1207
- ext4_release_orphan_info (sb );
1208
-
1209
1202
/*
1210
1203
* Unregister sysfs before destroying jbd2 journal.
1211
1204
* Since we could still access attr_journal_task attribute via sysfs
1212
1205
* path which could have sbi->s_journal->j_task as NULL
1206
+ * Unregister sysfs before flush sbi->s_error_work.
1207
+ * Since user may read /proc/fs/ext4/xx/mb_groups during umount, If
1208
+ * read metadata verify failed then will queue error work.
1209
+ * flush_stashed_error_work will call start_this_handle may trigger
1210
+ * BUG_ON.
1213
1211
*/
1214
1212
ext4_unregister_sysfs (sb );
1215
1213
1214
+ ext4_unregister_li_request (sb );
1215
+ ext4_quota_off_umount (sb );
1216
+
1217
+ flush_work (& sbi -> s_error_work );
1218
+ destroy_workqueue (sbi -> rsv_conversion_wq );
1219
+ ext4_release_orphan_info (sb );
1220
+
1216
1221
if (sbi -> s_journal ) {
1217
1222
aborted = is_journal_aborted (sbi -> s_journal );
1218
1223
err = jbd2_journal_destroy (sbi -> s_journal );
You can’t perform that action at this time.
0 commit comments