From patchwork Thu Mar 29 22:04:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 10316583 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1C39D60383 for ; Thu, 29 Mar 2018 22:15:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 009312A4B9 for ; Thu, 29 Mar 2018 22:15:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E5CD02A536; Thu, 29 Mar 2018 22:15:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E5142A4B9 for ; Thu, 29 Mar 2018 22:15:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752696AbeC2WOs (ORCPT ); Thu, 29 Mar 2018 18:14:48 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:34780 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752344AbeC2WHG (ORCPT ); Thu, 29 Mar 2018 18:07:06 -0400 Received: by mail-lf0-f66.google.com with SMTP id c78-v6so10370589lfh.1 for ; Thu, 29 Mar 2018 15:07:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VyA1TUER3fJcldmqjGUOB1Mpyx6V/W4qBFHXVmHxjfw=; b=FhFZo6X0ZJJny6znTLrQXHuA1Hw9GT5XG98OIT36hMvw4I7l/gi6JSad/kPw9kFzfM 3Brsmk39m90VcuQMKsIkO/wDuqjXECWsdx1UG38CiPlhHpoQXmvZ1x/2k7hikMYMIML6 ApU7/2DzLkgmbsYCrGoa2LyISApSOi07U75kE3DV0Go1RtNak5s+6umNgjZ+Tqn9thvJ Knpv8jCtT8f/0q9YVX7pwq6OBAgExfYSDja8FTtpr6axoRizjVw1iUsrpyLR78pJ5Lhp HsaWY/nPrYRMczsLalDAvlgrOEe5e+ZRfChnJgsVqVY0QsFsFhZCl5YFr94XT/FVxQAV 8SrA== 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:mime-version:content-transfer-encoding; bh=VyA1TUER3fJcldmqjGUOB1Mpyx6V/W4qBFHXVmHxjfw=; b=lkb5m4iKV6OM/E5T0jMqp5oBAU5qkh9wL9JhbJ2aqC7IuiNjlj0Pdeo4sopax535e4 58GzzaVy0BhkTfbk2I3N8BwOABLfPP07Of1rH4L30cjJbFrcz5PCT1RSfGK+PRr0HJ+/ LMd45q34wm1i2KQ7DRiJcn+/R4k2pgn4dcb6bWP/K9W8dQp3QTbIoiqOx6SL0ztuKsIp VCF0k6Vyoo+mDSVwC77sgo4MI768+eCjpDYkAXQvUa8Otl0EMK5Z/QKN7hthBPSDZWyf zWGvjK/NYE4eF3sF3jC12yKYiSVmv5kHSXA3QvnEbjGEagbxm+E1gwpt1V+bQzQOCv4l Z9fw== X-Gm-Message-State: AElRT7HUr4af7J2nDgSRLXTZ7vPtrtJtiGsGl0berIs4Nd+ZkSHT71z0 evpYZQuyEmPBlexWbuYp2OLF9w== X-Google-Smtp-Source: AIpwx4+r8oXg9s+sJrQZjXzlJZtHzTWhQYrKZotIxKXHdG81/RrEKxMCfjBtg4Ae64mXEF15OcacMw== X-Received: by 10.46.137.138 with SMTP id c10mr1321807lji.0.1522361225400; Thu, 29 Mar 2018 15:07:05 -0700 (PDT) Received: from Macroninja.cnexlabs.com (x1-6-a4-08-f5-18-3c-3a.cpe.webspeed.dk. [188.176.29.198]) by smtp.gmail.com with ESMTPSA id i89-v6sm1365508lfk.12.2018.03.29.15.07.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Mar 2018 15:07:04 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: axboe@fb.com Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, keith.busch@intel.com, javier@cnexlabs.com, Hans Holmberg , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [GIT PULL 09/37] lightnvm: pblk: delete writer kick timer before stopping thread Date: Fri, 30 Mar 2018 00:04:56 +0200 Message-Id: <20180329220524.30363-10-mb@lightnvm.io> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180329220524.30363-1-mb@lightnvm.io> References: <20180329220524.30363-1-mb@lightnvm.io> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- 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 8416910ee8bf..49c65f1dd48b 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm/pblk-init.c @@ -912,9 +912,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)