Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp896970rdb; Tue, 30 Jan 2024 01:42:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IF95BiEHmJrKIhZyPG5O7eyF6hAjEwO1zFprpDVlLlk+g3Mbnt5HqfB6OIvv+ikHpPBEnAq X-Received: by 2002:ad4:5ecf:0:b0:686:ade0:5f47 with SMTP id jm15-20020ad45ecf000000b00686ade05f47mr7405552qvb.95.1706607746909; Tue, 30 Jan 2024 01:42:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706607746; cv=pass; d=google.com; s=arc-20160816; b=c95D7eCizQevQrbl6p3pQpEKoNdpXhjD2BbulXGPA7Z5avlEeVUtZl96GMeJUZD15o EwTpd3IDCeNqsGNK083SOLEAq8QH3A5XxqkW68OB1b2csIdYrgLTGCKcyd1vk7ZApFjd vyUTdz78xf7Dq23iiWrjAQaM4CaCNL1C+XFeUf5dQnA8yaU80C7VgMA3hno3ykECHKjr ZKluF/XUiqk13RtBmjvZEtILn+7rWr2jHFi+kbUnOU6uZkPvYmFbmnB+mqktjqvk21o6 KykkCVD/uZ73mQlyZY3oGdRyqPggDzt9nAFLYWWR9jWXEq4mFuaJP3e5/cj9AO5E/9AI YsjA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=+eU+01yLCCmooM5WtL5VuPJ2aBFOzWQkWAYxHrd7uSA=; fh=kHpibI+zl+zquEML9CSJvcQABWCQqUm0qhxAit9pDVw=; b=NjY2azA9tIxPRXV9vt+S2mIqzTi3aENp7iY7Vnlet8AZltLlDSEllYuXoi6taXE6Av /2zxOtZ/e2L2bCnniCsgHiiAa1ptBM/s7Lri2xo9hxcLKUUy6flmYgYk9sK6ex2LvCAX cyt3gSCQAM6fdGOSM3jxOIbHHmHZS64ukOANifeglXM1nASVnXdJk/9Ag37MtCnFpnCy 3ftki2JhMsON7sKGH8vGnQxAHA/HEjCd3Da6YbOgk1mJEZaRZY357GR2KxRFn0D319xk YjW8URmJuqOboSJUjU0aUJqQcY06tAjE5l8MZgGu0EaotHbf9gqsrQ+vEd9fkL4Xbieh 52tQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-44283-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44283-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id im3-20020a056214246300b006852e500f5bsi9913649qvb.322.2024.01.30.01.42.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 01:42:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44283-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-44283-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44283-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A82201C265BC for ; Tue, 30 Jan 2024 09:42:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D6CEB6086F; Tue, 30 Jan 2024 09:40:56 +0000 (UTC) Received: from mailgw.kylinos.cn (mailgw.kylinos.cn [124.126.103.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DDF1756448 for ; Tue, 30 Jan 2024 09:40:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=124.126.103.232 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706607656; cv=none; b=jMMBP6kaw+bmQwrx4VgJDybvS/0eOI6z/u/a3EzJmwCWWBGZwnzH4TV/qe2q7opOUV0SKPw8U0r0GBYVQ5ODVc30bpMO6rolybxBRT+Nb/6liaA9Hr/hXZBK4vXbcc6+CbFojYvk5CLx9tOwNS4/YNcH8ROdvUPgg6mgPxWgbsM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706607656; c=relaxed/simple; bh=ufH/YfkovaUPjRe2Wr0p28Xr1kor2t9YuM7pYvf8SEg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=VxkCWo5pYJMG7MVchYiFIAAHqMAixhsR/XPa30N266DxCwKEjTVK2e3wUi//yfm2ZzDlg/uEym8pPCuzgo3xXBfaIvmfCqvQovAUKDOX3gkryO5XIVdXHxbzB5xheKLmQAnqRBr7Bc/BmUZ5dLTElZbWz0FH9C0vUg8xyUb0w/8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn; spf=pass smtp.mailfrom=kylinos.cn; arc=none smtp.client-ip=124.126.103.232 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=kylinos.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=kylinos.cn X-UUID: d9510a6461524e2b8a80b966313b8d64-20240130 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:91328706-21cf-49b7-9778-703d31fd7df0,IP:20, URL:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTI ON:release,TS:5 X-CID-INFO: VERSION:1.1.35,REQID:91328706-21cf-49b7-9778-703d31fd7df0,IP:20,UR L:0,TC:0,Content:0,EDM:0,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:5 X-CID-META: VersionHash:5d391d7,CLOUDID:551e6a83-8d4f-477b-89d2-1e3bdbef96d1,B ulkID:2401301740489IUEEHSU,BulkQuantity:0,Recheck:0,SF:66|38|24|17|19|44|1 02,TC:nil,Content:0,EDM:-3,IP:-2,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,CO L:0,OSI:0,OSA:0,AV:0,LES:1,SPR:NO,DKR:0,DKP:0,BRR:0,BRE:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-CID-FACTOR: TF_CID_SPAM_SNR,TF_CID_SPAM_FAS,TF_CID_SPAM_FSD,TF_CID_SPAM_FSI X-UUID: d9510a6461524e2b8a80b966313b8d64-20240130 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 1433395071; Tue, 30 Jan 2024 17:40:46 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 522A9E000EB9; Tue, 30 Jan 2024 17:40:46 +0800 (CST) X-ns-mid: postfix-65B8C41E-1119281145 Received: from kernel.. (unknown [172.20.15.213]) by mail.kylinos.cn (NSMail) with ESMTPA id 3DBF6E000EB9; Tue, 30 Jan 2024 17:40:44 +0800 (CST) From: Kunwu Chan To: axboe@kernel.dk, paul@paul-moore.com, elena.reshetova@intel.com Cc: linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH] cred: Use KMEM_CACHE instead of kmem_cache_create Date: Tue, 30 Jan 2024 17:40:37 +0800 Message-Id: <20240130094037.76895-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable commit 0a31bd5f2bbb ("KMEM_CACHE(): simplify slab cache creation") introduces a new macro. Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan --- kernel/cred.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/cred.c b/kernel/cred.c index c033a201c808..02a96e9d9cfd 100644 --- a/kernel/cred.c +++ b/kernel/cred.c @@ -606,8 +606,8 @@ int set_cred_ucounts(struct cred *new) void __init cred_init(void) { /* allocate a slab in which we can store credentials */ - cred_jar =3D kmem_cache_create("cred_jar", sizeof(struct cred), 0, - SLAB_HWCACHE_ALIGN|SLAB_PANIC|SLAB_ACCOUNT, NULL); + cred_jar =3D KMEM_CACHE(cred, + SLAB_HWCACHE_ALIGN | SLAB_PANIC | SLAB_ACCOUNT); } =20 /** --=20 2.39.2