ext4: clear mmp sequence number when remounting read-only
authorTheodore Ts'o <tytso@mit.edu>
Sun, 8 Jul 2018 23:36:02 +0000 (19:36 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Sep 2018 07:26:24 +0000 (09:26 +0200)
commit147b89c421d0c57781ec57888f379e1ca7026cbb
tree6e7c3041887383d1b2da59b50e2e9c74568374c1
parentde044d4ecc65c00d683f62923bddc2a55e2b9d1a
ext4: clear mmp sequence number when remounting read-only

[ Upstream commit 2dca60d98e241bea686004168f85208f215fc697 ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/mmp.c
fs/ext4/super.c