lkml.org 
[lkml]   [2019]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] btrfs: zstd ensure reclaim timer is properly cleaned up
Date
The timer function, zstd_reclaim_timer_fn(), reschedules itself under
certain conditions. Switch to del_timer_sync() to ensure that the timer
function hasn't rescheduled itself.

Signed-off-by: Dennis Zhou <dennis@kernel.org>
---
fs/btrfs/zstd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/btrfs/zstd.c b/fs/btrfs/zstd.c
index 3e418a3aeb11..62de9a211321 100644
--- a/fs/btrfs/zstd.c
+++ b/fs/btrfs/zstd.c
@@ -195,7 +195,7 @@ static void zstd_cleanup_workspace_manager(void)
struct workspace *workspace;
int i;

- del_timer(&wsm.timer);
+ del_timer_sync(&wsm.timer);

for (i = 0; i < ZSTD_BTRFS_MAX_LEVEL; i++) {
while (!list_empty(&wsm.idle_ws[i])) {
--
2.17.1
\
 
 \ /
  Last update: 2019-02-21 21:27    [W:0.039 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site