Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp405319pxb; Thu, 21 Oct 2021 01:45:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWJf5t/ScUix9/hzAxvMiSdtRP/H32dbhFkuex1Wmevi1YmxiyG/SMQ+5FZ2rpisyVGUzi X-Received: by 2002:a63:1a1b:: with SMTP id a27mr3418530pga.220.1634805905076; Thu, 21 Oct 2021 01:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634805905; cv=none; d=google.com; s=arc-20160816; b=MhjYTQdK6xRW67oHonnUR94nNAzrrH0Se0ZhZdX5pJp5sgYVB6eSPIoorixhc1MhL8 r9wVjzK7Fc1cKzfDwYV7fRvh2p8vduX2/3HJINHuEa0e1t+uo88P0v32Tgip9OC4fBm3 PS9dfTcVmak+xjXcLxNeJxkMRvX/qS6LkolQ9uptOC6mRvK0sBjLVO1M6f3Vptgh81BO 6o0gAIFROF6qqpSrIJYAEdQsJiJRbNSWRDlYehSknjPnhJiE6Aa78evy1vGCP6uDfRDE ToHKd6O1aCz7igT7tDqwcicLHsPUIufAgMA1Gath1JWQd5I6fF3dr0wrak3wqCoombnb c21Q== 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=YITvz86wvLKxWO7DJ9ptzSUvNQ6++LrNxVG3y71+MD8=; b=RPvQ/ajyo5/xpQT3yY8Bnq+IYkY4/znayx926vFeDv7Bhr4CMCFJkPook+we9aPLpO NsLzvTUblCVrP4of8AdFcKjR/NxFCmlzahVMlCuirE6AMtmaX59qRA1Uh0iyB8xFZhyU oH+fQSN5TDyH93ysAHQ30EQJazlfoWwNeR64Fp69R3g7f9lYeGeWt/+Jmjj5eSM2QRmO u+4w/fatYIKqw6UAwO3Bcqqd+ozcLGtmQfQxCbYCuzCjGxg8HCndUOZcAMTBRFPCwn0S bN5f+l2FdF/ECNcvQnr8FJaaxpb1nmC3TT2VHQP05rkOfmOzx+UQbgj+DeYpzkbLafyp Tqzw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 k191si6010499pgd.542.2021.10.21.01.44.51; Thu, 21 Oct 2021 01:45:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231419AbhJUIqE (ORCPT + 99 others); Thu, 21 Oct 2021 04:46:04 -0400 Received: from mx24.baidu.com ([111.206.215.185]:47538 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231524AbhJUIqC (ORCPT ); Thu, 21 Oct 2021 04:46:02 -0400 Received: from BC-Mail-Ex03.internal.baidu.com (unknown [172.31.51.43]) by Forcepoint Email with ESMTPS id 0FA979DB31A7193B259A; Thu, 21 Oct 2021 16:43:46 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex03.internal.baidu.com (172.31.51.43) 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:45 +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:45 +0800 From: Cai Huoqing To: CC: Richard Weinberger , , Subject: [PATCH] ubifs: Make use of the helper macro kthread_run() Date: Thu, 21 Oct 2021 16:43:43 +0800 Message-ID: <20211021084344.2501-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-kernel@vger.kernel.org Repalce kthread_create/wake_up_process() with kthread_run() to simplify the code. Signed-off-by: Cai Huoqing --- fs/ubifs/super.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index f0fb25727d96..0e7f206c43cf 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -1367,7 +1367,7 @@ static int mount_ubifs(struct ubifs_info *c) sprintf(c->bgt_name, BGT_NAME_PATTERN, c->vi.ubi_num, c->vi.vol_id); if (!c->ro_mount) { /* Create background thread */ - c->bgt = kthread_create(ubifs_bg_thread, c, "%s", c->bgt_name); + c->bgt = kthread_run(ubifs_bg_thread, c, "%s", c->bgt_name); if (IS_ERR(c->bgt)) { err = PTR_ERR(c->bgt); c->bgt = NULL; @@ -1375,7 +1375,6 @@ static int mount_ubifs(struct ubifs_info *c) c->bgt_name, err); goto out_wbufs; } - wake_up_process(c->bgt); } err = ubifs_read_master(c); @@ -1780,7 +1779,7 @@ static int ubifs_remount_rw(struct ubifs_info *c) goto out; /* Create background thread */ - c->bgt = kthread_create(ubifs_bg_thread, c, "%s", c->bgt_name); + c->bgt = kthread_run(ubifs_bg_thread, c, "%s", c->bgt_name); if (IS_ERR(c->bgt)) { err = PTR_ERR(c->bgt); c->bgt = NULL; @@ -1788,7 +1787,6 @@ static int ubifs_remount_rw(struct ubifs_info *c) c->bgt_name, err); goto out; } - wake_up_process(c->bgt); c->orph_buf = vmalloc(c->leb_size); if (!c->orph_buf) { -- 2.25.1