Message ID | 20240117094912.155729-1-chentao@kylinos.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-28763-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:42cf:b0:101:a8e8:374 with SMTP id q15csp798410dye; Wed, 17 Jan 2024 01:49:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IEJVYHHu6llcAvc5XqjbRxLzvqg5sqlwQJ71FaFaiVEi5TKalYRCMjhjwGN8iLrIkwWBw/g X-Received: by 2002:a05:6402:8d2:b0:559:e098:5381 with SMTP id d18-20020a05640208d200b00559e0985381mr280679edz.7.1705484977518; Wed, 17 Jan 2024 01:49:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705484977; cv=pass; d=google.com; s=arc-20160816; b=PfeewsfJUT3mPiHrIet2J/fuTADSzKsO6f/u10Dn8DuhQemLO9/A3QoU1twdoL5oFw M44r/DvaXlL0xNJA+BD6IAwbiWqdEVibnfMcfw+COVyeVDwzYV5wwBAI9aGSBdGonnjq TVXAS/BguuDQMvYLwHo0lr/RGJMpEMlag49wHAHGcaxK36YSlq/pVA9R49NvB0fTTjhL /t8yQsNE12DqLmBM9MHqwlwP/yRkdb/OfhaiXWONTV+3LRNOPaZqGJL3MzmezaIbgmQX FPQCLw4kdU1KwNxrlkfid+OP+Z5/m/xG5Lo6W/o6Riam/b7BDf0rQxZ7fuYIwPXQJkzF Ob1A== 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=Awg8bzcNfAEiJk5aaPZ/1E5DCBcv5IC4YegqIeb+LU8=; fh=0/0A+aGOlF0HrkEOTWn5Q54UPe+Vluu22Wt5wHdzJpA=; b=ghtGjenP6fLuifk2Rp6BfBN9by6kVKct2H7RAxmmBdmxyzqXgnTzok/PPcixRWxs2+ PvzlZ7MnM9Wj6cSf5VMEM6bsB8d5TL0Vf9mg7aFD4QlJEu9rbedB0sXNprkgPEF9a6i4 PXTcmcTvGYU70wyhD+IKQ4jshrb9kY46u3/uLi59xfJ/qlQa9Y4ME1jPVaWwHLru5udT WA1mslyWuks/RlF4FK+p2nhViE3qrX/OqAHHM1rDwk1qrng3XTq0Tizq567sCvK+hg1L lsVJndiPMYq2+84agJPNtSzA035BLoGVlV2bOHDezl8NOr8xlGEnZhv7E0FeiDuRr9Yn oL7g== 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-28763-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28763-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ek22-20020a056402371600b0055872d13ac5si5973749edb.270.2024.01.17.01.49.37 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 01:49:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-28763-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-28763-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-28763-ouuuleilei=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 am.mirrors.kernel.org (Postfix) with ESMTPS id 232221F23E27 for <ouuuleilei@gmail.com>; Wed, 17 Jan 2024 09:49:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C277914292; Wed, 17 Jan 2024 09:49:24 +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 1364C14264 for <linux-kernel@vger.kernel.org>; Wed, 17 Jan 2024 09:49:19 +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=1705484963; cv=none; b=DC5ZVDC5wdlVS4Eu9tTcbQjXbVfvCuup44Vm4YZ29tqDipbQawKpSXYX676RYAdzrafawRS620i958FUuYdARJeV+scJqDqdn371U50N31OEUOw3rITdWf4t+3JRoopB8QQ4r4vm2iByW0FcbR+22PFoeDbuCrhiqsO33KKAiX8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705484963; c=relaxed/simple; bh=7GWS1V6NjJSHOFU7bkOXSHE/D7l3qrvU5HZcUfH1Vnk=; h=X-UUID:X-CID-P-RULE:X-CID-O-INFO:X-CID-INFO:X-CID-META:X-CID-BVR: X-CID-BAS:X-CID-FACTOR:X-UUID:Received:Received:X-ns-mid:Received: From:To:Cc:Subject:Date:Message-Id:X-Mailer:MIME-Version: Content-Transfer-Encoding; b=NcndrdFmYeVZvnpi7+ljvMn4+5sEs8rIsbkW6qgqh74qpMVsBWfiaXkW1vxl4UfhnXMmVOyJvViJyRdlGIbiRynsNINw2VHBr1BRxSp+UQouaH00Mg4RE0/Yv06ceaHWs+vjFUZZs3CsoD9meGXS/GbllIx9EvfmZdqkuCVremg= 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: 6a3c479c79494d19a82d0990871f5611-20240117 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:99b7ab5f-8fc9-4f37-af81-8e90cc9060ab,IP:10, URL:0,TC:0,Content:0,EDM:25,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACT ION:release,TS:20 X-CID-INFO: VERSION:1.1.35,REQID:99b7ab5f-8fc9-4f37-af81-8e90cc9060ab,IP:10,UR L:0,TC:0,Content:0,EDM:25,RT:0,SF:-15,FILE:0,BULK:0,RULE:Release_Ham,ACTIO N:release,TS:20 X-CID-META: VersionHash:5d391d7,CLOUDID:f0ac432f-1ab8-4133-9780-81938111c800,B ulkID:240117174916YVG0YATC,BulkQuantity:0,Recheck:0,SF:66|24|17|19|44|102, TC:nil,Content:0,EDM:5,IP:-2,URL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL: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: 6a3c479c79494d19a82d0990871f5611-20240117 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from <chentao@kylinos.cn>) (Generic MTA) with ESMTP id 757765849; Wed, 17 Jan 2024 17:49:15 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 0B315E000EB9; Wed, 17 Jan 2024 17:49:15 +0800 (CST) X-ns-mid: postfix-65A7A29A-856248760 Received: from kernel.. (unknown [172.20.15.234]) by mail.kylinos.cn (NSMail) with ESMTPA id 911CEE000EB9; Wed, 17 Jan 2024 17:49:14 +0800 (CST) From: Kunwu Chan <chentao@kylinos.cn> To: aahringo@redhat.com, teigland@redhat.com Cc: gfs2@lists.linux.dev, linux-kernel@vger.kernel.org, Kunwu Chan <chentao@kylinos.cn> Subject: [PATCH] fs: dlm: Simplify the allocation of slab caches in dlm_lowcomms_msg_cache_create Date: Wed, 17 Jan 2024 17:49:12 +0800 Message-Id: <20240117094912.155729-1-chentao@kylinos.cn> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788330615806603097 X-GMAIL-MSGID: 1788330615806603097 |
Series |
fs: dlm: Simplify the allocation of slab caches in dlm_lowcomms_msg_cache_create
|
|
Commit Message
Kunwu Chan
Jan. 17, 2024, 9:49 a.m. UTC
Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
to simplify the creation of SLAB caches.
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
---
fs/dlm/lowcomms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hi, On Wed, Jan 17, 2024 at 4:54 AM Kunwu Chan <chentao@kylinos.cn> wrote: > > Use the new KMEM_CACHE() macro instead of direct kmem_cache_create > to simplify the creation of SLAB caches. > > Signed-off-by: Kunwu Chan <chentao@kylinos.cn> Acked-by: Alexander Aring <aahringo@redhat.com> - Alex
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 6296c62c10fa..712165a1e567 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -248,7 +248,7 @@ struct kmem_cache *dlm_lowcomms_writequeue_cache_create(void) struct kmem_cache *dlm_lowcomms_msg_cache_create(void) { - return kmem_cache_create("dlm_msg", sizeof(struct dlm_msg), 0, 0, NULL); + return KMEM_CACHE(dlm_msg, 0); } /* need to held writequeue_lock */