Message ID | 20240904-work-kmem_cache_args-v3-3-05db2179a8c2@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 5449ECA0ED3 for <linux-mm@archiver.kernel.org>; Wed, 4 Sep 2024 10:22:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BCE9D8D0244; Wed, 4 Sep 2024 06:22:06 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B7F6D8D0242; Wed, 4 Sep 2024 06:22:06 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A1F7A8D0244; Wed, 4 Sep 2024 06:22:06 -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 858878D0242 for <linux-mm@kvack.org>; Wed, 4 Sep 2024 06:22:06 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 3762D80EFF for <linux-mm@kvack.org>; Wed, 4 Sep 2024 10:22:06 +0000 (UTC) X-FDA: 82526665452.01.8612AAE Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by imf26.hostedemail.com (Postfix) with ESMTP id 6953C14000F for <linux-mm@kvack.org>; Wed, 4 Sep 2024 10:22:04 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ATXYzaED; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of brauner@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=brauner@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1725445246; a=rsa-sha256; cv=none; b=4/HG7IFVM+7NMMhxvsZBzIqhiZCWw2xXNTPf0b+Q9Szkj2fMMWP2iUQGCCP2gYNSxly1xY 3xeQ+81GMrilmBv3Iw52X3XLF7wFeZ+m7Xr1IvI69m+1GWTYz4u2fQyRB7EnS+lIgKTu57 D8/0hXZCbFu/e0Pdln5ArkKHwy/rFiY= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ATXYzaED; dmarc=pass (policy=quarantine) header.from=kernel.org; spf=pass (imf26.hostedemail.com: domain of brauner@kernel.org designates 147.75.193.91 as permitted sender) smtp.mailfrom=brauner@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1725445246; 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=fny6sgK5/VE8AxqTuJuSDYZWl91pcfBlM4GcgoxMsxY=; b=j8ixO9+2nCHdrc8Wrfp5UOLbshLn7UfDmahYIpn8JjVH1JuMAhQ/K6uGRW6iTgQsg2U83T GAHo8/amvzclMydJ1nF6ZS//9dk4vNUmcXbGyx3D5v1v5aoYPE5ZcX0R1EiTYRLaSWEQ1k eJ2oDWGocO5QRXFdApM1T3mR9O6g1ic= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 4D020A4327F; Wed, 4 Sep 2024 10:21:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBE8DC4CEC6; Wed, 4 Sep 2024 10:21:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725445323; bh=0yvBsmIzvOyKMPTmQD/+Lg+Nh4nfzS75mqd2tBAiPek=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=ATXYzaEDvpyqO1cHVGL9BkKUYRZSfC3s2XK116B4f+XLDx3OR0OqXp7vJQk46lpOB o0+rzieBKLa9Ck3jreS4t1TXQ2/X2f2ZJiWgyRJbWBepXzXY3p+72PP1P4A3enMKTp YJRpuc78eW/3QcKhW5wPqjj4YnoFgpSAk2Io02F/kROX5bxT+VVUVojSV6CVAKX4Pu vytuhD1n/pj06Tld94xW8mBjHjSWEJuQeg790cjshKRbKdFqcY2fp1zrjgPLDERZ+a JuJN7gsBnG4CbYClaIaCTeKJjJthJTBWZcboXJvlqzjvLiKUz4QcaE3SIbQ5x/xzlp WU6mG6l3Yp7Pg== From: Christian Brauner <brauner@kernel.org> Date: Wed, 04 Sep 2024 12:21:08 +0200 Subject: [PATCH v3 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: <20240904-work-kmem_cache_args-v3-3-05db2179a8c2@kernel.org> References: <20240904-work-kmem_cache_args-v3-0-05db2179a8c2@kernel.org> In-Reply-To: <20240904-work-kmem_cache_args-v3-0-05db2179a8c2@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=925; i=brauner@kernel.org; h=from:subject:message-id; bh=0yvBsmIzvOyKMPTmQD/+Lg+Nh4nfzS75mqd2tBAiPek=; b=owGbwMvMwCU28Zj0gdSKO4sYT6slMaTdMNnJbu88Z6+bms7x+X9qq2pO9d8V69rFpSOosqRs4 dV4zTlNHaUsDGJcDLJiiiwO7Sbhcst5KjYbZWrAzGFlAhnCwMUpABN5HMfw38X95L1Xu9QYhQ+t eJ13zN/OOL72oUYV06oQzmyNjE57dkaGuc/0N6ZdNHR3KmN4suviqSP+rQ0ru98LPu7ZYKId783 KAwA= X-Developer-Key: i=brauner@kernel.org; a=openpgp; fpr=4880B8C9BD0E5106FC070F4F7B3C391EFEA93624 X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 6953C14000F X-Stat-Signature: spuwfuqut5gwewc9qzdb8qk3wuibicyi X-Rspam-User: X-HE-Tag: 1725445324-31246 X-HE-Meta: U2FsdGVkX19QnGX4dAOXteqiPD/rLyNXLBF4Ir2VzkKB75MXyDrm+WzIq+Z+xf2+Z9z6rmHy0K2FmyVM/6DZeoWIE/edDJyq3Z2U6oj2h58hbsPb0uVZZT0tdGlWuvcvSACWAy/qPrAPOVFABvpUDWUQrqF32qExmqPp4gF2FGUAaSxUVCN+BBwwX7Hvt2LVuX0v+frj1jP4hH4iMN/nUpxt+wEKwQfjLSNcy0pgYGOInK2cvrShs9K/BfVj/u9BNMBLoV6ZbhbnqF7YPh/Un41kfM/SNA1XlOfQ+PywNVhpnqphnacVWxWeLoFhMCZwR6ivQCgST9O0Hv04xMwKuKuxotNZMQK/8O3OVTlsgfVYvLGXRSdMBYxO3XRkpeabOJqLlgBJwQJuCj24bGi9JSyGw1DAu6CTAeEklK1pX8j1ViZ522p7yjo9O23d3K0rDoCruxwJZ1+YjgSqkLCNbTVIciUuLLTwNiFrZmNbBB7PXsFSV4GEN6L9DA8GxrWHNU4X5Alzn6h9YeHfRynACyVBXKH1ku28A6W76uY5IaoCsa9RlpSu/k2oatTmVBoe5RAyI2+SV8JVU1coR327jqD/bRC+hqATsvG0liY68WY2vsKF36IrS45YBAL0FYlCUrJ3ilLBXif+Kb/R7rDRU/xSi63z4yyLScYnwjRA4FrcZPsXmJqgddt12dNTvfOYQRcckipZYbLCQY35IqIdPY9tCETlAlZkrMCtdnDnFStGwLdHg50PJxGECvRjDU1G5KzB5Lj3HR5cfmODvSn8iHLsG/yaW1nhlgha1tRURnzvvVzNxh4gg9OXh2HQOobtr5GXa/+8bt4ziairLREluCV0iItRYpiYJBK0H0zLooXG043MxfocrdBJKXNXE2H6DANIA/26cN1SLhAV9Cm0kGfq4LORPJEDwHjR1EvqQjxyjnE4ZmeM+YNIygopYFQqAf1+dydolqLUdyJnPXc F7W/Isk8 GmQFDXjGf4yprF4XFzeeYswRARxQbhUWgd8Z3+RkasJuidGn4Yw/XsLFuFs22xPtWaf2oBsKxHXr1KsJtkxpY20JgNNV+C6/ncGxK0iLwAmTYgNK6b2WtvP+IR3zvye/bTXNnth1MWGs+wnaQlwhpPahoyDFcg9Ua2x+mwJnOUVelnfCQQSR0CM0mJ8Gq5JmruG5bMbUAKkG/H3lJFdjfn5B0bbzM1NkhizjY9gb49Bahk7diawWT1KcN7yVd9C0sbbLBIn8B4ftacbCtL2ywKlEWgVclHobnooASa9pGpUZ/aqYbWS41LxeahoFxHs5oPcYaQxxznF7uufBf7Bf7bDPPgGsWMv6ca84KgjXr3W1mJGs= 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
|
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);