From patchwork Mon Feb 5 08:26:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kunwu Chan X-Patchwork-Id: 196673 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp738798dyb; Mon, 5 Feb 2024 00:26:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IEOjJRZ8M7yu82ZeaI6Gr6KdyaX8/XQ9pUXzSoQD/po6fKxm7iR8qg/Q4+cMKvQO4EWeLRt X-Received: by 2002:a05:6214:500f:b0:686:a202:ee55 with SMTP id jo15-20020a056214500f00b00686a202ee55mr7237498qvb.28.1707121610521; Mon, 05 Feb 2024 00:26:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707121610; cv=pass; d=google.com; s=arc-20160816; b=kLK4P5Kyf4stvQsNHJ8HkXtCXFjOvhivZXTnPhnCDeU3bs82/jSrYflK3xK2XVA+6g gJQdac6zogL+mD03k72K7S76pKwyR/HOgq+L9dl4n54c3KfBgJL0W6cejHe7l5q/wNmi FMSil+23+HoTrX0rNMfJjNK7SO9j6sGbpjNbKFqSGv8HVDhnqMxobhbFV4orDZjIZ6aA sWoiIWHNBS7SDEuApjNhkd4eEgX+kAHAczR+bVQleM4LpKF6JyFdSqPEJoTMyAnxREBr 3ihfL58Xx4l6D40Xp3u/F8G+S4+Lj4fap5AebRG4IIQxSRGz0F/JNv4ax9wRAiRkR/EK //oA== 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=HW1QphMNSGYoTGiD0yXD14wFvWgUOcNXkl1ROihW9NQ=; fh=puGydkGnW1ssgKS66T321lntTCegkaiSOzOpQppR1NA=; b=LgYcZw1Oey/A6yVAyVWXYgyEoi5nRHcekFdfTeZBf7DWjcS/X5cDqJiiMJdIz1JwQx zOwCFSXH1tBe+EDrZSHrM60q1KbOjrqicMEaFU+1W9Hc3KzZ4k/4LWUoDx65zugJYJ26 2AVhM7SXxnXqgMo06FwZ7uJ0+FxM2cwxuGn/HdchmjPWXNe854eepFiaVOV/nm5oGY4u 6GbfuE2uhgOhT2+1aWSdfLZ59+O/OjcMnXtzww50eKrCoX7lJPeQOnEBCgSi0FWqVrDm 09+mtOaC8eHQf9TsGXz/jobbFlLrkR8MUiI5imrio4BsyKC80xfAtNmiAxK6IieuBM0Z FEWw==; 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-52204-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52204-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWWv8LMvDrAgD7h7XTD/uTIWKvtc+iScBKhngVssNODrMChN+1YuLYvWBiU4l9PNuLnqWMnG+LwH+80rAsiUcB7QWFBxA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id da3-20020a05621408c300b0068c67a0fc45si7813058qvb.572.2024.02.05.00.26.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 00:26:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-52204-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=kylinos.cn); spf=pass (google.com: domain of linux-kernel+bounces-52204-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-52204-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 3CD831C21570 for ; Mon, 5 Feb 2024 08:26:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EAD2E11CA9; Mon, 5 Feb 2024 08:26:33 +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 DF47011197; Mon, 5 Feb 2024 08:26:29 +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=1707121592; cv=none; b=RhNVTYr/F4DcpIaGXi7mMfI6SVTC8pgbGFd369ktJ34ymstVM9qGMaU61TlLmsonaE3yeyolkVw17thpLT+QGET1OHQlluWVpFg/+pmOFHbYOFsaysqmCxciiOZ0QvjgDPEGq4wUWzOScLn0ULuhwRbfwc72shYHX2rTjCUQxE0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707121592; c=relaxed/simple; bh=LbuJw2xD8l9tYjGEUkeiPhK3rPmUvUClZqAADKdQjCA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=kaWnAZCKzLSVG97U22ozGrcn+EqfjrmRp9Ruk6lM+65TpwupKEUmSc4F2xtqGxkqZxqT361XYWnJbnR3Rdkm3tO6qf9cFSBpSryGUDp8Fxakqphf3ofMoOnwzVr++6m8XR3/rRivrMmpoGnFAAlSis9s7L8WTpE/DULiDG6ZxAg= 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: 8b8e8b0dbbc142ecb32e9686707e00ca-20240205 X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.35,REQID:d0471828-7056-4f39-9f3a-ae59c357938f,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:d0471828-7056-4f39-9f3a-ae59c357938f,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:0ea92180-4f93-4875-95e7-8c66ea833d57,B ulkID:240205162625SWQ3TOL0,BulkQuantity:0,Recheck:0,SF:17|19|44|66|38|24|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: 8b8e8b0dbbc142ecb32e9686707e00ca-20240205 Received: from mail.kylinos.cn [(39.156.73.10)] by mailgw (envelope-from ) (Generic MTA) with ESMTP id 1928903605; Mon, 05 Feb 2024 16:26:22 +0800 Received: from mail.kylinos.cn (localhost [127.0.0.1]) by mail.kylinos.cn (NSMail) with SMTP id 3472DE000EBC; Mon, 5 Feb 2024 16:26:22 +0800 (CST) X-ns-mid: postfix-65C09BAE-2003869 Received: from kernel.. (unknown [172.20.15.254]) by mail.kylinos.cn (NSMail) with ESMTPA id B7F44E000EBC; Mon, 5 Feb 2024 16:26:21 +0800 (CST) From: Kunwu Chan To: chandan.babu@oracle.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH] xfs: Simplify the allocation of slab caches in xfs_bmap_intent_init_cache Date: Mon, 5 Feb 2024 16:26:20 +0800 Message-Id: <20240205082620.435721-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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790046749903906520 X-GMAIL-MSGID: 1790046749903906520 Use the new KMEM_CACHE() macro instead of direct kmem_cache_create to simplify the creation of SLAB caches. Signed-off-by: Kunwu Chan --- fs/xfs/libxfs/xfs_bmap.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index f362345467fa..e46d0e21aeb6 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -6211,9 +6211,7 @@ xfs_bmap_validate_extent_raw( int __init xfs_bmap_intent_init_cache(void) { - xfs_bmap_intent_cache = kmem_cache_create("xfs_bmap_intent", - sizeof(struct xfs_bmap_intent), - 0, 0, NULL); + xfs_bmap_intent_cache = KMEM_CACHE(xfs_bmap_intent, 0); return xfs_bmap_intent_cache != NULL ? 0 : -ENOMEM; }