mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
dm log-writes: Add missing set_freezable() for freezable kthread
[ Upstream commitab08f9c8b3] The log_writes_kthread() calls try_to_freeze() but lacks set_freezable(), rendering the freeze attempt ineffective since kernel threads are non-freezable by default. This prevents proper thread suspension during system suspend/hibernate. Add set_freezable() to explicitly mark the thread as freezable. Fixes:0e9cebe724("dm: add log writes target") Signed-off-by: Haotian Zhang <vulab@iscas.ac.cn> Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
992710902d
commit
ea98ced74f
@@ -432,6 +432,7 @@ static int log_writes_kthread(void *arg)
|
||||
struct log_writes_c *lc = arg;
|
||||
sector_t sector = 0;
|
||||
|
||||
set_freezable();
|
||||
while (!kthread_should_stop()) {
|
||||
bool super = false;
|
||||
bool logging_enabled;
|
||||
|
||||
Reference in New Issue
Block a user