Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp366353rbe; Thu, 29 Feb 2024 01:42:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWK1KPoHf62YBekZ/HGxU8zJmiajfdHfbHP1D5fVBsXbAuM4f5Y0OMtL3E+/3GMSTGPA77e7/q7ed0cZjPZ3nC/G3jio79LyqkRM8k3Cw== X-Google-Smtp-Source: AGHT+IGtJc4c7Jxc3P2O1x79T5YGn7IJGfY5ArTIUdttM4pvb6Mq6XhIMuOPanDFNbx20W9hI+WY X-Received: by 2002:ac8:5f06:0:b0:42e:794c:71ea with SMTP id x6-20020ac85f06000000b0042e794c71eamr1884322qta.20.1709199759104; Thu, 29 Feb 2024 01:42:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709199759; cv=pass; d=google.com; s=arc-20160816; b=q4ulT59t6K8VcvQXCUQRaIUCdNoKEx4o8N1Oyq6NqV9178uhRLg9ulu3Jq1sQ3bmIe 9M/ywJH3APH+8U2FKXMxTsEMEFM2QRX7f9CPCfASStGEcAid+9YCRdJ1Sq3x0jURT+HV kt69YNJUK3k3AdcFW4lc5aP3y55n/BYweK0mrj067YcnS8zwFBMfwvqzOuCAo/Qj2We2 HD65UOdcwKfCMaHgnwPbfGS2z84poOKI0D3TTV+9u85jaZ8GXrt+QJaPdVlp1N03/W+c cIAo4m9jiudmSR4lxKABdiReU3CbgbEb/LTW4LZ2meLchqwEYW29Z54oQOaXL33VT4YF yJFg== 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=GegLNLHxIoI8+sAVk+Nsq6tpYyLvBJO09+R/NY+xICI=; fh=FNCKZSf8HWylYhDsL8YP1fwQIqb5QZeJ2aZB8pNs6JM=; b=T8IEW0mjEBB49hw0s3RXXRBFt851usjryKx/OCviLMeebFOedw572UGkK6t0GubiA6 rdwjkAu/fGkrx5nz9LNxt/LH2FpJUOMC/Kx/t4+WUtGCeKHIZmBPgqBIErtHBo6LM2os JhqX+q2v/2PK6dDiRu8y2YaDJtEShLeLoRoFAueNbrMj42wBhYVtdxWse0HAL1+qEhzh I7acntguCBOwp6nwEVxecB/zmezwVj/iJQ9EJxEXOeOW6SrcSD9V0u+aLseDrLb+LA+r Mb4jnIVT5Azz8qcVW8+R8dLSlL5595mrZP5u98n3dZfMm3Xc+d5h+4j1M51eI2E+6Qzd Cn+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=paQ5zlGJ; 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-nfs+bounces-2120-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2120-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c10-20020ac8518a000000b0042e58058ce1si1001000qtn.14.2024.02.29.01.42.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 01:42:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-nfs+bounces-2120-linux.lists.archive=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; dkim=pass header.i=@linux.dev header.s=key1 header.b=paQ5zlGJ; 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-nfs+bounces-2120-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-2120-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D59F21C217B5 for ; Thu, 29 Feb 2024 09:42:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3193D5D8EA; Thu, 29 Feb 2024 09:41:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="paQ5zlGJ" X-Original-To: linux-nfs@vger.kernel.org Received: from out-186.mta1.migadu.com (out-186.mta1.migadu.com [95.215.58.186]) (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 BD87E5E22C for ; Thu, 29 Feb 2024 09:41:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.186 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709199705; cv=none; b=KbYZdMJJ+X2vik+2aLXcYxydjALL8gLws7L6vmeFxDmfXnnij1GZgSS/ygzsgqPrr4J8cVIWilcRrrJu5E3UL4EfSE741tO5oWtyJ/zQTRpgkSjvtP+8GXS0cmA2ZXFNvK9MSVQpA3STSG/HH/tjhEdo+odSmPs/xe4CdKD14qw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709199705; c=relaxed/simple; bh=DQqEJFJ7y8jsUuMKERh72VpYIEhpg3pXaFlWwgkrDLk=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=YVUdpqQdmLgG/8qbpKU8YFMK3hq3PeaMNA7Z2evy3+zyJLbBX6VPtm+Fba2CvVE5In47f+sRXu3UhBXA5b1zke8GJ9RCnPnlYhvyldZPkQz5nc2AK5XM+4NwXmScdTiA2dCWZO+F5jSGMe92TgQPjYdffGsFK3cSwtQEHLDbnn0= 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=paQ5zlGJ; arc=none smtp.client-ip=95.215.58.186 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=1709199700; 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=GegLNLHxIoI8+sAVk+Nsq6tpYyLvBJO09+R/NY+xICI=; b=paQ5zlGJwdN9jhx5pltEjtzoSYBlz38SJveNEt3lDPc0DI3qizX4k5Oie1Widz4gpN41H+ 8bWyFHIkxf4hRKv3IHfQSMSNyngkZ5TiiVvmTzM400NDwcfv8ivLQ3UsSOfvvW1MMJ5wMN a49mi+7PZM70VuReMkyrFCVU1Fp2qzI= From: kunwu.chan@linux.dev To: trond.myklebust@hammerspace.com, anna@kernel.org Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, Kunwu Chan Subject: [PATCH] nfs: use KMEM_CACHE() to create nfs_commit_data cache Date: Thu, 29 Feb 2024 17:41:12 +0800 Message-Id: <20240229094112.1154644-1-kunwu.chan@linux.dev> Precedence: bulk X-Mailing-List: linux-nfs@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/nfs/write.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/nfs/write.c b/fs/nfs/write.c index bb79d3a886ae..6a75772d447f 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -2148,10 +2148,7 @@ int __init nfs_init_writepagecache(void) if (nfs_wdata_mempool == NULL) goto out_destroy_write_cache; - nfs_cdata_cachep = kmem_cache_create("nfs_commit_data", - sizeof(struct nfs_commit_data), - 0, SLAB_HWCACHE_ALIGN, - NULL); + nfs_cdata_cachep = KMEM_CACHE(nfs_commit_data, SLAB_HWCACHE_ALIGN); if (nfs_cdata_cachep == NULL) goto out_destroy_write_mempool; -- 2.39.2