@@ -481,7 +481,7 @@ static void ext4_maybe_update_superblock(struct super_block *sb)
481
481
diff_size = lifetime_write_kbytes - le64_to_cpu (es -> s_kbytes_written );
482
482
483
483
if (diff_size > EXT4_SB_REFRESH_INTERVAL_KB )
484
- schedule_work (& EXT4_SB (sb )-> s_error_work );
484
+ schedule_work (& EXT4_SB (sb )-> s_sb_upd_work );
485
485
}
486
486
487
487
/*
@@ -723,7 +723,7 @@ static void ext4_handle_error(struct super_block *sb, bool force_ro, int error,
723
723
* defer superblock flushing to a workqueue.
724
724
*/
725
725
if (continue_fs && journal )
726
- schedule_work (& EXT4_SB (sb )-> s_error_work );
726
+ schedule_work (& EXT4_SB (sb )-> s_sb_upd_work );
727
727
else
728
728
ext4_commit_super (sb );
729
729
}
@@ -750,10 +750,10 @@ static void ext4_handle_error(struct super_block *sb, bool force_ro, int error,
750
750
sb -> s_flags |= SB_RDONLY ;
751
751
}
752
752
753
- static void flush_stashed_error_work (struct work_struct * work )
753
+ static void update_super_work (struct work_struct * work )
754
754
{
755
755
struct ext4_sb_info * sbi = container_of (work , struct ext4_sb_info ,
756
- s_error_work );
756
+ s_sb_upd_work );
757
757
journal_t * journal = sbi -> s_journal ;
758
758
handle_t * handle ;
759
759
@@ -1078,7 +1078,7 @@ __acquires(bitlock)
1078
1078
if (!bdev_read_only (sb -> s_bdev )) {
1079
1079
save_error_info (sb , EFSCORRUPTED , ino , block , function ,
1080
1080
line );
1081
- schedule_work (& EXT4_SB (sb )-> s_error_work );
1081
+ schedule_work (& EXT4_SB (sb )-> s_sb_upd_work );
1082
1082
}
1083
1083
return ;
1084
1084
}
@@ -1318,10 +1318,10 @@ static void ext4_put_super(struct super_block *sb)
1318
1318
* Unregister sysfs before destroying jbd2 journal.
1319
1319
* Since we could still access attr_journal_task attribute via sysfs
1320
1320
* path which could have sbi->s_journal->j_task as NULL
1321
- * Unregister sysfs before flush sbi->s_error_work .
1321
+ * Unregister sysfs before flush sbi->s_sb_upd_work .
1322
1322
* Since user may read /proc/fs/ext4/xx/mb_groups during umount, If
1323
1323
* read metadata verify failed then will queue error work.
1324
- * flush_stashed_error_work will call start_this_handle may trigger
1324
+ * update_super_work will call start_this_handle may trigger
1325
1325
* BUG_ON.
1326
1326
*/
1327
1327
ext4_unregister_sysfs (sb );
@@ -1333,7 +1333,7 @@ static void ext4_put_super(struct super_block *sb)
1333
1333
ext4_unregister_li_request (sb );
1334
1334
ext4_quotas_off (sb , EXT4_MAXQUOTAS );
1335
1335
1336
- flush_work (& sbi -> s_error_work );
1336
+ flush_work (& sbi -> s_sb_upd_work );
1337
1337
destroy_workqueue (sbi -> rsv_conversion_wq );
1338
1338
ext4_release_orphan_info (sb );
1339
1339
@@ -4998,8 +4998,8 @@ static int ext4_load_and_init_journal(struct super_block *sb,
4998
4998
return 0 ;
4999
4999
5000
5000
out :
5001
- /* flush s_error_work before journal destroy . */
5002
- flush_work (& sbi -> s_error_work );
5001
+ /* flush s_sb_upd_work before destroying the journal . */
5002
+ flush_work (& sbi -> s_sb_upd_work );
5003
5003
jbd2_journal_destroy (sbi -> s_journal );
5004
5004
sbi -> s_journal = NULL ;
5005
5005
return - EINVAL ;
@@ -5322,7 +5322,7 @@ static int __ext4_fill_super(struct fs_context *fc, struct super_block *sb)
5322
5322
5323
5323
timer_setup (& sbi -> s_err_report , print_daily_error_info , 0 );
5324
5324
spin_lock_init (& sbi -> s_error_lock );
5325
- INIT_WORK (& sbi -> s_error_work , flush_stashed_error_work );
5325
+ INIT_WORK (& sbi -> s_sb_upd_work , update_super_work );
5326
5326
5327
5327
err = ext4_group_desc_init (sb , es , logical_sb_block , & first_not_zeroed );
5328
5328
if (err )
@@ -5666,16 +5666,16 @@ failed_mount9: __maybe_unused
5666
5666
sbi -> s_ea_block_cache = NULL ;
5667
5667
5668
5668
if (sbi -> s_journal ) {
5669
- /* flush s_error_work before journal destroy. */
5670
- flush_work (& sbi -> s_error_work );
5669
+ /* flush s_sb_upd_work before journal destroy. */
5670
+ flush_work (& sbi -> s_sb_upd_work );
5671
5671
jbd2_journal_destroy (sbi -> s_journal );
5672
5672
sbi -> s_journal = NULL ;
5673
5673
}
5674
5674
failed_mount3a :
5675
5675
ext4_es_unregister_shrinker (sbi );
5676
5676
failed_mount3 :
5677
- /* flush s_error_work before sbi destroy */
5678
- flush_work (& sbi -> s_error_work );
5677
+ /* flush s_sb_upd_work before sbi destroy */
5678
+ flush_work (& sbi -> s_sb_upd_work );
5679
5679
del_timer_sync (& sbi -> s_err_report );
5680
5680
ext4_stop_mmpd (sbi );
5681
5681
ext4_group_desc_free (sbi );
@@ -6551,7 +6551,7 @@ static int __ext4_remount(struct fs_context *fc, struct super_block *sb)
6551
6551
}
6552
6552
6553
6553
/* Flush outstanding errors before changing fs state */
6554
- flush_work (& sbi -> s_error_work );
6554
+ flush_work (& sbi -> s_sb_upd_work );
6555
6555
6556
6556
if ((bool )(fc -> sb_flags & SB_RDONLY ) != sb_rdonly (sb )) {
6557
6557
if (ext4_forced_shutdown (sb )) {
0 commit comments