Message ID | 20240205082423.435569-1-chentao@kylinos.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-52202-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp738159dyb; Mon, 5 Feb 2024 00:24:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IGSCtyjrBiscxyvSuNbsfRJBPZxua8FsucL6CPX+H7x5qtOttvMLuf5iR1E4frwZS9F4ju4 X-Received: by 2002:a17:906:e4c:b0:a37:e93e:966d with SMTP id q12-20020a1709060e4c00b00a37e93e966dmr233824eji.16.1707121494466; Mon, 05 Feb 2024 00:24:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707121494; cv=pass; d=google.com; s=arc-20160816; b=F4t3ovvoXsNQ6wzr+a1KbAmK8t8a+sDfoZ2DdtA9CsjTFuv5REVeZbw7US5RNtIwOj HxF9TOaHcdvqTKGKDyIx4b1ejy5kf1MhUJ/+tL6thjLamyHHOwWrsH8kezqCoodAGm0V U17dNP/f+aOynRbgF6BMnWtCubl2oBXvwoYYrzf10RjE1ynFOETQ0n+StfZgftNVfjGr 7VItAmgjAqwKL6xJrm6nzCMaoB1bfY4H2xwwHsDW1IQRAkwk9gJhWjesLJPT8SIGVuRh 9UhIJacwyRTFiVJo+eqP2t8/MPogTVf80KjgqAEs3LHHF4zwgjVxi+kZw1MTF5uOjgaW T8Yg== 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=qB7X2ao4SIJYe0qCLzDmCavJNqvwjQYghzUKrdBpuYw=; fh=r8hD/VK3/3d+upf0r7JxHuPAyval6XDX/SihriUAEIY=; b=RJVOrgNeRjnoQMS1TpooKs5WhJCWWVBO6nouHkWvqV78qDB9I+Evjriqr/+NtpgZE5 UOEE8qigx9p7pO8uIJZCc4My6zhYsA/yKDajV/xycjElxod+ZyceHPxv1/0RB5k5zQ10 Nf3dHxqnjeg4j8bR4wZUzpcTfX/dlG+f3jWMQvuM8yTwbS+sj5DbnedM+H/t3FJ9JMdo 2r5ZevwwyL8yZ1vG6Sx5/1jiD6WUFHeqHW9+IPrvJYek0l5lRa7ayFN4iwdgpIVxnvHG dia5XgnaYk/vEOiGBAwf1txZ5f4dS2BwixMRxiSFCOh6gN0Q5tFbUIZS2LnWmXPLwOwo 60XA==; dara=google.com 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-52202-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52202-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCVcG6UVghydXxcQ/3K2IgHO4D4MGo71GALFDw7vnawJCrjX/BciUwKHPlGYHm3g5BZpnzxOZAkL+8TW/VXDQGaFrYrHqg== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id b4-20020a170906d10400b00a372c2821e8si2942601ejz.747.2024.02.05.00.24.54 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 00:24:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52202-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-52202-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52202-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 1962E1F2157B for <ouuuleilei@gmail.com>; Mon, 5 Feb 2024 08:24:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 83C3F11CA9; Mon, 5 Feb 2024 08:24:39 +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 8D5651119B; Mon, 5 Feb 2024 08:24:33 +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=1707121478; cv=none; b=tCLluaNBu2Lg0QdNaUYTss8s5g1wEAGcULlRVtEz+n10aWOxsaVg6jfKmAEDL0yh07aVFRV4kvsePkBpE3rKB5nlXtOZNXMO16lo0CugKsG2KozayMFwNO/viM8lBo/FEov8pdSnGMqCPYfE+rCgycUpuMMiRg9FB3AOCbLy2tU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707121478; c=relaxed/simple; bh=KQpaPLqSEolF8emsWTskFJOpRGHDfiOKvR6xUfHJThE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=KMPQXHdyUCsFdbYZfomFEkezuC8BkLMrMrtCy1tp9f9DNYpjBzz2es41q6Qk9vMksNLSKkSY0s98zLzD7/4Hx+YEN9SSInRCXt8DHXNou1IcRZ+wWjbmOig3tcH2gMFWvD39v5Ld8iVFDHDLJU0+R/x4tafLcfvrC82q6U9/UtY= 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: f9bc70ff996c4d7392f84dd422bb2e54-20240205 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:4e29416e-52ab-436f-85b1-2bd53a7c5caf,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:4e29416e-52ab-436f-85b1-2bd53a7c5caf,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:eb9c86fe-c16b-4159-a099-3b9d0558e447,B ulkID:240205162428F9EWJSI9,BulkQuantity:0,Recheck:0,SF:44|66|38|24|17|19|1 02,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: f9bc70ff996c4d7392f84dd422bb2e54-20240205 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from <chentao@kylinos.cn>) (Generic MTA) with ESMTP id 1214818029; Mon, 05 Feb 2024 16:24:26 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id E7E6BE000EBC; Mon, 5 Feb 2024 16:24:25 +0800 (CST) X-ns-mid: postfix-65C09B39-75837763 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id 41994E000EBC; Mon, 5 Feb 2024 16:24:25 +0800 (CST) From: Kunwu Chan <chentao@kylinos.cn> To: chandan.babu@oracle.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Kunwu Chan <chentao@kylinos.cn> Subject: [PATCH] xfs: Simplify the allocation of slab caches in xfs_attr_intent_init_cache Date: Mon, 5 Feb 2024 16:24:23 +0800 Message-Id: <20240205082423.435569-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: 1790046628104853377 X-GMAIL-MSGID: 1790046628104853377 |
Series |
xfs: Simplify the allocation of slab caches in xfs_attr_intent_init_cache
|
|
Commit Message
Kunwu Chan
Feb. 5, 2024, 8:24 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/xfs/libxfs/xfs_attr.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c index 9976a00a73f9..c8e1c741701f 100644 --- a/fs/xfs/libxfs/xfs_attr.c +++ b/fs/xfs/libxfs/xfs_attr.c @@ -1530,9 +1530,7 @@ xfs_attr_namecheck( int __init xfs_attr_intent_init_cache(void) { - xfs_attr_intent_cache = kmem_cache_create("xfs_attr_intent", - sizeof(struct xfs_attr_intent), - 0, 0, NULL); + xfs_attr_intent_cache = KMEM_CACHE(xfs_attr_intent, 0); return xfs_attr_intent_cache != NULL ? 0 : -ENOMEM; }