Message ID | 20240905-work-kmem_cache_args-v4-3-ed45d5380679@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F162ECD4F5B for <linux-mm@archiver.kernel.org>; Thu, 5 Sep 2024 07:57:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6EE0E6B0182; Thu, 5 Sep 2024 03:57:19 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 69D7B6B0186; Thu, 5 Sep 2024 03:57:19 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 53EC86B018C; Thu, 5 Sep 2024 03:57:19 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 36ACE6B0182 for <linux-mm@kvack.org>; Thu, 5 Sep 2024 03:57:19 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id B612D141A7A for <linux-mm@kvack.org>; Thu, 5 Sep 2024 07:57:18 +0000 (UTC) X-FDA: 82529929356.05.E57F91C Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf08.hostedemail.com (Postfix) with ESMTP id EC246160016 for <linux-mm@kvack.org>; Thu, 5 Sep 2024 07:57:16 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=n1yEAPYO; spf=pass (imf08.hostedemail.com: domain of brauner@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=brauner@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725522940; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=JlMDuH0GoVfadZtCSMXehXCNc32v8K9Oxk/OKwCILHo=; b=iAn7O8Ow2Fy4z1bT2kzU1p+en7z+wr1BNct5pZdGs0TchCswbWy5cngRSS5M623vgqAk08 g3hSUH4B94uBwgz0h9KoaW09nwg6UU+WZrZlfhsdxH1lNTY1Ouc/oAL7jt9rwEWpGYCiaN FKAo6U6LpTIqZ0klqtn4UrnDwOnBi7A= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725522940; a=rsa-sha256; cv=none; b=kOc//xSSQ3RyZp5+5+iQbhqm+VUJh+H8ieZgmkxi+0NAuuRrRgSQw66F8axl+KNSlGv51T Ej4H4o4wFWEHeqr9WjmLtI+9uNS2riXbsDEqmC5OjywwZdr6ObhfR5vwUEX7U9xtxErQgc lOkDc0IMV3P/BxzXVtH9MNMcPw0kkqY= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=n1yEAPYO; spf=pass (imf08.hostedemail.com: domain of brauner@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=brauner@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 96E245C568D; Thu, 5 Sep 2024 07:57:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 624BBC4CEC3; Thu, 5 Sep 2024 07:57:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725523035; bh=GREA3sYaJRn8q3FSMpLjOkkur0kW09aZN/fas4uylbs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=n1yEAPYOkhFGaueY8PxQNM4lK424wC4LLcA4VZoAvb5sRDnTnUifIO/WWNvg15+c/ 96l0X4SE43ZRjAj/nvkbLg0iz5LROt+spWqSPPq2Txpfg7cSNT/Xz2E2WqOpJZdw5D lFRk0NfhYGoH7+UQIyDyVZc9fWNIfgPJaBG7ofLXjCVb0EVzcm7SSJ42nymshXMfe+ /D4Wk6cfDKl6Bd4QkWanB6UptwyqN34Wy2BO7glxcb4C0nXfVsAoM6q1Qo8ZLO2pJP ODo9PzM48pFQfM+m3oM7RCNDYwGgXrjv8vh7tPt4xxUrBY34iT/H0MdLerLxsImKvW oa/+9x27JXu5A== From: Christian Brauner <brauner@kernel.org> Date: Thu, 05 Sep 2024 09:56:46 +0200 Subject: [PATCH v4 03/17] slab: port kmem_cache_create() to struct kmem_cache_args MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240905-work-kmem_cache_args-v4-3-ed45d5380679@kernel.org> References: <20240905-work-kmem_cache_args-v4-0-ed45d5380679@kernel.org> In-Reply-To: <20240905-work-kmem_cache_args-v4-0-ed45d5380679@kernel.org> To: Vlastimil Babka <vbabka@suse.cz>, Jens Axboe <axboe@kernel.dk>, Jann Horn <jannh@google.com>, Linus Torvalds <torvalds@linux-foundation.org>, Mike Rapoport <rppt@kernel.org> Cc: Kees Cook <kees@kernel.org>, Christoph Lameter <cl@linux.com>, Pekka Enberg <penberg@kernel.org>, David Rientjes <rientjes@google.com>, Joonsoo Kim <iamjoonsoo.kim@lge.com>, Andrew Morton <akpm@linux-foundation.org>, Roman Gushchin <roman.gushchin@linux.dev>, Hyeonggon Yoo <42.hyeyoo@gmail.com>, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, Christian Brauner <brauner@kernel.org> X-Mailer: b4 0.15-dev-37811 X-Developer-Signature: v=1; a=openpgp-sha256; l=1010; i=brauner@kernel.org; h=from:subject:message-id; bh=GREA3sYaJRn8q3FSMpLjOkkur0kW09aZN/fas4uylbs=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaTdTPHa0lwdyv1ebHdoTLLK7L1hdrPXNizcXFIZcJw/9 OjNO+2cHaUsDGJcDLJiiiwO7Sbhcst5KjYbZWrAzGFlAhnCwMUpABP5+oLhv2d7+4ofqTcu5jDm sq7rXHiimsc2YkPJs6o1ZgeKwyOC5BkZPlRMu3Ap7vgjqcV1UbX2r95Oyfi5J+0L61L/Hq6MW9z 9vAA= X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: EC246160016 X-Stat-Signature: zrq6qdw3fquckhgp5j55nbf1rgj5dy1k X-HE-Tag: 1725523036-236617 X-HE-Meta: U2FsdGVkX1/KQ1f6K+8dRpxNaJP6XE3qRZzKqzpJ48PNtI6eF43r0QUOvblWjV57BYN84Cvgb/XNO8soyRFT1pFkDyhUIqutrP4thrtSDHbu9qz2bc1HTo6E1WWVITvyxy0waWorbpHLJvJDw3fj1MOrrvWAssuTAVFyb4JgO6cUWNim6la7ITlr+3AfNDGkZHmXQXjPB5lw/DlJ3WSJA7D7q6re4mxH8C45b3G8E9739OMLLwiSgg82bmSlX5c2LEVhqd/H/0wxsdOrJIw4f9oQANNdS0ORHs3LcP6nWcsjlbFj9wfvUtZbVlg9M4iKKfeQQDWfViJN7qD6Z+lkgdBYGh+RGYMB5GzB6cm89jvsBPRyEgMdmogdoIYiLsDMlgdPvO/C8KLdcewKClCAbu2yIEVX52lTFhz1wMcrjBU1l9NNdOh2bWoFvC2/OMCv+BoSuycGF7NLZXpl1FdoKjcyBBhSmRkglhICxi5SGZ0LT+4Wlr91IVURwpi7r8b99V1TICl6vpxyjqTnAEwuje/5ahEW4FJzxJrsNqS8K7mIcycS48sxpZVfJpIUeYQOEfxtldns4NvailT7PTZ1AWNoGpWa8Ai9v8Iy1+MqtQOs92ytKsuiBWXP57ICgtGGwfOV+F3n48OBGrqG239I0JSwIZbFWp8zrXaQeJfmpEgGByBHJBk8/M2AGV5sydD89VlMBt7gzjI6LILexTc1Ma0paTqeVw5zWGHAnz5orLnBA3BPz6/zkD/SPREuOq27a4mrime4fHqkV29EhJpksFDLg6RmPetE7lNHM1OfH/W+/DkWtbiUBnFAr1YlraeeZW60zeEaFW/zm4D3n3qKjCpXWiw0Qzc+q1V9iIUo5Kb+9dqgi+h0CvSS+vZT5ytgIQVWyLg3AIbyUS6hcr+s5CtEtHymZGO04NeRK4R+L5ci8qqbHNDjtqJQOpbR+58wq1QG9XkW2iDCIWRNaNz 9evIMZPG sXKKkcfgUrgn4DH4ggxPrB29JP9dIjho06XMiS16KSMRXg+GYDwVw45VPoIqV7GEKAPo7R90OGl6Qy1s8cXPBSWozAgbdH7A9a8Cyvzmmxnm14kIhZDMuYxNiAMHcsRhD4EzXmoAeicrg3JdqFxxgb7ziLlbMjfjOWt1np/BbZgEVmtRauFj1PBg8uEy5ZZf+koMiFJgKmWflWgzPXQZVyHXU5789mgyHsN8btV1PRemZ8q9GgkAWE/Nn/EMnj+crfDXrZLycGW5Pprj4ziTF0UXBSATxlhhPP2uP91hA86eVVIx6IEwqvrthIpsRuIcUsn09fu3+RhwRFdhMyjNOdcOt60pnJNq3IxXeNONYsBUNJfLeh7iEi1V/liwNj/AXZVYSPkkHk+XFF58= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
slab: add struct kmem_cache_args
|
expand
|
On Thu, Sep 05, 2024 at 09:56:46AM +0200, Christian Brauner wrote: > Port kmem_cache_create() to struct kmem_cache_args. > > Reviewed-by: Kees Cook <kees@kernel.org> > Reviewed-by: Jens Axboe <axboe@kernel.dk> > Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org> > Reviewed-by: Vlastimil Babka <vbabka@suse.cz> > Signed-off-by: Christian Brauner <brauner@kernel.org> Reviewed-by: Roman Gushchin <roman.gushchin@linux.dev>
diff --git a/mm/slab_common.c b/mm/slab_common.c index 0f13c045b8d1..ac0832dac01e 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c @@ -439,8 +439,12 @@ struct kmem_cache * kmem_cache_create(const char *name, unsigned int size, unsigned int align, slab_flags_t flags, void (*ctor)(void *)) { - return do_kmem_cache_create_usercopy(name, size, UINT_MAX, align, flags, - 0, 0, ctor); + struct kmem_cache_args kmem_args = { + .align = align, + .ctor = ctor, + }; + + return __kmem_cache_create_args(name, size, &kmem_args, flags); } EXPORT_SYMBOL(kmem_cache_create);