Re: [PATCH v2 04/15] slab: port kmem_cache_create_rcu() to struct kmem_cache_args

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 03, 2024 at 04:20:45PM +0200, Christian Brauner wrote:
> Port kmem_cache_create_rcu() to struct kmem_cache_args.
> 
> Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>

Reviewed-by: Mike Rapoport (Microsoft) <rppt@xxxxxxxxxx>

> ---
>  mm/slab_common.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/mm/slab_common.c b/mm/slab_common.c
> index ac0832dac01e..da62ed30f95d 100644
> --- a/mm/slab_common.c
> +++ b/mm/slab_common.c
> @@ -481,9 +481,13 @@ struct kmem_cache *kmem_cache_create_rcu(const char *name, unsigned int size,
>  					 unsigned int freeptr_offset,
>  					 slab_flags_t flags)
>  {
> -	return do_kmem_cache_create_usercopy(name, size, freeptr_offset, 0,
> -					     flags | SLAB_TYPESAFE_BY_RCU, 0, 0,
> -					     NULL);
> +	struct kmem_cache_args kmem_args = {
> +		.freeptr_offset		= freeptr_offset,
> +		.use_freeptr_offset	= true,
> +	};
> +
> +	return __kmem_cache_create_args(name, size, &kmem_args,
> +					flags | SLAB_TYPESAFE_BY_RCU);
>  }
>  EXPORT_SYMBOL(kmem_cache_create_rcu);
>  
> 
> -- 
> 2.45.2
> 

-- 
Sincerely yours,
Mike.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux