Received: by 10.223.185.116 with SMTP id b49csp416206wrg; Wed, 21 Feb 2018 00:09:13 -0800 (PST) X-Google-Smtp-Source: AH8x224zgind4iOWZyG6dgsvxx1OW1SB2NDT2YQS7OQb5dD4A4g6OXKPfeQOGzNRYavxQEDH4ApQ X-Received: by 2002:a17:902:6783:: with SMTP id g3-v6mr2355827plk.179.1519200553859; Wed, 21 Feb 2018 00:09:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519200553; cv=none; d=google.com; s=arc-20160816; b=hKJf7lHaYBaNhQy19oHTGLfWmNGULubnVR8fnysxhpyhTU6c3xZG4LsQaWPyWqsK+T 9GWJwFjNNjyRTRERyWF1DKJkzu0xnR/Ergzrzly7KTAdYQu7TpPmHAwi32MvWHiaPzP1 oqiq5xHkLoPd0JDHjmIti5CqVx9kF/RM+JbGuMBWyCVzSt3BGyxlitpCwWMNUNLkMP0C sdvO7UTDDhVTb7cNz58rvr66GQWqUyO+OXj1v41FM92ERQqNZy5eMyumRAJa3v+XGHVF 8dTEMsjGdGWeZjwsTOs1zMrsey0WSzKVOkvqns5C4LQ7iDRzg4mJ30p62OS7eSOmA4ZH 7WHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=6BkLPq6biUlfhemDrcH6HzZA4SWtVM9qREVqgfSfIzY=; b=p7RYgrpA7IWOEIsaHFlNMARSmKTIMPRJBFCRbxaK6xv4IJUKisPm0KnGeEL3q6I/US 5ocJ7Rh/ICe0W9SnTy9QbXPaWrvGzhdy3bt9+69Wlwgti8LznBDz+NmgJN3y7uIS+O+f uz9C1HrYkSDMQQCveUPo/r9igyEhHzZMcdkuMz61V+PZVCsFqp7dTuUmLQV0V67o1B4c b6ikifrE2A/MSlaJCRaRJnM6RVP8HQcFa8wr8/BEgf6RQ/QW0Q82tkXXkdiGZ0IwLvrY wU9Wg5/JbvFaGNK3mG9qSebTtJjDvYZ007Eeir/GonYhw/ZKHUWHlAZWCbepZbOYwy0d acwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@owltronix-com.20150623.gappssmtp.com header.s=20150623 header.b=11wyclDw; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m12-v6si10337403pls.703.2018.02.21.00.08.59; Wed, 21 Feb 2018 00:09:13 -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; dkim=pass header.i=@owltronix-com.20150623.gappssmtp.com header.s=20150623 header.b=11wyclDw; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752044AbeBUIH1 (ORCPT + 99 others); Wed, 21 Feb 2018 03:07:27 -0500 Received: from mail-lf0-f67.google.com ([209.85.215.67]:41783 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751760AbeBUIDy (ORCPT ); Wed, 21 Feb 2018 03:03:54 -0500 Received: by mail-lf0-f67.google.com with SMTP id m69so1065194lfe.8 for ; Wed, 21 Feb 2018 00:03:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=owltronix-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6BkLPq6biUlfhemDrcH6HzZA4SWtVM9qREVqgfSfIzY=; b=11wyclDwu2Wr1eKSxbFHo/Bbymw+/PMsl3T+JZ0bNqcPGwQdkIXnisZ4nmJM9lngAX K3D0OAEfOTVE7GkSWMk9GfCZYGl37YVWuU/xkNSlCAPP1QAVZ5cqKpfsJ6oBTdvP5GuT 43Qzyc5vSmiW1nRi1iRO55fav74YI4EWj5xvoGZzXB04zglYda4KWHKUd0V8vw2rEw7x C2L7mcTh5IFOYWvNdDQjMaPHpDhW0C91Km73pd6Ur/6E3uR5aWtVymDMeefiMCVXUKXQ 4F7pAeYfg3b8G/uxnM1cN3ml4wJUWYGg7aqvl6xRuthD/o8NoVUexEYhE+fJGNJ89LuF eGWg== 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:in-reply-to :references; bh=6BkLPq6biUlfhemDrcH6HzZA4SWtVM9qREVqgfSfIzY=; b=d5uQXMW+KdlsT1drw6DGVHGqfpNuvc7rZexZFOZlp4OhgxReRTIi80UbKw5wYI0019 MC7qNd9TlMmtAJ5/Z0e77vyqSkIp9ojHj8k7v2h7u8eZ5akSaXeyqc9+2CtUSXonUPZl 3YsszQS07nmqooQpWMZpim8EHsa75KhuLUbqrF2xNn0DD7LA86bjQTx+rUJWRT03LFgM Lbc8dmwlGP62zR+P5px92tchqHXyUsa34IRWdFqF3f0NxjXMC5lwJoVd210Nw/tlv/JJ ASf3iighcVMmlSNbmD/xfzLSsiaOXPrdxZoFngHQP4r9+EC/XfF0qrm7RBYdj90menjH dZuQ== X-Gm-Message-State: APf1xPAgSHaOhkVp20WYmxJlUeM2Oy+U7I5ZPONSP74sMc8nXckT1WgB ZM9veOMOYCiwZT98sLbNXT+NYA== X-Received: by 10.25.15.170 with SMTP id 42mr1539318lfp.6.1519200233262; Wed, 21 Feb 2018 00:03:53 -0800 (PST) Received: from titan.bredbandsbolaget.se (c-b9b6e655.03-91-6d6c6d4.cust.bredbandsbolaget.se. [85.230.182.185]) by smtp.gmail.com with ESMTPSA id k8sm13417ljk.63.2018.02.21.00.03.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 21 Feb 2018 00:03:52 -0800 (PST) From: hans.ml.holmberg@owltronix.com To: =?UTF-8?q?Matias=20Bj=C3=B8rling?= Cc: =?UTF-8?q?Javier=20Gonz=C3=A1lez?= , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Hans Holmberg Subject: [PATCH 1/3] lightnvm: pblk: delete writer kick timer before stopping thread Date: Wed, 21 Feb 2018 09:02:59 +0100 Message-Id: <1519200181-10886-2-git-send-email-hans.ml.holmberg@owltronix.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519200181-10886-1-git-send-email-hans.ml.holmberg@owltronix.com> References: <1519200181-10886-1-git-send-email-hans.ml.holmberg@owltronix.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans Holmberg Unless we delete the timer that wakes up the write thread before we stop the thread we risk re-starting the thread, so delete the timer first. Signed-off-by: Hans Holmberg --- drivers/lightnvm/pblk-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index a2b54a8..862ac4e 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c @@ -923,9 +923,9 @@ static void pblk_writer_stop(struct pblk *pblk) WARN(pblk_rb_sync_count(&pblk->rwb), "Stopping not fully synced write buffer\n"); + del_timer_sync(&pblk->wtimer); if (pblk->writer_ts) kthread_stop(pblk->writer_ts); - del_timer(&pblk->wtimer); } static void pblk_free(struct pblk *pblk) -- 2.7.4