Received: by 2002:ac0:a679:0:0:0:0:0 with SMTP id p54csp847744imp; Thu, 21 Feb 2019 12:28:19 -0800 (PST) X-Google-Smtp-Source: AHgI3IZKNSfmt0CPhACieUUFDfM17zJPN+c2Szq3eTWEN/TR7y6uFB66P5+pnw2JYPv4LgqKHpTa X-Received: by 2002:a62:388a:: with SMTP id f132mr386531pfa.150.1550780899271; Thu, 21 Feb 2019 12:28:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550780899; cv=none; d=google.com; s=arc-20160816; b=RTDv3FwXhIFts16xZs2FgFjqBfOr76nehgp31gBbYtpfIhjvCvz1LXM8hVbZYx3Gc9 SEspY68ZhmtMo54tarQ2juJW7VabhDOZtPZwYp5uN+E6n4S2gZ73i5Was+Acj0DvJ5xK avuvLVW0ZBPOZM3kkSN+SAiajC0nrj85JEug4h9GQojDOrM2Z28CFLZUTC8dtMRsRDcd XbIIRqrFdJwu6GfvOymT9J7pWHSy19dLXx/5WQ3n/WGT7RsxKdjR58BehHbhGbXWGvgB k4mv+JSBkG+/JaV+/zTXvzsk7RRLt6ZA184c3OiLBA7sZZxsqcRlA5iwFMUrqEY+Ue3M QfLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=KrijerxTyGVa0Sr/JiCT9Xom8mVGoOuXytTBdA4zzLc=; b=rRUD12ci0SUnl6ee/GmA5J7HSzZT/QBEiRGV2G/sOD/mXh0MZ2XzI8w8m5TbLlgXVA jIu8d7qHF+a0NuZNDCso6EUmhB2fXBVzHs9jvttbEbhXbwVSegeXpKOkcySgsFxqwG1u damFzN0cZDgFw79fPWzLkR+9Yd9wAGr8bi8I0YDHaTVZ5mS1INKyOvsKyeq/ZfyAs83Q hkO4B01KVihSTBINOOo7A5GxSaB/vVsNsihnCn3lDngyqkVO27ZnaXsor698UosFYQHW 9XLmLJGq1PpUtS/3aXJNmNgYdIK1gHq9/GmZ0GBG+RTnlb+zwdjxs8/PIlcx08ZB4Gap z8iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l30si23666989plg.113.2019.02.21.12.28.03; Thu, 21 Feb 2019 12:28:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726844AbfBUU0B (ORCPT + 99 others); Thu, 21 Feb 2019 15:26:01 -0500 Received: from mail-yw1-f66.google.com ([209.85.161.66]:39745 "EHLO mail-yw1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726075AbfBUU0B (ORCPT ); Thu, 21 Feb 2019 15:26:01 -0500 Received: by mail-yw1-f66.google.com with SMTP id f192so2481809ywh.6; Thu, 21 Feb 2019 12:26:00 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=KrijerxTyGVa0Sr/JiCT9Xom8mVGoOuXytTBdA4zzLc=; b=DZeRQ1Cx7lSU4Ewf7c3n/VbPqOwguzYkWwq9jJP8WWr5192LlpWzYQkbsSJriptOoY uvCYi/Ll680AWqmDZKiJWXBAleqLCOCxh7NwsL1fTmXIp2fJjk7D+gYQo79iayalLDaw lI4M49V06cNbRJZcZsoNuGVW699Y09iKvwPTnVDeEyu1Zn6Wbl7lgLNJpE4CWxOiLEZS 9Q8BSVsh9wTevREaLjjOxtrmyAQW7bkvUIeDxNV5RyxpWNj1Q6XZ9/XkPfMO2h1YgZlV e6tNf0MHk0JbUH0V0T6kwjx9xnBi0ugkqZ2pUq7MgV56wWhJpivR/xQO+AIQwfkps0wo Eo4A== X-Gm-Message-State: AHQUAub4deBc1ZyHYDDtnpLjhfHJIeGidqnictDCQ3n/8tiR3uRq1QDP kyWkRmPQWk8oiKYCMwZRR80= X-Received: by 2002:a81:6584:: with SMTP id z126mr369424ywb.216.1550780760256; Thu, 21 Feb 2019 12:26:00 -0800 (PST) Received: from dennisz-mbp.thefacebook.com ([199.201.65.133]) by smtp.gmail.com with ESMTPSA id a4sm6570047ywa.14.2019.02.21.12.25.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 21 Feb 2019 12:25:59 -0800 (PST) From: Dennis Zhou To: David Sterba , Josef Bacik , Chris Mason , Omar Sandoval , Nick Terrell , Nikolay Borisov Cc: kernel-team@fb.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Dennis Zhou Subject: [PATCH] btrfs: zstd ensure reclaim timer is properly cleaned up Date: Thu, 21 Feb 2019 15:25:56 -0500 Message-Id: <20190221202556.42447-1-dennis@kernel.org> X-Mailer: git-send-email 2.13.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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