summaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2018-07-08 19:36:02 -0400
committerTheodore Ts'o <tytso@mit.edu>2018-07-08 19:36:02 -0400
commit2dca60d98e241bea686004168f85208f215fc697 (patch)
tree54f5910d68c13a4f88e22d36a4fe760740e9b174 /fs/ext4/super.c
parent44de022c4382541cebdd6de4465d1f4f465ff1dd (diff)
downloadlinux-2dca60d98e241bea686004168f85208f215fc697.tar.bz2
ext4: clear mmp sequence number when remounting read-only
Previously, when an MMP-protected file system is remounted read-only, the kmmpd thread would exit the next time it woke up (a few seconds later), without resetting the MMP sequence number back to EXT4_MMP_SEQ_CLEAN. Fix this by explicitly killing the MMP thread when the file system is remounted read-only. Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: Andreas Dilger <adilger@dilger.ca>
Diffstat (limited to 'fs/ext4/super.c')
-rw-r--r--fs/ext4/super.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index eff5c983e067..680526e9ee96 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -5212,6 +5212,8 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
if (sbi->s_journal)
ext4_mark_recovery_complete(sb, es);
+ if (sbi->s_mmp_tsk)
+ kthread_stop(sbi->s_mmp_tsk);
} else {
/* Make sure we can mount this feature set readwrite */
if (ext4_has_feature_readonly(sb) ||