Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp337480rbe; Thu, 29 Feb 2024 00:34:47 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWP5pC4WujXXfb0G4Acw/xVoim87hEs60DRkM9mIJJUSC7un/j8+2iDIuGY1BYIGkEuGDztv41RJRJanNocjTOb/ZsWTpFzMpDvpbDGbA== X-Google-Smtp-Source: AGHT+IHu8Fil4TSRQs6dRg1mCu+7kUyp3yBqvII3oab4pFp7Ix4NH5prhFZ/vpxImf+XG3QcslHs X-Received: by 2002:a17:906:7ad0:b0:a3e:c3ee:33a5 with SMTP id k16-20020a1709067ad000b00a3ec3ee33a5mr1100184ejo.45.1709195687448; Thu, 29 Feb 2024 00:34:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709195687; cv=pass; d=google.com; s=arc-20160816; b=mcZ9BlaB+KWz4MeSxhgT8dL0kXr7uGj09uUgKPRw90hUbKqCw1cFIWGHfkIaA+e0R0 1++YBkaLJg+jo04Cxdb7XbqE2YvXAzBhS+8QrOK8LC5ulZtt8sXqHYotYzcnV3yV12RX ifFXVER1OeqD3cynKBP70eWCrkh9OsbXhEArlrsXrkdPuVbmU4feN33jO13ObbafQf5e GA6Hw1rfh7xX1gyiCNPz/dNRj6ck8gRzkg2fjoAv4nmwqMfY2a5E1JJecqHc8O34DF45 ENZrg6AlmHNUeZ1YWBve5VLHSP0lk2RG8JHaqE71PC3B3gQ6WE7Ue2LeSqcyyajQtLVm qjWQ== 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:dkim-signature; bh=c4hqPXVYzAPKLJpLD1lYkRxhseQa0+qO76gLH6MQGf8=; fh=ydGGCJ5dyMuKeCzfl7xE3L4DkU8f6yj4O7KBVMWAACE=; b=UqJYBE2SVe9byj6tq5/vVE762VDGyJ3JGlYSTJkTWB1alXOD0y5W1ooTTQQant3LAA chrQmtMIaNqAGiKaX5b1JFPldYZZjdl9FvmRUwuqG2zBj1pN54cDnp0jWs/g1Wu9dyLI o1Eghjxd/L0b4FtUTNTmKT05e4w0oIRLpsU3ex/OiujHhkmhiZLrHPH+xABYb1p14e+u u74/Q8beGKjVqOdXPbqR+s8+G5wSBZmghQwOSN3JDQJ2v52LYtxjjNpe87VX7truK++2 9UHc17gCaEMMZ2qPzO5Inj8aBPfevFxrz4pY/H0j9z1pF6EL1cIBtQhrpmL2EmVMaHaP wz5w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=mQLRID5R; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-86296-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86296-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id k3-20020a17090646c300b00a4421afbd7bsi391743ejs.2.2024.02.29.00.34.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 00:34:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86296-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=mQLRID5R; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-86296-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86296-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev 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 3A1B51F2476B for ; Thu, 29 Feb 2024 08:34:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3148C4F5F2; Thu, 29 Feb 2024 08:34:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="mQLRID5R" Received: from out-187.mta0.migadu.com (out-187.mta0.migadu.com [91.218.175.187]) (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 D0126481D1 for ; Thu, 29 Feb 2024 08:34:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.187 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709195680; cv=none; b=g68FyyUt0C5y2kU4rL0lopVQ4XkI6B9bjOa6MsE4bJykKhoTjLSM+KhfFczNLCZhsqrT5rov4iAIrncXMWVy/WQDvyy7Rjy1Omj4Aomxp4uNsQPffrnTe23G/a0zQo5Jhdrh3u6bv3mzLK7oX3IvMTWzaoFePAG1f/hz9hTc+Ug= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709195680; c=relaxed/simple; bh=PtmJDoA1H7SAn1CqzqBzHGTEfAfkzw/1rSUcVqWa4Ig=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=CehP9+YNdYKvxeQT6HENwkmPxf6c2Gnq/P+JDI8W4DXxn/1+/W/RapUkwXCF21zpNSWKSHVJRG/HGzZ8vxoqyePasXNI11qbqQPpvSu0HEZNX+4jTmd+1F2dcLBo4iMH3mjqdpznz++P+ayuuH0nCNa4kjSu+NV0kczfX8ej5k4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=mQLRID5R; arc=none smtp.client-ip=91.218.175.187 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1709195675; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=c4hqPXVYzAPKLJpLD1lYkRxhseQa0+qO76gLH6MQGf8=; b=mQLRID5RGJsIYKfmSTAqOY53BAsA4WAZ0BePYmie39/1QizuzOovA5S4I5TBOiAVyoWp3H CNJjh9ZM5cv+BCAsrdYIudxwvCfWG/jGFQcnfH3xj7SVFa3QkHEHr0UFNmJ4+yKZpbndt8 jVp0H/m+WelwzyxcDMbdVU+sfssmHAs= From: kunwu.chan@linux.dev To: chandan.babu@oracle.com, djwong@kernel.org Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH] xfs: use KMEM_CACHE() to create xfs_defer_pending cache Date: Thu, 29 Feb 2024 16:33:42 +0800 Message-Id: <20240229083342.1128686-1-kunwu.chan@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT From: Kunwu Chan Use the KMEM_CACHE() macro instead of kmem_cache_create() to simplify the creation of SLAB caches when the default values are used. Signed-off-by: Kunwu Chan --- fs/xfs/libxfs/xfs_defer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/xfs/libxfs/xfs_defer.c b/fs/xfs/libxfs/xfs_defer.c index 66a17910d021..6d957fcc17f2 100644 --- a/fs/xfs/libxfs/xfs_defer.c +++ b/fs/xfs/libxfs/xfs_defer.c @@ -1143,9 +1143,7 @@ xfs_defer_resources_rele( static inline int __init xfs_defer_init_cache(void) { - xfs_defer_pending_cache = kmem_cache_create("xfs_defer_pending", - sizeof(struct xfs_defer_pending), - 0, 0, NULL); + xfs_defer_pending_cache = KMEM_CACHE(xfs_defer_pending, 0); return xfs_defer_pending_cache != NULL ? 0 : -ENOMEM; } -- 2.39.2