Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp403716pxb; Thu, 21 Oct 2021 01:42:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6GJ6SJXLOobBKtA0rSQY67+62ydXjff2xfNCzlXQHrUXYoUmi47tX5yfSgEFA9Cf6bP1g X-Received: by 2002:aa7:8b56:0:b0:44b:e510:a208 with SMTP id i22-20020aa78b56000000b0044be510a208mr4355927pfd.56.1634805761770; Thu, 21 Oct 2021 01:42:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634805761; cv=none; d=google.com; s=arc-20160816; b=H/ryTh+tR+P5t4QetSIsT8WaQiwHKfBAyqhcyDc73p6wiRRYQItBQpOOTaBXRUJmAI FTJBkvFak/cViQjjJWT3USApA9EWBrfDZRTNLmdcqOOqHeC+vGlZWCAuEOeaIK+VShqB PgYATS891ZaGtqXB+bUfjsqESAmO2QLGzhVZv+4RCLdLVAb/tx8P+6/hlSJCvWVqbxMv LwE2VH45n7zEChYdDkwy4dBoaYQa2YU4st5DrcW6ErvI6W2xSPc3zCYR9GMUVOboYzGd i2N3Lu6jv+EHrwAuoRy4UXKcUpcyREG1LfofFpgsaPe7A1wtmV4BFiASINjqHfe7KGD1 c4EQ== 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=+KdOG3/QEOH+HVaTaFRlKD8kEE3z5esz2kZj3wcKKW0=; b=xzSHrOnyqOJv3kJgU31+f+yVMcwWJYQREFG6Y7WQTvp41Xd639XOmE4oEXRaTOdjff 0F5+57ZLtawZV4HJEV4ZCXJcYeu3aHztd1Mwrq5YgHx/+CGX+WOYDKMxY91NENJpbgL+ MFVW8W9DS6JhYBhoPjffQhLDLFR9ak1rfONr6U4fAplkncYi8PGHsLBAOv7zaraIVyWG ST6fqj+fPd7oGh4LrLxS//EhWDjNEz5hPY74mraqVhbzvZtLgvsn55X4vbYyt2GsccMc Q6cUO/GzrSyWllHcPq6MGCzX4x95gju45SzFRCBxjshhbZibIQ+lRaZlpNW3FR22zCdl O0wQ== 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 on9si12215754pjb.64.2021.10.21.01.42.16; Thu, 21 Oct 2021 01:42:41 -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 S231461AbhJUIoa (ORCPT + 99 others); Thu, 21 Oct 2021 04:44:30 -0400 Received: from mx24.baidu.com ([111.206.215.185]:45828 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231467AbhJUIoZ (ORCPT ); Thu, 21 Oct 2021 04:44:25 -0400 Received: from BC-Mail-Ex11.internal.baidu.com (unknown [172.31.51.51]) by Forcepoint Email with ESMTPS id D74713269B6F6BE839CC; Thu, 21 Oct 2021 16:42:08 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex11.internal.baidu.com (172.31.51.51) 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:42:08 +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:42:08 +0800 From: Cai Huoqing To: CC: "J. Bruce Fields" , Chuck Lever , , Subject: [PATCH] NFSD: Make use of the helper macro kthread_run() Date: Thu, 21 Oct 2021 16:42:05 +0800 Message-ID: <20211021084206.2236-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-EX02.internal.baidu.com (172.31.51.42) 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/nfsd/nfs4proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index a36261f89bdf..69428cb31a55 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1685,15 +1685,15 @@ nfsd4_copy(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, memcpy(©->cp_res.cb_stateid, ©->cp_stateid.stid, sizeof(copy->cp_res.cb_stateid)); dup_copy_fields(copy, async_copy); - async_copy->copy_task = kthread_create(nfsd4_do_async_copy, - async_copy, "%s", "copy thread"); + async_copy->copy_task = kthread_run(nfsd4_do_async_copy, + async_copy, "%s", + "copy thread"); if (IS_ERR(async_copy->copy_task)) goto out_err; spin_lock(&async_copy->cp_clp->async_lock); list_add(&async_copy->copies, &async_copy->cp_clp->async_copies); spin_unlock(&async_copy->cp_clp->async_lock); - wake_up_process(async_copy->copy_task); status = nfs_ok; } else { status = nfsd4_do_copy(copy, 1); -- 2.25.1