Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1601457rdb; Wed, 31 Jan 2024 03:52:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IEmoVuGenjVGy/avey342uGTUGnKZRihq5OM5Ot3/J5mP2BFtbxQb/F/C1T4KAtciB3BfzK X-Received: by 2002:a05:6300:8082:b0:19d:a8c9:40cd with SMTP id ap2-20020a056300808200b0019da8c940cdmr1323843pzc.3.1706701954560; Wed, 31 Jan 2024 03:52:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706701954; cv=pass; d=google.com; s=arc-20160816; b=wxlDE1PJQzRTT/Kz5xp8nsw0TKXnIjAY20w9b1XxxTVu+1fNy2jURnvukdzH/raHsX 7+CqNtzdOvDJg+9uNgJ6b05Eo0GFh0B+wYg5yw82r2xvJaSwa/Erv9sH4HET5iq3frHL hYycxyCnw9fEDLe3Z9LJO4AlXsFOzrT2BKmx7VE/C527Xbdu8laC6LVnIVS5B5Ksnp+m nGY1AQpXgZwvKAnr9iohUbndn322cBDAifBkZE2FqnqH1P4H7CkJqW+bw4UPRSDGpmY9 36nrg4cx0/UbKdnTBvEK0zzgP4CiOJ3M6JMYnBoHdxPsxqSRrcocSb2yaE0/PW3gIQZ0 4DcQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature:dkim-signature :dkim-signature; bh=T+ZO5rd8ho25EDHOwsCAfpvNPINlx/FEPMDsaLbJtlU=; fh=5qAfcG70K/ZiiyOI/GcDdNhuCyBy9a/mS80/5q5Kz+k=; b=s+tKSF36BdRmU5H/hMZiIvM69wKtJh/+FZ5KetPhyHtyJewp5oVrkcnkPun+zpLev8 s2mxrug/WSq7BxigOaS0aQC0CL8OgYl6LO7LbXbI9JuCYP2ZLuQFCEnW/GH6IexCeCyl 5UyyIbMbIiO1mEuPRGeAh7YONuGuDFsjIrV4wE01DJiKOJEoBaDzadtEmdDGr0uv8yfZ tWn0jkJtySots84kIj5kfJAKf9JRVY/1koYiP+0qSmJFrmgYjvO8iBMD1PA7re52JvRw /ez9BziGuDkT1qtj1u38qwP+dvetrfqSS2syrj3PwKZS18Yjcl8TuAAtSs5KcxjvbNog +vYg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=PJmBHfiC; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=PJmBHfiC; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-46336-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46336-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCXfOxF3hky/5MIiN1hkVMq+ku/V5MqXq9/k5emNWbypR6YJg4GRZFY2AQCTWKGMVOjNsFmcj4URG+Ejn55CaW65MBSVvaEb6AqAqM5ziw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id y14-20020a17090a134e00b002955ebd5941si1070377pjf.9.2024.01.31.03.52.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 03:52:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46336-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=PJmBHfiC; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=PJmBHfiC; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-46336-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46336-linux.lists.archive=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 sy.mirrors.kernel.org (Postfix) with ESMTPS id A6D29B34E93 for ; Wed, 31 Jan 2024 11:19:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D62073168; Wed, 31 Jan 2024 11:18:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="PJmBHfiC"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="LbMqUVa4"; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="PJmBHfiC"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="LbMqUVa4" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 57F4922619; Wed, 31 Jan 2024 11:18:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706699932; cv=none; b=qCA6CWG9p89KeluRBZLPEc4WF2lJ0gWN4bfnNU/KJsDJYXbVPwuvG3cxMpeYPgPmKiJmhXSkOUwQ94tRvIcJm59KhsUXRtmi1kEwde+K/4Us1OsuVVMlL1WF5KgZopfKIoL6qMUvUaPuAgqD4PtOaqgdabHmb9hQE9UXO/8ORks= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706699932; c=relaxed/simple; bh=z9HbznpTxs+hCXQiVU7KW8JJixJG05vmA2WmM1tQPp8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HhbULiljWGGnpanlqZQT/9iJTTa9KvVzHOcZLwqHmmDn1005EjV3ccgvOA/cjVjmy4AxUrWoK+I6mZivcNJRp2C6f4FMWsgctgf84rgMl1FDzmOPohFp845AV7Uj9WYpZuKln1oe9qkmdTN8HZnbgFeWiJ/6q6QPCJwksYBIl+0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=PJmBHfiC; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=LbMqUVa4; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=PJmBHfiC; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=LbMqUVa4; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4FAF3220D8; Wed, 31 Jan 2024 11:18:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1706699928; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T+ZO5rd8ho25EDHOwsCAfpvNPINlx/FEPMDsaLbJtlU=; b=PJmBHfiC7xG2mBNl4fVz4ZMxB408aQXuHiTFFzo0JyNZATQI7feB3jddU5o8vkHOioI7Be DPBsV3WwCITrcpCLQDj8V9fDRtnhQq40hex2mdBPhKJn8fXJ9bQ4MVVNlAMmnMkZGZAoBp vdroEjYzJnXDsfFx392A6jPJ8HDYsZI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1706699928; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T+ZO5rd8ho25EDHOwsCAfpvNPINlx/FEPMDsaLbJtlU=; b=LbMqUVa4p4c3thd9uNPo8J21zMTzrTGzjegRDDs2Q9ihllp+fpVcClz5Zp+DQADRZHSJ3u /Agzat4MaI626NAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1706699928; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T+ZO5rd8ho25EDHOwsCAfpvNPINlx/FEPMDsaLbJtlU=; b=PJmBHfiC7xG2mBNl4fVz4ZMxB408aQXuHiTFFzo0JyNZATQI7feB3jddU5o8vkHOioI7Be DPBsV3WwCITrcpCLQDj8V9fDRtnhQq40hex2mdBPhKJn8fXJ9bQ4MVVNlAMmnMkZGZAoBp vdroEjYzJnXDsfFx392A6jPJ8HDYsZI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1706699928; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=T+ZO5rd8ho25EDHOwsCAfpvNPINlx/FEPMDsaLbJtlU=; b=LbMqUVa4p4c3thd9uNPo8J21zMTzrTGzjegRDDs2Q9ihllp+fpVcClz5Zp+DQADRZHSJ3u /Agzat4MaI626NAw== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 41134132FA; Wed, 31 Jan 2024 11:18:48 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id JyzUD5gsumXGQAAAn2gu4w (envelope-from ); Wed, 31 Jan 2024 11:18:48 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id A8398A0809; Wed, 31 Jan 2024 12:18:47 +0100 (CET) Date: Wed, 31 Jan 2024 12:18:47 +0100 From: Jan Kara To: Kunwu Chan Cc: miklos@szeredi.hu, amir73il@gmail.com, viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz, linux-fsdevel@vger.kernel.org, linux-unionfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] fs: Use KMEM_CACHE instead of kmem_cache_create Message-ID: <20240131111847.ujdhhab6wdebo6fn@quack3> References: <20240131070941.135178-1-chentao@kylinos.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240131070941.135178-1-chentao@kylinos.cn> Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.cz header.s=susede2_rsa header.b=PJmBHfiC; dkim=pass header.d=suse.cz header.s=susede2_ed25519 header.b=LbMqUVa4 X-Spamd-Result: default: False [-2.78 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; DKIM_TRACE(0.00)[suse.cz:+]; MX_GOOD(-0.01)[]; RCPT_COUNT_SEVEN(0.00)[9]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; FREEMAIL_CC(0.00)[szeredi.hu,gmail.com,zeniv.linux.org.uk,kernel.org,suse.cz,vger.kernel.org]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.97)[99.86%] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Queue-Id: 4FAF3220D8 X-Spam-Level: X-Spam-Score: -2.78 X-Spam-Flag: NO On Wed 31-01-24 15:09:41, Kunwu Chan wrote: > commit 0a31bd5f2bbb ("KMEM_CACHE(): simplify slab cache creation") > introduces a new macro. > Use the new KMEM_CACHE() macro instead of direct kmem_cache_create > to simplify the creation of SLAB caches. > > Signed-off-by: Kunwu Chan Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/backing-file.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/fs/backing-file.c b/fs/backing-file.c > index a681f38d84d8..740185198db3 100644 > --- a/fs/backing-file.c > +++ b/fs/backing-file.c > @@ -325,9 +325,7 @@ EXPORT_SYMBOL_GPL(backing_file_mmap); > > static int __init backing_aio_init(void) > { > - backing_aio_cachep = kmem_cache_create("backing_aio", > - sizeof(struct backing_aio), > - 0, SLAB_HWCACHE_ALIGN, NULL); > + backing_aio_cachep = KMEM_CACHE(backing_aio, SLAB_HWCACHE_ALIGN); > if (!backing_aio_cachep) > return -ENOMEM; > > -- > 2.39.2 > -- Jan Kara SUSE Labs, CR