From patchwork Wed Nov 8 14:59:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joshua Watt X-Patchwork-Id: 10048639 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 1001A603FF for ; Wed, 8 Nov 2017 15:00:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0702B29341 for ; Wed, 8 Nov 2017 15:00:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EFD3F2A635; Wed, 8 Nov 2017 15:00:23 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham 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 AF07129341 for ; Wed, 8 Nov 2017 15:00:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752603AbdKHPAW (ORCPT ); Wed, 8 Nov 2017 10:00:22 -0500 Received: from mail-it0-f68.google.com ([209.85.214.68]:52538 "EHLO mail-it0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752620AbdKHPAV (ORCPT ); Wed, 8 Nov 2017 10:00:21 -0500 Received: by mail-it0-f68.google.com with SMTP id j140so6799934itj.1 for ; Wed, 08 Nov 2017 07:00:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mvUbqm5d2QXdNqlPOCDJDLHt6DytKg2vhpfitc0l/3c=; b=hug13Gwii/RwvWwUIc7SezgGfuouhb4IyNNNy+TSOV0sJe9maG3cK1/dT+FkovVRIS YvG42stS6gMfs1lLstnm/cL6BhSJSopAFxUll3NUriYM3w7tns/d6U/P5bx6uxYkAGFd 3uWzAmenqOdwuepAE89pPY7QXAYdl0dzIoYao2zpI7osqDuzWM8dA2F6GK7potDDxyCN 8WDDwFZCkPCMv0a3+udCWkncYDjH7eJfkgnC6tHJKES341dAWFQogwKxTmlYUwJ6FWT+ /OaA45g3G5d2h2NNMk6cy1kE1OkSSab6Tw2L2AtRUsrnexriPFOCIQzQ6w4uE31pg3gL PyRQ== 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=mvUbqm5d2QXdNqlPOCDJDLHt6DytKg2vhpfitc0l/3c=; b=lWNi54kj/XiS2nwXXQ7+7a7LruZ1n6b7RiNrSxpqdAhGnZd+H1fDj3uGKbRVqMX6u7 Hz1cWNbycB5uct1/UaK+jxR28ycxV/6a4nhZCLCWnztaDF5LA6baM5HeW0/5RaFKYX1K xJZLjyMsPrVxCTEIpD7oRKllvDZJsyveFWVrVWkFYDsV8Typ5mozNRoZYLCP1DITClGB EuCLQTR5a8b+jOYqB6HcqJzUv8ze7TgzQSwrQRivavaAslXG5sQQy/agj0xdMePMIt+i zTRPUSZ/9X28yNso3SCNNBWS9tiiEGVdbe6JEsfFDiwgg2gWEZFaYx7juz0A2XhTpKUE 33KA== X-Gm-Message-State: AJaThX5dmTjdygu5W8EN0q1Xfhx+H1sjQ6tecuuKOr7jcblLx/AanfvQ AKbWpwqs/RrlbSjqKzoqhUA= X-Google-Smtp-Source: ABhQp+ShIpTu0BpASsSMifYFxm0EWfwhFLILp7CGZQtLb6KgM4RZp7SFjblbSH1hvk0L1YnxYslw2Q== X-Received: by 10.36.178.85 with SMTP id h21mr1117790iti.118.1510153221201; Wed, 08 Nov 2017 07:00:21 -0800 (PST) Received: from ola-842mrw1.ad.garmin.com ([204.77.163.55]) by smtp.googlemail.com with ESMTPSA id q191sm9170077itb.1.2017.11.08.07.00.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 Nov 2017 07:00:20 -0800 (PST) From: Joshua Watt X-Google-Original-From: Joshua Watt To: NeilBrown , Jeff Layton , Trond Myklebust Cc: linux-nfs@vger.kernel.org, Al Viro , "J . Bruce Fields" , David Howells , Joshua Watt Subject: [RFC 3/4] SUNRPC: Simplify client shutdown Date: Wed, 8 Nov 2017 08:59:41 -0600 Message-Id: <20171108145942.5127-4-JPEWhacker@gmail.com> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171108145942.5127-1-JPEWhacker@gmail.com> References: <20171108145942.5127-1-JPEWhacker@gmail.com> Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use the flag to kill all new tasks when shutting down instead of repeatedly killing all the pending tasks. Signed-off-by: Joshua Watt --- net/sunrpc/clnt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 70005252b32f..8d51e0788a63 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -860,8 +860,8 @@ void rpc_shutdown_client(struct rpc_clnt *clnt) clnt->cl_program->name, rcu_dereference(clnt->cl_xprt)->servername); + rpc_killall_tasks(clnt, 1); while (!list_empty(&clnt->cl_tasks)) { - rpc_killall_tasks(clnt, 0); wait_event_timeout(destroy_wait, list_empty(&clnt->cl_tasks), 1*HZ); }