mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-04-02 16:33:59 +00:00
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: 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>
Signed-off-by: Ulrich Hecht <uli@kernel.org>
This commit is contained in:
committed by
Ulrich Hecht
parent
4b569174bd
commit
29948a191d
@ -454,6 +454,7 @@ static int log_writes_kthread(void *arg)
|
||||
struct log_writes_c *lc = (struct log_writes_c *)arg;
|
||||
sector_t sector = 0;
|
||||
|
||||
set_freezable();
|
||||
while (!kthread_should_stop()) {
|
||||
bool super = false;
|
||||
bool logging_enabled;
|
||||
|
||||
Reference in New Issue
Block a user