Messages in this thread Patch in this message | | | From | Jaegeuk Kim <> | Subject | [PATCH 2/2] f2fs: complete checkpoints during remount | Date | Fri, 19 Aug 2022 16:15:14 -0700 |
| |
Otherwise, pending checkpoints can contribute a race condition to give a quota warning.
- Thread - checkpoint thread add checkpoints to the list do_remount() down_write(&sb->s_umount); f2fs_remount() block_operations() down_read_trylock(&sb->s_umount) = 0 up_write(&sb->s_umount); f2fs_quota_sync() dquot_writeback_dquots() WARN_ON_ONCE(!rwsem_is_locked(&sb->s_umount));
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> --- fs/f2fs/super.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c index 48ac3de4a533..88879c483805 100644 --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -2349,6 +2349,9 @@ static int f2fs_remount(struct super_block *sb, int *flags, char *data) f2fs_stop_ckpt_thread(sbi); need_restart_ckpt = true; } else { + /* flush if the prevous checkpoint, if exists. */ + f2fs_flush_ckpt_thread(sbi); + err = f2fs_start_ckpt_thread(sbi); if (err) { f2fs_err(sbi, -- 2.37.1.595.g718a3a8f04-goog
| |