Skip to content

Commit ab08f9c

Browse files
ISCAS-VulabMikulas Patocka
authored andcommitted
dm log-writes: Add missing set_freezable() for freezable kthread
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: 0e9cebe ("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>
1 parent 2f6cfd6 commit ab08f9c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/md/dm-log-writes.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,7 @@ static int log_writes_kthread(void *arg)
432432
struct log_writes_c *lc = arg;
433433
sector_t sector = 0;
434434

435+
set_freezable();
435436
while (!kthread_should_stop()) {
436437
bool super = false;
437438
bool logging_enabled;

0 commit comments

Comments
 (0)