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 @@ -1167,20 +1167,25 @@ static void ext4_put_super(struct super_block *sb)
1167
1167
int aborted = 0 ;
1168
1168
int i , err ;
1169
1169
1170
- ext4_unregister_li_request (sb );
1171
- ext4_quota_off_umount (sb );
1172
-
1173
- flush_work (& sbi -> s_error_work );
1174
- destroy_workqueue (sbi -> rsv_conversion_wq );
1175
- ext4_release_orphan_info (sb );
1176
-
1177
1170
/*
1178
1171
* Unregister sysfs before destroying jbd2 journal.
1179
1172
* Since we could still access attr_journal_task attribute via sysfs
1180
1173
* path which could have sbi->s_journal->j_task as NULL
1174
+ * Unregister sysfs before flush sbi->s_error_work.
1175
+ * Since user may read /proc/fs/ext4/xx/mb_groups during umount, If
1176
+ * read metadata verify failed then will queue error work.
1177
+ * flush_stashed_error_work will call start_this_handle may trigger
1178
+ * BUG_ON.
1181
1179
*/
1182
1180
ext4_unregister_sysfs (sb );
1183
1181
1182
+ ext4_unregister_li_request (sb );
1183
+ ext4_quota_off_umount (sb );
1184
+
1185
+ flush_work (& sbi -> s_error_work );
1186
+ destroy_workqueue (sbi -> rsv_conversion_wq );
1187
+ ext4_release_orphan_info (sb );
1188
+
1184
1189
if (sbi -> s_journal ) {
1185
1190
aborted = is_journal_aborted (sbi -> s_journal );
1186
1191
err = jbd2_journal_destroy (sbi -> s_journal );
You can’t perform that action at this time.
0 commit comments