Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp405240pxb; Thu, 21 Oct 2021 01:44:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjlES3xfOHygWsFyoYj9Al3Wl49pEtmUPKZeR1ANpFsC+2++Ptg7W5/WF1a565LtgdKPVN X-Received: by 2002:a05:6402:95c:: with SMTP id h28mr5791690edz.141.1634805898822; Thu, 21 Oct 2021 01:44:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634805898; cv=none; d=google.com; s=arc-20160816; b=qyfDWphy+gXGfssc7CXSMrCO79+EcyZHq8srHcvwFFu0oojcQ7jJcOS7CU6wHPw/4O 4md7at5+yt6eIn0FADASGK+mTqYusd0djs7gnoNcmiXhML72gRNT+pAiExRjHIkQiWXe jOW2fc/nRuW7OboIMoiGTortCAcJjPikD3okXAvsnbE1WnIhKaV8Hfa625kW0WRrk7XU AClwwhTn1T6AUMK3mtBziFO5x4bE1UQepQxbPq4RSSonBCd51bIrpjf0cULLkxKOpNJD Tzg6RFMR2gYlFCKde7r4+saSpRaoZXXUXFCDlx+2YKEBKHa+DAy5RUnoO71ujNysPXj0 r+7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=Z/+3C7PXrZPV4OfzH0WXSfSO88Ekv/Kvj+0Y5bVyIJg=; b=uYJt76INt2sLJHLJ5DGpDqFB3w3Hj25OFg1jmeDXaFtyfRPXDK99m4/jGw2fPg3OBy 10L74IadH4eLWDctLzWvbYaDnAFO98sszVd3pEXYOuGhlDe1bD/08QBcwzQl1KQJd0ty VzV22xH3UWluxzE/WzhEDcJKCJr0J0RftZS/9muqZuiEkMIakac/mQmCiVDvPHaiQ3ws iXGbH4Xrg1PJtRLyYZjFUS/OLnIEW8ucSlUJo4OLiVXt3r2yVdA6YCO49dFZ3jc44Vsp f8IbjW4rQu02oo3RgLWlRGwlozsNJx7HHJsGJ9bWYAp4z4Mgj/Vp76gD3rZo04+lm3NZ Uk5A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y13si9915894eda.344.2021.10.21.01.44.35; Thu, 21 Oct 2021 01:44:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230385AbhJUIp5 (ORCPT + 99 others); Thu, 21 Oct 2021 04:45:57 -0400 Received: from mx22.baidu.com ([220.181.50.185]:47314 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231523AbhJUIp4 (ORCPT ); Thu, 21 Oct 2021 04:45:56 -0400 Received: from BC-Mail-Ex05.internal.baidu.com (unknown [172.31.51.45]) by Forcepoint Email with ESMTPS id 9912C6B48C7DE40A7AEC; Thu, 21 Oct 2021 16:43:38 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex05.internal.baidu.com (172.31.51.45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Thu, 21 Oct 2021 16:43:38 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 21 Oct 2021 16:43:37 +0800 From: Cai Huoqing To: CC: "J. Bruce Fields" , Chuck Lever , Trond Myklebust , Anna Schumaker , , Subject: [PATCH] SUNRPC: Make use of the helper macro kthread_run() Date: Thu, 21 Oct 2021 16:43:35 +0800 Message-ID: <20211021084336.2448-1-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex11.internal.baidu.com (172.31.51.51) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Repalce kthread_create/wake_up_process() with kthread_run() to simplify the code. Signed-off-by: Cai Huoqing --- fs/lockd/svc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index b220e1b91726..934dc13a7011 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c @@ -397,7 +397,7 @@ static int lockd_start_svc(struct svc_serv *serv) svc_sock_update_bufs(serv); serv->sv_maxconn = nlm_max_connections; - nlmsvc_task = kthread_create(lockd, nlmsvc_rqst, "%s", serv->sv_name); + nlmsvc_task = kthread_run(lockd, nlmsvc_rqst, "%s", serv->sv_name); if (IS_ERR(nlmsvc_task)) { error = PTR_ERR(nlmsvc_task); printk(KERN_WARNING @@ -405,7 +405,6 @@ static int lockd_start_svc(struct svc_serv *serv) goto out_task; } nlmsvc_rqst->rq_task = nlmsvc_task; - wake_up_process(nlmsvc_task); dprintk("lockd_up: service started\n"); return 0; -- 2.25.1