summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaotian Zhang <vulab@iscas.ac.cn>2025-12-01 15:41:03 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-12-18 14:00:14 +0100
commitec483aee67154b90ada731c5388aa506960c16bd (patch)
tree0537a628711f11975a869f6212cf5eb08b9125e4
parent5306df48c54091e4c2c8eb3cb7da728117bd32cb (diff)
downloadlinux-stable-ec483aee67154b90ada731c5388aa506960c16bd.tar.gz
linux-stable-ec483aee67154b90ada731c5388aa506960c16bd.zip
dm log-writes: Add missing set_freezable() for freezable kthread
[ Upstream commit ab08f9c8b363297cafaf45475b08f78bf19b88ef ] 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: 0e9cebe72459 ("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>
-rw-r--r--drivers/md/dm-log-writes.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-log-writes.c b/drivers/md/dm-log-writes.c
index 679b07dee229..1f8fbc27a12f 100644
--- a/drivers/md/dm-log-writes.c
+++ b/drivers/md/dm-log-writes.c
@@ -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;