]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ext4: enable the lazy init thread when remounting read/write
authorTheodore Ts'o <tytso@mit.edu>
Sat, 27 May 2023 03:57:29 +0000 (23:57 -0400)
committerStefan Bader <stefan.bader@canonical.com>
Mon, 4 Sep 2023 09:10:34 +0000 (11:10 +0200)
commit8a4442245b9e51433e1d5bdb99c7112db851a30c
treec4a3345b8238a1bd2ace0ff56d482a7fe0a74284
parentfbe1c200afc0d0d4b2f599ffa3e2b57d74c59bb8
ext4: enable the lazy init thread when remounting read/write

BugLink: https://bugs.launchpad.net/bugs/2029808
commit eb1f822c76beeaa76ab8b6737ab9dc9f9798408c upstream.

In commit a44be64bbecb ("ext4: don't clear SB_RDONLY when remounting
r/w until quota is re-enabled") we defer clearing tyhe SB_RDONLY flag
in struct super.  However, we didn't defer when we checked sb_rdonly()
to determine the lazy itable init thread should be enabled, with the
next result that the lazy inode table initialization would not be
properly started.  This can cause generic/231 to fail in ext4's
nojournal mode.

Fix this by moving when we decide to start or stop the lazy itable
init thread to after we clear the SB_RDONLY flag when we are
remounting the file system read/write.

Fixes a44be64bbecb ("ext4: don't clear SB_RDONLY when remounting r/w until...")

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Link: https://lore.kernel.org/r/20230527035729.1001605-1-tytso@mit.edu
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
fs/ext4/super.c